--Stellarius Myriad of Divinity local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) --fusion material c:EnableReviveLimit() --spsummon limit local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(s.splimit) c:RegisterEffect(e0) --atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.val) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) --Add Attributes local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetTarget(s.atttg) e3:SetOperation(s.attop) c:RegisterEffect(e3) --Send local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TOGRAVE) e4:SetDescription(aux.Stringid(id,1)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCost(s.secost) e4:SetTarget(s.setg) e4:SetOperation(s.seop) c:RegisterEffect(e4) --Destroy local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_DESTROY) e5:SetDescription(aux.Stringid(id,2)) e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetCode(EVENT_FREE_CHAIN) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCost(s.secost) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5) end s.listed_names={0x12D9} s.material_setcode={0x12D9} function s.splimit(e,se,sp,st) return se:GetHandler():IsCode(997697) or se:GetHandler():IsCode(997699) end function s.val(e,c) return c:GetEquipCount()*500 end function s.attfilter(c,att) return c:IsFaceup() and c:IsSetCard(0x12D9) end function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and attfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.attfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.attfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) end function s.attop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_ATTRIBUTE) e1:SetValue(ATTRIBUTE_DARK) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetValue(ATTRIBUTE_LIGHT) tc:RegisterEffect(e2) local e3=e1:Clone() e3:SetCode(ATTRIBUTE_EARTH) tc:RegisterEffect(e3) local e4=e1:Clone() e4:SetCode(ATTRIBUTE_WATER) tc:RegisterEffect(e4) local e5=e1:Clone() e5:SetCode(ATTRIBUTE_FIRE) tc:RegisterEffect(e5) local e6=e1:Clone() e6:SetCode(ATTRIBUTE_WIND) tc:RegisterEffect(e6) end end function s.costfilter(c,ec) return c:IsFaceup() and Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_SZONE,0,1,nil,ec,e:GetHandler()) end function s.costfilter2(c,ec) return c:IsFaceup() and c:GetEquipTarget()==ec and c:GetOriginalType(TYPE_TRAP) end function s.cfilter(c,ft,tp) return c:IsDestructable() and c:IsFaceup() and c:IsLocation(LOCATION_SZONE) end function s.secost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,0,1,1,nil) Duel.Destroy(g,REASON_COST) end function s.setg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) end function s.seop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) 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_TOGRAVE) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end