--Mysterious Toad function c53313921.initial_effect(c) --If you control a level 6 or lower "Mysterious" monster, You can Special Summon this card (from your Hand). You can only Special Summon "Mysterious Toad" Once per turn this way. local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetProperty(EFFECT_FLAG_UNCOPYABLE) e0:SetRange(LOCATION_HAND) e0:SetCountLimit(1,53313921) e0:SetCondition(c53313921.spcon) c:RegisterEffect(e0) --This card gains 400 ATK and DEF for each Pandemonium monster in your GY, face-up Extra Deck or that is banished. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(c53313921.atkval) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) --When this card is destroyed: You can Special Summon 1 level 4 or lower "Mysterious" monster from your Deck, but its effects are negated. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetTarget(c53313921.sptg) e3:SetOperation(c53313921.spop) c:RegisterEffect(e3) end function c53313921.cfilter(c) return c:IsFaceup() and c:IsLevelBelow(6) and c:IsSetCard(0xcf6) end function c53313921.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c53313921.cfilter,tp,LOCATION_MZONE,0,1,nil) end function c53313921.atkfilter(c) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_PANDEMONIUM) end function c53313921.atkval(e,c) return Duel.GetMatchingGroupCount(c53313921.atkfilter,c:GetControler(),0x70,0,nil)*400 end function c53313921.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsSetCard(0xcf6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c53313921.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c53313921.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c53313921.spop(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,c53313921.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end