--Pharaohnic Papyrus of Spite local id,cod=23251030,c23251030 function cod.initial_effect(c) --Activate --[[ local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(cod.target1) e1:SetOperation(cod.activate) c:RegisterEffect(e1)]]-- --Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_ACTIVATE) -- e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCondition(cod.condition) e2:SetTarget(cod.target2) e2:SetOperation(cod.activate) c:RegisterEffect(e2) --Destroy local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCondition(cod.descon) e3:SetOperation(cod.desop) c:RegisterEffect(e3) end function cod.mfilter(c) return c:IsSetCard(0xd3e) and c:IsType(TYPE_MONSTER) end function cod.condition(e,tp,eg,ep,ev,re,r,rp) return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(cod.mfilter,tp,LOCATION_GRAVE,0,1,nil) end --[[function cod.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() if chkc then return chkc==tg end if chk==0 then return true end if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() and tg:IsOnField() and tg:IsCanBeEffectTarget(e) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.SetTargetCard(tg) else e:SetProperty(0) end end]]-- function cod.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() if chkc then return chkc==tg end if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and tg:IsOnField() and tg:IsCanBeEffectTarget(e) end Duel.SetTargetCard(tg) end function cod.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then c:SetCardTarget(tc) Duel.SpecialSummonComplete() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCondition(cod.cpcon) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetCondition(cod.cpcon) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(cod.damcon) e3:SetTarget(cod.damtg) e3:SetLabel(tc:GetLevel()*100) e3:SetOperation(cod.damop) Duel.RegisterEffect(e3,tp) end end function cod.cpcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end function cod.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end local tc=c:GetFirstCardTarget() return tc and eg:IsContains(tc) end function cod.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function cod.distg(e,c) return e:GetHandler():IsHasCardTarget(c) end function cod.damcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFirstCardTarget()~=nil end function cod.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,e:GetLabel()) end function cod.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end