* Fixed attack triggered ability. That could also trigger if the attack was undone before (e.g. Geist of Saint Traft).

This commit is contained in:
LevelX2 2014-10-31 16:36:41 +01:00
parent 3296f01330
commit e5e1a5db40

View file

@ -28,9 +28,9 @@
package mage.abilities.common; package mage.abilities.common;
import mage.constants.Zone;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -59,7 +59,8 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) { if (event.getType() == EventType.DECLARED_ATTACKERS
&& game.getCombat().getAttackers().contains(this.getSourceId()) ) {
return true; return true;
} }
return false; return false;
@ -78,5 +79,4 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
return new AttacksTriggeredAbility(this); return new AttacksTriggeredAbility(this);
} }
} }