Fixed targeting prevent effects

This commit is contained in:
magenoxx 2012-05-24 18:28:42 +04:00
parent f3598fd4db
commit 0890d6e57f
2 changed files with 3 additions and 3 deletions

View file

@ -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<PreventD
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, target, source.getId(), source.getControllerId(), damage));
} else {
if (event.getAmount() >= 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));

View file

@ -68,7 +68,7 @@ public class PreventDamageTargetEffect extends PreventionEffectImpl<PreventDamag
GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), event.getAmount(), false);
if (!game.replaceEvent(preventEvent)) {
if (event.getAmount() >= 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));