--created by LeonDuvall, coded by Lyris --Skypiercer BF-109 local s,id,o=GetID() function s.initial_effect(c) local e1 = Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(1) e1:SetCondition(function() return c:IsStatus(STATUS_SPSUMMON_TURN) end) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCondition(s.spcon) e2:SetOperation(s.spop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCountLimit(2, id) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end function s.cfilter(c) return c:IsSetCard(0x3bb) and c:IsDiscardable() end function s.spcon(e, c) if c==nil then return true end local tp=c:GetControler() return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_HAND, 0, 1, c) end function s.spop(e, tp, eg, ep, ev, re, r, rp, c) Duel.DiscardHand(tp, s.cfilter, 1, 1, REASON_DISCARD+REASON_COST, c) end function s.filter(c) return c:IsSetCard(0x3bb) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e, tp) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND) local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil) Duel.SendtoHand(g, nil, REASON_EFFECT) Duel.ConfirmCards(1-tp, g) end