From f7c322ade665f235ae9238d7eaa56fd0dc1758d0 Mon Sep 17 00:00:00 2001 From: JRHerlehy Date: Mon, 21 Nov 2016 01:08:00 -0800 Subject: [PATCH] Corrections to Riftmarked Knight Made ability only place a single token on the battlefield and only trigger if the card getting its final counter removed is Riftmarked Knight. --- Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java b/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java index 86b5935fcb..b54953be67 100644 --- a/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java +++ b/Mage.Sets/src/mage/cards/r/RiftmarkedKnight.java @@ -83,6 +83,10 @@ public class RiftmarkedKnight extends CardImpl { } 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(final RiftmarkedKnightTriggeredAbility ability) { super(ability); } @@ -96,7 +100,9 @@ class RiftmarkedKnightTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { 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; } return trigger;