Commit 6eaf68bb authored by mercury233's avatar mercury233 Committed by DailyShana

fix Memory of an Adversary (#559)

parent a5364154
...@@ -14,15 +14,14 @@ function c60080151.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,15 +14,14 @@ function c60080151.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() return tp~=Duel.GetTurnPlayer()
end end
function c60080151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60080151.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chk==0 then return tg:IsOnField() and tg:IsAbleToRemove() end if chk==0 then return tc:IsOnField() and tc:IsAbleToRemove() end
local dam=tg:GetAttack() Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,tc:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0)
end end
function c60080151.activate(e,tp,eg,ep,ev,re,r,rp) function c60080151.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then if tc and tc:IsAttackable() and tc:IsOnField() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
local dam=tc:GetAttack() local dam=tc:GetAttack()
if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -45,5 +44,6 @@ function c60080151.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,5 +44,6 @@ function c60080151.spcon(e,tp,eg,ep,ev,re,r,rp)
and tc:GetFlagEffect(60080151)~=0 and tc:GetReasonEffect():GetHandler()==e:GetHandler() and tc:GetFlagEffect(60080151)~=0 and tc:GetReasonEffect():GetHandler()==e:GetHandler()
end end
function c60080151.spop(e,tp,eg,ep,ev,re,r,rp) function c60080151.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60080151)
Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEUP)
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment