mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fix multiple cards not saying which revealed cards were chosen to put into hand. Closes #9949
This commit is contained in:
parent
e2271d79fb
commit
03b82ff7ee
10 changed files with 36 additions and 10 deletions
|
@ -89,8 +89,7 @@ class AtraxaGrandUnifierEffect extends OneShotEffect {
|
|||
TargetCard target = new AtraxaGrandUnifierTarget();
|
||||
player.choose(outcome, cards, target, game);
|
||||
Cards toHand = new CardsImpl(target.getTargets());
|
||||
player.revealCards(source, toHand, game);
|
||||
player.moveCards(toHand, Zone.HAND, source, game);
|
||||
player.moveCardsToHandWithInfo(toHand, source, game, true);
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
|
|
|
@ -84,7 +84,7 @@ class BountyOfSkemfarEffect extends OneShotEffect {
|
|||
player.choose(outcome, cards, target, game);
|
||||
Card elf = cards.get(target.getFirstTarget(), game);
|
||||
if (elf != null) {
|
||||
player.moveCards(elf, Zone.HAND, source, game);
|
||||
player.moveCardToHandWithInfo(elf, source, game, true);
|
||||
}
|
||||
cards.removeIf(uuid -> game.getState().getZone(uuid) != Zone.LIBRARY);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
|
|
|
@ -94,7 +94,7 @@ class HurkylMasterWizardEffect extends OneShotEffect {
|
|||
TargetCard target = new HurkylMasterWizardTarget(source, game);
|
||||
player.choose(outcome, cards, target, game);
|
||||
Cards toHand = new CardsImpl(target.getTargets());
|
||||
player.moveCards(toHand, Zone.HAND, source, game);
|
||||
player.moveCardsToHandWithInfo(toHand, source, game, true);
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
|
|
|
@ -78,7 +78,7 @@ class InscribedTabletEffect extends OneShotEffect {
|
|||
Card land = game.getCard(target.getFirstTarget());
|
||||
if (land != null) {
|
||||
cards.remove(land);
|
||||
landToHand = controller.moveCards(land, Zone.HAND, source, game);
|
||||
landToHand = controller.moveCardToHandWithInfo(land, source, game, true);
|
||||
}
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
|
|
|
@ -86,10 +86,7 @@ class NivMizzetRebornEffect extends OneShotEffect {
|
|||
TargetCard target = new NivMizzetRebornTarget();
|
||||
player.choose(outcome, cards, target, game);
|
||||
Cards toHand = new CardsImpl(target.getTargets());
|
||||
player.moveCards(toHand, Zone.HAND, source, game);
|
||||
game.informPlayers(player.getLogName() + " moves " + CardUtil.concatWithAnd(
|
||||
toHand.getCards(game).stream().map(MageObject::getName).collect(Collectors.toList())
|
||||
) + " to hand");
|
||||
player.moveCardsToHandWithInfo(toHand, source, game, true);
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
|
|
|
@ -95,7 +95,7 @@ class TajuruParagonEffect extends OneShotEffect {
|
|||
player.choose(outcome, cards, target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.moveCards(card, Zone.HAND, source, game);
|
||||
player.moveCardToHandWithInfo(card, source, game, true);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3813,6 +3813,11 @@ public class TestPlayer implements Player {
|
|||
return computerPlayer.moveCardToHandWithInfo(card, source, game, withName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardsToHandWithInfo(Cards cards, Ability source, Game game, boolean withName) {
|
||||
return computerPlayer.moveCardsToHandWithInfo(cards, source, game, withName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardsToExile(Card card, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) {
|
||||
return computerPlayer.moveCardsToExile(card, source, game, withName, exileId, exileZoneName);
|
||||
|
|
|
@ -1204,6 +1204,11 @@ public class PlayerStub implements Player {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardsToHandWithInfo(Cards cards, Ability source, Game game, boolean withName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, Ability source, Game game, Zone fromZone, boolean withName) {
|
||||
return false;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue