--Bigbang Core local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.TRUE,2,2,s.matcheck) --If this card is destroyed: You can Set 1 "Bigbang" Spell/Trap directly from your Deck. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) e1:SetCountLimit(1,{id,0}) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) --During your Main Phase: You can banish 1 monster in your GY, then target 1 monster you control; apply the following effect depending on the banished monster's Vibe, --also for the rest of this turn, you cannot banish monsters with the same Vibe to activate this effect of "Bigbang Core". --● Positive: it gains 800 ATK until the end of this turn. --● Negative: it gains 800 DEF until the end of this turn. --● Neutral: it gains 400 ATK/DEF until the end of this turn. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.adcost) e2:SetTarget(s.adtg) e2:SetOperation(s.adop) c:RegisterEffect(e2) end function s.matcheck(g,lc) return g:GetClassCount(Card.GetVibe)==g:GetCount() end function s.stfilter(c) return c:IsSetCard(0xbba) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK,0,1,nil) end end function s.setop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SSet(tp,g) end end function s.cfilter(c) return c:HasVibe() and c:IsAbleToRemoveAsCost() end function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) e:SetLabel(g:GetFirst():GetVibe()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local vb=e:GetLabel() if vb>1 then vb=-1 end local val=800 if vb==0 then val=400 end if tc:IsRelateToEffect(e) then if vb==0 or vb==1 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(val) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end if vb==0 or vb==-1 then local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(val) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e2) end end local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EFFECT_CANNOT_REMOVE) e3:SetTargetRange(1,0) e3:SetTarget(s.rmlimit) e3:SetLabel(e:GetLabel()) e3:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e3,tp) end function s.rmlimit(e,c,tp,r,re) local vb=e:GetLabel() if vb>1 then vb=-1 end return c:GetVibe()==vb and re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(id) and r==REASON_COST end