mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* 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:
parent
3296f01330
commit
e5e1a5db40
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue