This commit is contained in:
Jeff Wadsworth 2021-11-15 11:27:47 -06:00
parent 867de97efb
commit e989c05247
2 changed files with 7 additions and 3 deletions

View file

@ -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<Card> 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<Card> 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())));

View file

@ -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()) {