--Supernova-Eyes Bigbang Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.FilterEqualFunction(Card.GetVibe,0),1,1,aux.FilterEqualFunction(Card.GetVibe,1),1,1,aux.FilterEqualFunction(Card.GetVibe,-1),1,1) --When a card or effect is activated (Quick Effect): You can destroy 1 other card you control of the same type (Monster, Spell or Trap), and if you do, negate the activation, and if you do that, destroy that card. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.ngcon) e1:SetTarget(s.ngtg) e1:SetOperation(s.ngop) c:RegisterEffect(e1) --During the End Phase if this card is in your GY because it was destroyed on the field and sent there this turn: Destroy all cards you control, and if you do, Special Summon this card local reg1=Effect.CreateEffect(c) reg1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) reg1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) reg1:SetCode(EVENT_TO_GRAVE) reg1:SetCondition(s.regcon) reg1:SetOperation(s.regop) c:RegisterEffect(reg1) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.cfilter(c,rtype) return c:IsType(rtype) end function s.ngcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local rtype=(re:GetActiveType()&0x7) local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,c,rtype) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,c,rtype) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,rg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,re,1,0,0) end end function s.ngop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rtype=(re:GetActiveType()&0x7) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,rtype) if Duel.Destroy(g,REASON_EFFECT)>0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) and (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end--Duel.GetLocationCount(tp,LOCATION_MZONE)>0 --and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil) if Duel.Destroy(dg,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then --but banish it when it leaves the field. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end end