--E.V.A Mother function c212110.initial_effect(c) --spsummon proc local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c212110.spcon) c:RegisterEffect(e1) --tksummon local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(212110,0)) e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetRange(LOCATION_MZONE) e5:SetCode(EVENT_PHASE+PHASE_END) e5:SetCountLimit(1,212110) e5:SetTarget(c212110.sptg) e5:SetOperation(c212110.spop) c:RegisterEffect(e5) --special summon local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(212110,1)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetProperty(EFFECT_FLAG_DELAY) e6:SetCountLimit(1,212111) e6:SetCode(EVENT_DESTROYED) e6:SetCondition(c212110.spcon2) e6:SetTarget(c212110.sptg2) e6:SetOperation(c212110.spop2) c:RegisterEffect(e6) end c212110.lvupcount=1 c212110.lvup={212115} function c212110.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c212110.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,212100,0x258,0x4011,800,800,1,RACE_FAIRY,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) end function c212110.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,212100,0x258,0x4011,800,800,1,RACE_FAIRY,ATTRIBUTE_DARK) then return end local token=Duel.CreateToken(tp,212100) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end function c212110.spcon2(e,tp,eg,ep,ev,re,r,rp) return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 end function c212110.spfilter(c,e,tp) return c:IsCode(212115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c212110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c212110.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) end function c212110.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c212110.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end