From 0890d6e57f2ede92786b9d719361c0a1004d17ca Mon Sep 17 00:00:00 2001 From: magenoxx Date: Thu, 24 May 2012 18:28:42 +0400 Subject: [PATCH] Fixed targeting prevent effects --- .../effects/common/PreventDamageFromTargetEffect.java | 4 ++-- .../abilities/effects/common/PreventDamageTargetEffect.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageFromTargetEffect.java b/Mage/src/mage/abilities/effects/common/PreventDamageFromTargetEffect.java index f99ef70ed1..ce0fbf4191 100644 --- a/Mage/src/mage/abilities/effects/common/PreventDamageFromTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventDamageFromTargetEffect.java @@ -30,13 +30,13 @@ package mage.abilities.effects.common; import mage.Constants.Duration; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.effects.PreventionEffectImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.target.Target; import java.util.UUID; -import mage.abilities.Mode; /** * @author nantuko @@ -94,7 +94,7 @@ public class PreventDamageFromTargetEffect extends PreventionEffectImpl= this.amount) { - int damage = event.getAmount(); + int damage = amount; event.setAmount(event.getAmount() - amount); this.used = true; game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, target, source.getId(), source.getControllerId(), damage)); diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageTargetEffect.java b/Mage/src/mage/abilities/effects/common/PreventDamageTargetEffect.java index 98e0cd2e86..07a959a771 100644 --- a/Mage/src/mage/abilities/effects/common/PreventDamageTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventDamageTargetEffect.java @@ -68,7 +68,7 @@ public class PreventDamageTargetEffect extends PreventionEffectImpl= this.amount) { - int damage = event.getAmount(); + int damage = amount; event.setAmount(event.getAmount() - amount); this.used = true; game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), damage));