name: Sky
card_text: 2 LIGHT and/or DARK monsters
  Must be Link Summoned. You can only Special Summon "Sky Striker Ace - Azalea(s)" once per turn. If this card is Special Summoned: You can target 1 card on the field; destroy it, then, if you have 3 or less Spells in your GY, send this card to the GY. Once per turn, at the start of the Damage Step, if this card battles an opponent's monster: You can banish 1 Spell from your GY; destroy that opponent's monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetSPSummonOnce(id)
  	--link summon
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkAttribute, ATTRIBUTE_LIGHT + ATTRIBUTE_DARK), 2, 2)
  	c:EnableReviveLimit()
  	--spsummon condition
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e0:SetValue(aux.linklimit)
  	c:RegisterEffect(e0)
  	--destroy
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.destg1)
  	e1:SetOperation(s.desop1)
  	c:RegisterEffect(e1)
  	--bp destroy
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetCode(EVENT_BATTLE_START)
  	e2:SetCountLimit(1)
  	e2:SetCost(s.descost2)
  	e2:SetTarget(s.destg2)
  	e2:SetOperation(s.desop2)
  	c:RegisterEffect(e2)
  end
  function s.destg1(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop1(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and Duel.Destroy(tc, REASON_EFFECT) > 0 and c:IsRelateToEffect(e) and Duel.GetMatchingGroupCount(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_SPELL) <= 3 then
  		Duel.BreakEffect()
  		Duel.SendtoGrave(c, REASON_EFFECT)
  	end
  end
  function s.cfilter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
  end
  function s.descost2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  end
  function s.destg2(e, tp, eg, ep, ev, re, r, rp, chk)
  	local tc = e:GetHandler():GetBattleTarget()
  	if chk == 0 then
  		return tc and tc:IsControler(1 - tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, tc, 1, 0, 0)
  end
  function s.desop2(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetHandler():GetBattleTarget()
  	if tc:IsRelateToBattle() and tc:IsControler(1 - tp) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  
source_text: Sky
  2 LIGHT and/or DARK monsters
  Must be Link Summoned. You can only Special Summon "Sky Striker Ace - Azalea(s)" once per turn. If this card is Special Summoned: You can target 1 card on the field; destroy it, then, if you have 3 or less Spells in your GY, send this card to the GY. Once per turn, at the start of the Damage Step, if this card battles an opponent's monster: You can banish 1 Spell from your GY; destroy that opponent's monster.
target_text: -- Sky
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetSPSummonOnce(id)
  	--link summon
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkAttribute, ATTRIBUTE_LIGHT + ATTRIBUTE_DARK), 2, 2)
  	c:EnableReviveLimit()
  	--spsummon condition
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e0:SetValue(aux.linklimit)
  	c:RegisterEffect(e0)
  	--destroy
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.destg1)
  	e1:SetOperation(s.desop1)
  	c:RegisterEffect(e1)
  	--bp destroy
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetCode(EVENT_BATTLE_START)
  	e2:SetCountLimit(1)
  	e2:SetCost(s.descost2)
  	e2:SetTarget(s.destg2)
  	e2:SetOperation(s.desop2)
  	c:RegisterEffect(e2)
  end
  function s.destg1(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop1(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and Duel.Destroy(tc, REASON_EFFECT) > 0 and c:IsRelateToEffect(e) and Duel.GetMatchingGroupCount(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_SPELL) <= 3 then
  		Duel.BreakEffect()
  		Duel.SendtoGrave(c, REASON_EFFECT)
  	end
  end
  function s.cfilter(c)
  	return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
  end
  function s.descost2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  end
  function s.destg2(e, tp, eg, ep, ev, re, r, rp, chk)
  	local tc = e:GetHandler():GetBattleTarget()
  	if chk == 0 then
  		return tc and tc:IsControler(1 - tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, tc, 1, 0, 0)
  end
  function s.desop2(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetHandler():GetBattleTarget()
  	if tc:IsRelateToBattle() and tc:IsControler(1 - tp) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  