From dc693e645aa644727c5b20596218f0fabfb341a1 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Sat, 9 Feb 2019 21:57:45 -0600 Subject: [PATCH] - Fixed #5584 and #5582 --- Mage.Sets/src/mage/cards/d/DomriChaosBringer.java | 12 +++++++++--- Mage.Sets/src/mage/cards/e/Endure.java | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java index d05415185a..ed75b4de9e 100644 --- a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java +++ b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java @@ -96,7 +96,7 @@ class DomriChaosBringerEffect extends OneShotEffect { } else { manaEffect = new BasicManaEffect(Mana.GreenMana(1)); } - game.addDelayedTriggeredAbility(new DomriChaosBringerTriggeredAbility(source.getSourceId()), source); + game.addDelayedTriggeredAbility(new DomriChaosBringerTriggeredAbility(source.getSourceId(), game.getTurnNum()), source); return manaEffect.apply(game, source); } } @@ -104,16 +104,19 @@ class DomriChaosBringerEffect extends OneShotEffect { class DomriChaosBringerTriggeredAbility extends DelayedTriggeredAbility { private final UUID spellId; + private final int turnNumber; - DomriChaosBringerTriggeredAbility(UUID spellId) { - super(null, Duration.EndOfStep, true); + DomriChaosBringerTriggeredAbility(UUID spellId, int turnNumber) { + super(null, Duration.Custom, true); this.spellId = spellId; + this.turnNumber = turnNumber; this.usesStack = false; } private DomriChaosBringerTriggeredAbility(final DomriChaosBringerTriggeredAbility ability) { super(ability); this.spellId = ability.spellId; + this.turnNumber = ability.turnNumber; } @Override @@ -126,6 +129,9 @@ class DomriChaosBringerTriggeredAbility extends DelayedTriggeredAbility { if (!event.getSourceId().equals(spellId)) { return false; } + if (game.getTurnNum() != turnNumber) { + return false; + } MageObject mo = game.getObject(event.getTargetId()); if (mo == null || !mo.isCreature()) { return false; diff --git a/Mage.Sets/src/mage/cards/e/Endure.java b/Mage.Sets/src/mage/cards/e/Endure.java index e810f0289d..80c3866cb4 100644 --- a/Mage.Sets/src/mage/cards/e/Endure.java +++ b/Mage.Sets/src/mage/cards/e/Endure.java @@ -8,7 +8,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; -import mage.filter.common.FilterPermanentOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; import mage.filter.predicate.other.PlayerPredicate; import mage.filter.predicate.permanent.ControllerPredicate; @@ -18,10 +18,10 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public final class Endure extends CardImpl { - private static final FilterPermanentOrPlayer filter = new FilterPermanentOrPlayer("you and permanents you control"); + private static final FilterCreaturePlayerOrPlaneswalker filter = new FilterCreaturePlayerOrPlaneswalker("you and permanents you control"); static { - filter.getPermanentFilter().add(new ControllerPredicate(TargetController.YOU)); + filter.getCreatureFilter().add(new ControllerPredicate(TargetController.YOU)); filter.getPlayerFilter().add(new PlayerPredicate(TargetController.YOU)); }