function c500310666.initial_effect(c) --cannot attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(c500310666.sumop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --special summon local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_SPSUMMON_PROC) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) e3:SetRange(LOCATION_HAND) e3:SetCondition(c500310666.spcon) e3:SetOperation(c500310666.operation) c:RegisterEffect(e3) --special summon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(500310666,0)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCost(c500310666.spcost) e4:SetTarget(c500310666.sptg) e4:SetOperation(c500310666.spop) c:RegisterEffect(e4) end function c500310666.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e1) end function c500310666.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c500310666.filter(c) return c:IsSetCard(0x85a) and c:IsAbleToHand() end function c500310666.indcon(e) return Duel.IsExistingMatchingCard(c500310666.tkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,nil) end function c500310666.tkfilter(c) return c:IsSetCard(0x85a) and c:IsType(TYPE_TOKEN) end function c500310666.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x85a) end function c500310666.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c500310666.filter,tp,LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c500310666.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c500310666.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(tp,500311666,0x55,0x4011,2000,0,3,RACE_PLANT,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0) end function c500310666.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(tp,500311666,0x55,0x4011,2000,0,3,RACE_PLANT,ATTRIBUTE_LIGHT) then for i=1,4 do local token=Duel.CreateToken(tp,500311666) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000) token:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UNRELEASABLE_SUM) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetValue(1) token:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_DESTROY) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetOperation(c500310666.desop) e3:SetReset(RESET_EVENT+0x1fe0000) token:RegisterEffect(e3,true) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e4:SetProperty(EFFECT_FLAG_UNCOPYABLE) e4:SetValue(1) e4:SetReset(RESET_EVENT+0x1fe0000) token:RegisterEffect(e4,true) --spsummon limit local e5=Effect.CreateEffect(e:GetHandler()) e5:SetType(EFFECT_TYPE_FIELD) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetTargetRange(1,0) e5:SetCondition(c500310666.indcon) e5:SetTarget(c500310666.sumlimit) e5:SetReset(RESET_EVENT+0x1fe0000) token:RegisterEffect(e5,true) end Duel.SpecialSummonComplete() end end