name: Sky
card_text: 1 non-FIRE "Sky Striker Ace" monster
  If this card is Special Summoned: You can target 1 "Sky Striker" Spell in your GY; add it to your hand. Gains 100 ATK for each Spell in your GY. You can only Special Summon "Sky Striker Ace - Kagari(s)" once per turn.
external_ids: local SETCARD_ID_0 = 0x115 --Sky
  local SETCARD_ID_1 = 0x1115 --Sky
  
lua: local SETCARD_ID_0 = 0x115 --Sky
  local SETCARD_ID_1 = 0x1115 --Sky
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetSPSummonOnce(id)
  	--link summon
  	c:EnableReviveLimit()
  	aux.AddLinkProcedure(c, s.matfilter, 1, 1)
  	--atk up
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	--search
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_TOHAND)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e3:SetTarget(s.thtg)
  	e3:SetOperation(s.thop)
  	c:RegisterEffect(e3)
  end
  function s.matfilter(c)
  	return c:IsLinkSetCard(SETCARD_ID_1) and c:IsLinkAttribute(ATTRIBUTE_ALL & ~ATTRIBUTE_FIRE)
  end
  function s.atkval(e)
  	return Duel.GetMatchingGroupCount(Card.IsType, e:GetHandlerPlayer(), LOCATION_GRAVE, 0, nil, TYPE_SPELL) * 100
  end
  function s.thfilter(c, tp)
  	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.thfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local sg = Duel.SelectTarget(tp, s.thfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, sg, 1, 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc, nil, REASON_EFFECT)
  	end
  end
  
  
source_text: Sky
  1 non-FIRE "Sky Striker Ace" monster
  If this card is Special Summoned: You can target 1 "Sky Striker" Spell in your GY; add it to your hand. Gains 100 ATK for each Spell in your GY. You can only Special Summon "Sky Striker Ace - Kagari(s)" once per turn.
target_text: -- Sky
  local SETCARD_ID_0 = 0x115 --Sky
  local SETCARD_ID_1 = 0x1115 --Sky
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetSPSummonOnce(id)
  	--link summon
  	c:EnableReviveLimit()
  	aux.AddLinkProcedure(c, s.matfilter, 1, 1)
  	--atk up
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	--search
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_TOHAND)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e3:SetTarget(s.thtg)
  	e3:SetOperation(s.thop)
  	c:RegisterEffect(e3)
  end
  function s.matfilter(c)
  	return c:IsLinkSetCard(SETCARD_ID_1) and c:IsLinkAttribute(ATTRIBUTE_ALL & ~ATTRIBUTE_FIRE)
  end
  function s.atkval(e)
  	return Duel.GetMatchingGroupCount(Card.IsType, e:GetHandlerPlayer(), LOCATION_GRAVE, 0, nil, TYPE_SPELL) * 100
  end
  function s.thfilter(c, tp)
  	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.thfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local sg = Duel.SelectTarget(tp, s.thfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, sg, 1, 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc, nil, REASON_EFFECT)
  	end
  end
  
  