--Zephyrion, the Cyclone Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.NOT(Card.IsNeutral),2) --If this card is Bigbang Summoned: You can target 1 card on the field; place it to the bottom of the Deck. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.tdcon1) e1:SetTarget(s.tdtg1) e1:SetOperation(s.tdop1) c:RegisterEffect(e1) --When an attack is declared involving this card: You can target 1 card on the field; shuffle it into the Deck. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.tdcon2) e2:SetTarget(s.tdtg1) e2:SetOperation(s.tdop2) c:RegisterEffect(e2) --If this card would be destroyed by battle or card effect, you can place 1 card from your hand to the top of the Deck instead. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,2}) e3:SetCode(EFFECT_DESTROY_REPLACE) e3:SetTarget(s.reptg) c:RegisterEffect(e3) end function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) end function s.tdop1(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsAbleToDeck() then Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end function s.tdcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) end function s.tdop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsAbleToDeck() then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end if Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,0)) then local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) if sg:GetCount()>0 then Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) end return true else return false end end