--Cosmicturbo Dragon local s,id,o=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,s.matfilter,1,1,aux.NOT(Card.IsNeutral),1) aux.AddCodeList(c,52401237) --if this card is Bigbang Summoned: You can target monsters on the field and/or GYs, up to the number of Bigbang Monsters used as Bigbang Material for this card; Equip them to this card. local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.matcheck) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetLabelObject(e0) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) --Gains 500 ATK/DEF for each Equip Card you control. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.atkval) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) --While this card is equipped with "Cosmicburst Dragon" it is unaffected by your opponen's activated effects. local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.imcon) e4:SetValue(s.efilter) c:RegisterEffect(e4) --if a card(s) you control leaves the field by an opponent's card while you control this monster: You can destroy 1 card on the field. local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_DESTROY) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetProperty(EFFECT_FLAG_DELAY) e5:SetCode(EVENT_LEAVE_FIELD) e5:SetRange(LOCATION_MZONE) e5:SetCondition(s.descon) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5) end function s.matfilter(c) return c:IsNeutral() and c:IsType(TYPE_BIGBANG) end function s.matcheck(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_BIGBANG)) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.eqfilter(c,tp) return c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.eqfilter(chkc,tp) end local mc=e:GetLabelObject():GetLabel() if chk==0 then return mc>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,mc,e:GetHandler(),tp) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,#g,0,0) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsFaceup() or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) local tc=sg:GetFirst() while tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 do if Duel.Equip(tp,tc,c,false) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetLabelObject(c) e1:SetValue(s.eqlimit) tc:RegisterEffect(e1) end tc=sg:GetNext() end end function s.eqlimit(e,c) return e:GetOwner()==e:GetLabelObject() end function s.atkval(e,c) local tp=c:GetControler() return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_EQUIP),tp,LOCATION_SZONE,0,nil)*500 end function s.imcon(e) g=e:GetHandler():GetEquipGroup() tg=g:Filter(Card.IsCode,nil,52401237) return #tg>0 end function s.efilter(e,re) return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() end function s.cfilter(c,tp) return c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if chk==0 then return g:GetCount()>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end