--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,81455788),1,aux.NOT(aux.FilterEqualFunction(Card.GetVibe,0)),1) aux.AddCodeList(c,81455788) aux.AddMaterialCodeList(c,81455788) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(2) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCategory(CATEGORY_DESTROY) e2:SetDescription(1124) e2:SetCost(s.cost) e2:SetTarget(s.tg) e2:SetOperation(s.op) c:RegisterEffect(e2) --If this card is Special Summoned: You can equip monsters from your GY to this card up to the number of "Cosmo'n" monsters in your GY with different Attributes. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_EQUIP) e2:SetCountLimit(1,{id,2}) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) end s.material_setcode=0xcf11 function s.costfilter(c,e,tp) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xcf11) and c:IsDiscardable() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,{c:GetCode()}) end function s.filter(c,e,tp,code) return c:IsSetCard(0xcf11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(table.unpack(code)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) if chk==0 then return true end end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=100 then return false end e:SetLabel(0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) e:SetLabel(g:GetFirst():GetCode()) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local dc=e:GetLabel() local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,{dc}) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end --also you cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Bigbang Monsters. local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) return not c:IsType(TYPE_BIGBANG) and c:IsLocation(LOCATION_EXTRA) end function s.df(c,e) return c:IsOnField() or c:IsDestructable(e) end function s.desfilter(c,e,tp) local ec=c:GetEquipTarget() return ec and ec:IsType(TYPE_BIGBANG) and c:IsDestructable(e,REASON_COST) and Duel.IsExistingMatchingCard(s.df,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,1,c,e) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Destroy(Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp),REASON_COST) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local l=e:GetLabel()==1 e:SetLabel(0) return l or Duel.IsExistingMatchingCard(s.df,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,1,nil,e) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD+LOCATION_HAND) end function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local tg=Duel.SelectMatchingCard(tp,s.df,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,1,1,nil,e) if #tg>0 then Duel.HintSelection(tg) Duel.Destroy(tg,REASON_EFFECT) end end function s.eqfilter(c,tp) return c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsType(TYPE_MONSTER) end function s.eqfilter2(c,tp) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xcf11) 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(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_GRAVE,0,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local lc=Duel.GetLocationCount(tp,LOCATION_SZONE) if lc<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end local g0=Duel.GetMatchingGroup(s.eqfilter2,tp,LOCATION_GRAVE,0,nil) local count=math.min(lc,g0:GetClassCount(Card.GetAttribute)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,count,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