--Bigbang Turbo local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.FilterEqualFunction(Card.GetVibe,1),1,1,aux.FilterEqualFunction(Card.GetVibe,-1),1,1) --During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Bigbang Summon using this card you control. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) --A Bigbang Monster that was Summoned using this card as Material gains this effect. ● If it is Bigbang Summoned: Draw 1 card. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BE_MATERIAL) e2:SetCondition(s.efcon) e2:SetOperation(s.efop) c:RegisterEffect(e2) end function s.bbfilter(c,e,tp,mg) if not c:IsType(TYPE_BIGBANG) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_BIGBANG,tp,false,false) or Duel.GetLocationCountFromEx(tp,tp,mg,c)<=0 then return false end local et=global_card_effect_table[c] for _,e in ipairs(et) do if e:GetCode()==EFFECT_SPSUMMON_PROC then local ev=e:GetValue() local ec=e:GetCondition() if ev and (aux.GetValueType(ev)=="function" and ev(ef,c)&340==340 or ev&340==340) and (not ec or ec(e,c,mg)) then return true end end end return false end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil) return #mg>0 and Duel.IsExistingMatchingCard(s.bbfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil) if #mg<=0 then return end local g=Duel.GetMatchingGroup(s.bbfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg) if g:GetCount()>0 then local eid=e:GetFieldID() for tc in aux.Next(mg) do tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE,1,eid) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BE_BIGBANG_MATERIAL) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) e1:SetTargetRange(0xff,0xff) e1:SetTarget(s.limitmat) e1:SetLabel(eid) e1:SetValue(1) bigbang_limit_mats_operation = e1 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummonRule(tp,sg:GetFirst()) if Duel.SetSummonCancelable then Duel.SetSummonCancelable(false) end end end function s.limitmat(e,c) return c:GetFlagEffect(id)<=0 or c:GetFlagEffectLabel(id)~=e:GetLabel() end function s.efcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SPSUMMON --for some reason it returns REASON_SPSUMMON instead of REASON_BIGBANG end function s.efop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() local e1=Effect.CreateEffect(rc) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.drcon) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) e1:SetReset(RESET_EVENT+RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) e2:SetReset(RESET_EVENT+RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+340) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end