--Creation Cosmotron --created by Meedogh, coded by Lyris local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.FilterBoolFunction(Card.IsCode,81450658),1,aux.NOT(aux.FilterEqualFunction(Card.GetVibe,0)),1) aux.AddCodeList(c,81450658) aux.AddMaterialCodeList(c,81450658) --If this card is Special Summoned: You can equip up to 3 Level 4 or lower monsters from your hand or GY to this card. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCategory(CATEGORY_EQUIP) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) --Bigbang Monsters you control gain 200 ATK/DEF for each Equip Card you control. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_BIGBANG)) e2:SetValue(s.atkval) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) --(Quick Effect): You can destroy 1 card in your Spell & Trap Zone, and if you do, equip 1 monster your opponent controls to this card. local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_EQUIP+CATEGORY_DESTROY) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,id) e4:SetTarget(s.eqtg) e4:SetOperation(s.eqop) c:RegisterEffect(e4) --If this card is destroyed: You can Special Summon 1 Level 4 or lower monster from your hand or GY, --or if this card was destroyed by an opponent's card (by battle or card effect), you can Special Summon it from your Deck instead. local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetProperty(EFFECT_FLAG_DELAY) e5:SetCode(EVENT_DESTROYED) e5:SetCountLimit(1,{id,1}) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) c:RegisterEffect(e5) end s.material_setcode=0xcf11 function s.filter(c,tp) return c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsLevelBelow(4) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,3,nil,tp) for tc in aux.Next(g) do if Duel.Equip(tp,tc,c) then local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(s.eqlimit) tc:RegisterEffect(e1) end end end function s.eqlimit(e,c) return e:GetOwner()==c end function s.atkval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_EQUIP),e:GetHandlerPlayer(),LOCATION_SZONE,0,nil)*200 end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAbleToChangeControler,Card.IsType),tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_MZONE) end function s.eqlimit(e,c) return e:GetOwner()==c end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_SZONE,0,1,1,nil) if #g>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAbleToChangeControler,Card.IsType),tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) then Duel.HintSelection(g) if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAbleToChangeControler,Card.IsType),tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAbleToChangeControler,Card.IsType),tp,0,LOCATION_MZONE,1,1,nil,TYPE_MONSTER) local tc=g:GetFirst() if tc and tc:IsControler(1-tp) then if not Duel.Equip(tp,tc,c,false) then return end tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) 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:SetValue(s.eqlimit) tc:RegisterEffect(e1) end end end end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local sd=((rp==1-tp) or (r&REASON_BATTLE)>0) local location=LOCATION_HAND+LOCATION_GRAVE if sd then location=LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,location) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() local sd=((rp==1-tp) or (r&REASON_BATTLE)>0) local location=LOCATION_HAND+LOCATION_GRAVE if sd then location=LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,location,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end