fixed various instances of getting source name (fixes #8531, fixes #8528)

This commit is contained in:
Evan Kranzler 2021-12-24 19:30:31 -05:00
parent 8791f30b4a
commit a6fcaab698
29 changed files with 54 additions and 94 deletions

View file

@ -58,8 +58,7 @@ public class ExileTopXMayPlayUntilEndOfTurnEffect extends OneShotEffect {
if (cards.isEmpty()) {
return true;
}
Card sourceCard = game.getCard(source.getSourceId());
controller.moveCardsToExile(cards, source, game, true, CardUtil.getExileZoneId(game, source), sourceCard.getName());
controller.moveCardsToExile(cards, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
// remove cards that could not be moved to exile
cards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId())));
if (!cards.isEmpty()) {