From e989c05247d45bb447acc0a345cb133f3567dd08 Mon Sep 17 00:00:00 2001 From: Jeff Wadsworth Date: Mon, 15 Nov 2021 11:27:47 -0600 Subject: [PATCH] - Fixed #8455 --- Mage.Sets/src/mage/cards/c/ChandraHeartOfFire.java | 7 +++++-- .../common/ExileTopXMayPlayUntilEndOfTurnEffect.java | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/ChandraHeartOfFire.java b/Mage.Sets/src/mage/cards/c/ChandraHeartOfFire.java index 1356bb3de4..e1e8e11977 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraHeartOfFire.java +++ b/Mage.Sets/src/mage/cards/c/ChandraHeartOfFire.java @@ -31,6 +31,7 @@ import mage.target.targetpointer.FixedTargets; import java.util.HashSet; import java.util.Set; import java.util.UUID; +import mage.util.CardUtil; /** * @author htrajan @@ -104,7 +105,6 @@ class ChandraHeartOfFireUltimateEffect extends OneShotEffect { if (target.canChoose(source.getSourceId(), controller.getId(), game) && target.choose(Outcome.AIDontUseIt, controller.getId(), source.getSourceId(), game)) { Set cards = new CardsImpl(target.getTargets()).getCards(game); - controller.moveCards(cards, Zone.EXILED, source, game); exiledCards.addAll(cards); } @@ -113,9 +113,12 @@ class ChandraHeartOfFireUltimateEffect extends OneShotEffect { if (target.canChoose(source.getSourceId(), controller.getId(), game) && target.choose(Outcome.AIDontUseIt, controller.getId(), source.getSourceId(), game)) { Set cards = new CardsImpl(target.getTargets()).getCards(game); - controller.moveCards(cards, Zone.EXILED, source, game); exiledCards.addAll(cards); } + + // exile cards all at once and set the exile name to the source card + Card sourceCard = game.getCard(source.getSourceId()); + controller.moveCardsToExile(exiledCards, source, game, true, CardUtil.getExileZoneId(game, source), sourceCard.getName()); controller.shuffleLibrary(source, game); exiledCards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId()))); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTopXMayPlayUntilEndOfTurnEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTopXMayPlayUntilEndOfTurnEffect.java index 4143d866f0..1b91cc7ce9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileTopXMayPlayUntilEndOfTurnEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTopXMayPlayUntilEndOfTurnEffect.java @@ -58,7 +58,8 @@ public class ExileTopXMayPlayUntilEndOfTurnEffect extends OneShotEffect { if (cards.isEmpty()) { return true; } - controller.moveCardsToExile(cards, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceLogName(game, source)); + Card sourceCard = game.getCard(source.getSourceId()); + controller.moveCardsToExile(cards, source, game, true, CardUtil.getExileZoneId(game, source), sourceCard.getName()); // remove cards that could not be moved to exile cards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId()))); if (!cards.isEmpty()) {