name: Noble
card_text: If a "Noble Arms" Equip Spell becomes equipped to this card: You can Special Summon 1 "Noble Knight Token" (Warrior/LIGHT/Level 4/ATK 1000/DEF 1000), also you cannot Special Summon monsters for the rest of this turn, except "Noble Knight" monsters. You can only use this effect of "Noble Knight Iyvanne" once per turn. While this card is equipped with a "Noble Arms" Equip Spell, all other "Noble Knight" monsters you control gain 500 ATK.
external_ids: local CARD_ID_0 = 88923964 --Noble Knight Token
  local SETCARD_ID_0 = 0x107a --Noble
  
lua: local CARD_ID_0 = 88923964 --Noble Knight Token
  local SETCARD_ID_0 = 0x107a --Noble
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--token
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_EQUIP)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.tkcon)
  	e1:SetTarget(s.tktg)
  	e1:SetOperation(s.tkop)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetCondition(s.atkcon)
  	e2:SetTarget(s.atktg)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  end
  function s.tkcon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(Card.IsSetCard, 1, nil, 0x207a)
  end
  function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 1000, 1000, 4, RACE_WARRIOR, ATTRIBUTE_LIGHT)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.tkop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 1000, 1000, 4, RACE_WARRIOR, ATTRIBUTE_LIGHT) then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP)
  	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, sump, sumtype, sumpos, targetp, se)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  function s.atkcon(e)
  	local c = e:GetHandler()
  	local eg = c:GetEquipGroup()
  	return #eg > 0 and eg:IsExists(Card.IsSetCard, 1, nil, 0x207a)
  end
  function s.atktg(e, c)
  	return c:IsSetCard(SETCARD_ID_0) and c ~= e:GetHandler()
  end
  
  
source_text: Noble
  If a "Noble Arms" Equip Spell becomes equipped to this card: You can Special Summon 1 "Noble Knight Token" (Warrior/LIGHT/Level 4/ATK 1000/DEF 1000), also you cannot Special Summon monsters for the rest of this turn, except "Noble Knight" monsters. You can only use this effect of "Noble Knight Iyvanne" once per turn. While this card is equipped with a "Noble Arms" Equip Spell, all other "Noble Knight" monsters you control gain 500 ATK.
target_text: -- Noble
  local CARD_ID_0 = 88923964 --Noble Knight Token
  local SETCARD_ID_0 = 0x107a --Noble
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--token
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_EQUIP)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.tkcon)
  	e1:SetTarget(s.tktg)
  	e1:SetOperation(s.tkop)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetCondition(s.atkcon)
  	e2:SetTarget(s.atktg)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  end
  function s.tkcon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(Card.IsSetCard, 1, nil, 0x207a)
  end
  function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 1000, 1000, 4, RACE_WARRIOR, ATTRIBUTE_LIGHT)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.tkop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 1000, 1000, 4, RACE_WARRIOR, ATTRIBUTE_LIGHT) then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP)
  	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, sump, sumtype, sumpos, targetp, se)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  function s.atkcon(e)
  	local c = e:GetHandler()
  	local eg = c:GetEquipGroup()
  	return #eg > 0 and eg:IsExists(Card.IsSetCard, 1, nil, 0x207a)
  end
  function s.atktg(e, c)
  	return c:IsSetCard(SETCARD_ID_0) and c ~= e:GetHandler()
  end
  
  