--Pharaohnic Revenant local id,cod=23251016,c23251016 function cod.initial_effect(c) --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(cod.spcon) e1:SetTarget(cod.sptg) e1:SetOperation(cod.spop) c:RegisterEffect(e1) end function cod.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_RELEASE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount() end function cod.cfilter(c) return c:IsSetCard(0xd3e) and c:IsType(TYPE_MONSTER) end function cod.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cod.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function cod.spop(e,tp,eg,ep,ev,re,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cod.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end