name: Sky
card_text: 1 non-EARTH "Sky Striker Ace" monster
  If this card is Special Summoned: You can target 1 face-up monster your opponent controls; it cannot attack until the end of your opponent's turn. Each time you activate a "Sky Striker" Spell Card, or its effect, gain 100 LP immediately after the card or effect resolves. You can only Special Summon "Sky Striker Ace - Kaina(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 limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetTarget(s.atktg)
  	e1:SetOperation(s.atkop)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(aux.chainreg)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetCode(EVENT_CHAIN_SOLVED)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.reccon)
  	e3:SetOperation(s.recop)
  	c:RegisterEffect(e3)
  end
  function s.matfilter(c)
  	return c:IsLinkSetCard(SETCARD_ID_1) and c:IsLinkAttribute(ATTRIBUTE_ALL & ~ATTRIBUTE_EARTH)
  end
  function s.atktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, Card.IsFaceup, tp, 0, LOCATION_MZONE, 1, 1, nil)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CANNOT_ATTACK)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.reccon(e, tp, eg, ep, ev, re, r, rp)
  	return re and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(SETCARD_ID_1) and rp == tp and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING) > 0
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Recover(tp, 100, REASON_EFFECT)
  end
  
  
source_text: Sky
  1 non-EARTH "Sky Striker Ace" monster
  If this card is Special Summoned: You can target 1 face-up monster your opponent controls; it cannot attack until the end of your opponent's turn. Each time you activate a "Sky Striker" Spell Card, or its effect, gain 100 LP immediately after the card or effect resolves. You can only Special Summon "Sky Striker Ace - Kaina(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 limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetTarget(s.atktg)
  	e1:SetOperation(s.atkop)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(aux.chainreg)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetCode(EVENT_CHAIN_SOLVED)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.reccon)
  	e3:SetOperation(s.recop)
  	c:RegisterEffect(e3)
  end
  function s.matfilter(c)
  	return c:IsLinkSetCard(SETCARD_ID_1) and c:IsLinkAttribute(ATTRIBUTE_ALL & ~ATTRIBUTE_EARTH)
  end
  function s.atktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, Card.IsFaceup, tp, 0, LOCATION_MZONE, 1, 1, nil)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CANNOT_ATTACK)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.reccon(e, tp, eg, ep, ev, re, r, rp)
  	return re and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(SETCARD_ID_1) and rp == tp and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING) > 0
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Recover(tp, 100, REASON_EFFECT)
  end
  
  