name: Isolde,
card_text: If you control "Tristan, Knight of the Underworld", you can Special Summon this card (from your hand). Cannot be Special Summoned by other ways. You can target up to 2 Zombie monsters you control and declare a Level from 5 to 8; they become that Level until the end of this turn, also you cannot Special Summon monsters for the rest of this turn, except Zombie monsters. You can only use this effect of "Isolde, Belle of the Underworld" once per turn.
external_ids: local CARD_ID_0 = 96163807 --Tristan, Knight of the Underworld
  
lua: local CARD_ID_0 = 96163807 --Tristan, Knight of the Underworld
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_SPSUMMON_PROC)
  	e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCondition(s.spcon)
  	c:RegisterEffect(e2)
  	--lv change
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e3:SetCountLimit(1, id)
  	e3:SetTarget(s.target)
  	e3:SetOperation(s.operation)
  	c:RegisterEffect(e3)
  end
  function s.spfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:GetLevel() > 0 and c:IsRace(RACE_ZOMBIE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 2, nil)
  	local lv1 = g:GetFirst():GetLevel()
  	local lv2 = 0
  	local tc2 = g:GetNext()
  	if tc2 then
  		lv2 = tc2:GetLevel()
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINGMSG_LVRANK)
  	local lv = Duel.AnnounceLevel(tp, 5, 8, lv1, lv2)
  	e:SetLabel(lv)
  end
  function s.lvfilter(c, e)
  	return c:IsFaceup() and c:IsRelateToEffect(e)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(s.lvfilter, nil, e)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_LEVEL)
  		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(s.splimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c)
  	return c:GetRace() ~= RACE_ZOMBIE
  end
  
  
source_text: Isolde,
  If you control "Tristan, Knight of the Underworld", you can Special Summon this card (from your hand). Cannot be Special Summoned by other ways. You can target up to 2 Zombie monsters you control and declare a Level from 5 to 8; they become that Level until the end of this turn, also you cannot Special Summon monsters for the rest of this turn, except Zombie monsters. You can only use this effect of "Isolde, Belle of the Underworld" once per turn.
target_text: -- Isolde,
  local CARD_ID_0 = 96163807 --Tristan, Knight of the Underworld
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_SPSUMMON_PROC)
  	e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCondition(s.spcon)
  	c:RegisterEffect(e2)
  	--lv change
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e3:SetCountLimit(1, id)
  	e3:SetTarget(s.target)
  	e3:SetOperation(s.operation)
  	c:RegisterEffect(e3)
  end
  function s.spfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:GetLevel() > 0 and c:IsRace(RACE_ZOMBIE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 2, nil)
  	local lv1 = g:GetFirst():GetLevel()
  	local lv2 = 0
  	local tc2 = g:GetNext()
  	if tc2 then
  		lv2 = tc2:GetLevel()
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINGMSG_LVRANK)
  	local lv = Duel.AnnounceLevel(tp, 5, 8, lv1, lv2)
  	e:SetLabel(lv)
  end
  function s.lvfilter(c, e)
  	return c:IsFaceup() and c:IsRelateToEffect(e)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(s.lvfilter, nil, e)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_LEVEL)
  		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(s.splimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c)
  	return c:GetRace() ~= RACE_ZOMBIE
  end
  
  