name: Valkyrie
card_text: Once per turn, you can either: Target 1 Fairy monster you control; equip this card to that target, OR: Unequip this card and Special Summon it. If the equipped monster would be destroyed by battle or card effect, destroy this card instead. When the equipped monster declares an attack: You can have it gain 500 ATK. (This ATK gain remains even if this card leaves the field.)
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnableUnionAttribute(c, s.filter)
  	--atk up
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 2))
  	e5:SetCategory(CATEGORY_ATKCHANGE)
  	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e5:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCondition(s.atkcon)
  	e5:SetOperation(s.atkop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsRace(RACE_FAIRY)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local ec = e:GetHandler():GetEquipTarget()
  	return ec and Duel.GetAttacker() == ec
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local ec = c:GetEquipTarget()
  	if ec and c:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(500)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		ec:RegisterEffect(e1)
  	end
  end
  
  
source_text: Valkyrie
  Once per turn, you can either: Target 1 Fairy monster you control; equip this card to that target, OR: Unequip this card and Special Summon it. If the equipped monster would be destroyed by battle or card effect, destroy this card instead. When the equipped monster declares an attack: You can have it gain 500 ATK. (This ATK gain remains even if this card leaves the field.)
target_text: -- Valkyrie
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnableUnionAttribute(c, s.filter)
  	--atk up
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 2))
  	e5:SetCategory(CATEGORY_ATKCHANGE)
  	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e5:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCondition(s.atkcon)
  	e5:SetOperation(s.atkop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsRace(RACE_FAIRY)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local ec = e:GetHandler():GetEquipTarget()
  	return ec and Duel.GetAttacker() == ec
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local ec = c:GetEquipTarget()
  	if ec and c:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(500)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		ec:RegisterEffect(e1)
  	end
  end
  
  