mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge branch 'master' of https://github.com/JRHerlehy/mage
This commit is contained in:
commit
d39f60ae42
1 changed files with 7 additions and 1 deletions
|
@ -83,6 +83,10 @@ public class RiftmarkedKnight extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
class RiftmarkedKnightTriggeredAbility extends TriggeredAbilityImpl {
|
class RiftmarkedKnightTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
/* We want this to only trigger once due to edge cases allowing it to fire multiple times
|
||||||
|
* if more counters are removed than remain on the suspended card. */
|
||||||
|
private boolean eventTriggered = false;
|
||||||
|
|
||||||
public RiftmarkedKnightTriggeredAbility() { super(Zone.EXILED, new CreateTokenEffect(new RiftmarkedKnightToken()), false); }
|
public RiftmarkedKnightTriggeredAbility() { super(Zone.EXILED, new CreateTokenEffect(new RiftmarkedKnightToken()), false); }
|
||||||
|
|
||||||
public RiftmarkedKnightTriggeredAbility(final RiftmarkedKnightTriggeredAbility ability) { super(ability); }
|
public RiftmarkedKnightTriggeredAbility(final RiftmarkedKnightTriggeredAbility ability) { super(ability); }
|
||||||
|
@ -96,7 +100,9 @@ class RiftmarkedKnightTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
boolean trigger = false;
|
boolean trigger = false;
|
||||||
|
|
||||||
if (game.getCard(event.getTargetId()).getCounters(game).getCount(CounterType.TIME) == 0) {
|
if (event.getTargetId().equals(this.getSourceId()) && !eventTriggered &&
|
||||||
|
game.getCard(event.getTargetId()).getCounters(game).getCount(CounterType.TIME) == 0) {
|
||||||
|
eventTriggered = true;
|
||||||
trigger = true;
|
trigger = true;
|
||||||
}
|
}
|
||||||
return trigger;
|
return trigger;
|
||||||
|
|
Loading…
Reference in a new issue