--created by Meedogh, coded by Lyris local s,id=GetID() function s.initial_effect(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e0:SetCode(EVENT_SUMMON_SUCCESS) e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetTarget(s.tg) e0:SetOperation(s.op) c:RegisterEffect(e0) local e1=e0:Clone() e1:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e1) local e2=e0:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BE_MATERIAL) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_TOHAND) e3:SetCondition(function(e,tp,eg,ep,ev,re,r) return r==REASON_BIGBANG end) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end function s.filter(c,e,tp) return c:IsLevelBelow(3) and c:IsSetCard(0xcf11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.op(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.thfilter(c) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xcf11) 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) Duel.SetOperationInfo(0,CATEGORY_TOHAND,Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil),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) Duel.ConfirmCards(1-tp,tc) end end