--Fairy Princess Of Dark Decay function c500311077.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),5,3,c500311077.ovfilter,aux.Stringid(500311077,0)) c:EnableReviveLimit() -- local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTarget(c500311077.tg1) e1:SetValue(800) c:RegisterEffect(e1) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c500311077.reptg) e2:SetValue(c500311077.repval) c:RegisterEffect(e2) end function c500311077.tg1(e,c) return c:IsRace(RACE_ZOMBIE) end function c500311077.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_ZOMBIE) end function c500311077.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(c500311077.repfilter,1,nil,tp) end if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(500311077,1)) then e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) local g=eg:Filter(c500311077.repfilter,nil,tp) if g:GetCount()==1 then e:SetLabelObject(g:GetFirst()) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local cg=g:Select(tp,1,1,nil) e:SetLabelObject(cg:GetFirst()) end return true else return false end end function c500311077.repval(e,c) return c==e:GetLabelObject() end function c500311077.ovfilter(c) local rk=c:GetRank() return c:IsFaceup() and (rk==4) end