mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fix to trigger
This commit is contained in:
parent
e1f0a42fe8
commit
8b415e2296
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ package mage.abilities.common;
|
||||||
import mage.Constants;
|
import mage.Constants;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
@ -32,8 +33,8 @@ public class DiesAndDealtDamageThisTurnTriggeredAbility extends TriggeredAbility
|
||||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.getFromZone() == Constants.Zone.BATTLEFIELD && zEvent.getToZone() == Constants.Zone.GRAVEYARD) {
|
if (zEvent.getFromZone() == Constants.Zone.BATTLEFIELD && zEvent.getToZone() == Constants.Zone.GRAVEYARD) {
|
||||||
Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD);
|
Card card = game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD);
|
||||||
if (p.getDealtDamageByThisTurn().contains(this.sourceId)) {
|
if (card instanceof Permanent && ((Permanent)card).getDealtDamageByThisTurn().contains(this.sourceId)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue