Fix multiple cards not saying which revealed cards were chosen to put into hand. Closes #9949

This commit is contained in:
PurpleCrowbar 2023-03-12 22:01:11 +00:00
parent e2271d79fb
commit 03b82ff7ee
10 changed files with 36 additions and 10 deletions

View file

@ -908,6 +908,17 @@ public interface Player extends MageItem, Copyable<Player> {
*/
boolean moveCardToHandWithInfo(Card card, Ability source, Game game, boolean withName);
/**
* Iterates through a set of cards and runs moveCardToHandWithInfo on each item
*
* @param cards
* @param source
* @param game
* @param withName show the card names in the log
* @return
*/
boolean moveCardsToHandWithInfo(Cards cards, Ability source, Game game, boolean withName);
/**
* Uses card.moveToExile and posts a inform message about moving the card to
* exile into the game log. Don't use this in replacement effects, because

View file

@ -4642,6 +4642,15 @@ public abstract class PlayerImpl implements Player, Serializable {
return result;
}
@Override
public boolean moveCardsToHandWithInfo(Cards cards, Ability source, Game game, boolean withName) {
Player player = this;
for (Card card : cards.getCards(game)) {
player.moveCardToHandWithInfo(card, source, game, withName);
}
return true;
}
@Override
public boolean moveCardToHandWithInfo(Card card, Ability source, Game game, boolean withName) {
boolean result = false;