--Worm Necro function c213110.initial_effect(c) --extra summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(213110,0)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(c213110.nfilter)) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(213110,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,213110) e2:SetCondition(c213110.spcon) e2:SetTarget(c213110.sptg) e2:SetOperation(c213110.spop) c:RegisterEffect(e2) --flip local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213110,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCategory(CATEGORY_POSITION) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCountLimit(1,213111) e3:SetCode(EVENT_TO_GRAVE) e3:SetCondition(c213110.poscon) e3:SetTarget(c213110.postg) e3:SetOperation(c213110.posop) c:RegisterEffect(e3) end function c213110.nfilter(c) return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) end function c213110.cfilter(c) return c:IsFacedown() end function c213110.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c213110.cfilter,tp,LOCATION_MZONE,0,1,nil) end function c213110.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c213110.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function c213110.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function c213110.posfilter(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsCanChangePosition() end function c213110.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213110.posfilter,tp,LOCATION_MZONE,0,1,nil) end end function c213110.posop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectMatchingCard(tp,c213110.posfilter,tp,LOCATION_MZONE,0,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end end