--created by LeonDuvall, coded by Lyris --Skypiercer Airfield local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:HOPT(true) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_PIERCE) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3bb)) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(500) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetRange(LOCATION_FZONE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetCondition(s.con) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) local e5=e4:Clone() e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e5:SetValue(aux.indoval) c:RegisterEffect(e5) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_IGNITION) e6:SetRange(LOCATION_FZONE) e6:SetCountLimit(1) e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DECKDES) e6:SetCost(s.cost) e6:SetTarget(s.target) e6:SetOperation(s.operation) c:RegisterEffect(e6) end function s.filter(c) return c:IsFaceup() and c:IsSetCard(0x3bb) end function s.con(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.cfilter(c) return c:IsFaceupEx() and c:IsSetCard(0x3bb) end function s.cost(e,tp,_,_,_,_,_,_,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) Duel.SendtoGrave(Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil),REASON_COST+REASON_RETURN) end function s.target(e,tp,_,_,_,_,_,_,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.GetDecktopGroup(tp,3):IsExists(Card.IsAbleToHand,1,nil) end end function s.sfilter(c) return c:IsSetCard(0x3bb) and c:IsAbleToHand() end function s.operation(e,tp) if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end Duel.ConfirmDecktop(tp,3) local g=Duel.GetDecktopGroup(tp,3) if #g<1 then return end local tg=g:Filter(s.sfilter,nil) if #tg>0 then Duel.DisableShuffleCheck() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=tg:Select(tp,1,1,nil) if Duel.SendtoHand(sg,nil,REASON_EFFECT)<1 or not sg:GetFirst():IsLocation(LOCATION_HAND) then return end Duel.ConfirmCards(1-tp,sg) Duel.ShuffleHand(tp) Duel.SendtoGrave(g-sg,REASON_EFFECT+REASON_REVEAL) else Duel.ShuffleDeck(tp) end end