mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Fixed that face down cards moved from exile to hand are wrongly revealed in log (e.g. Necropotence).
This commit is contained in:
parent
70de38c90f
commit
355a98f282
1 changed files with 2 additions and 1 deletions
|
@ -2706,12 +2706,13 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, Zone fromZone) {
|
public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, Zone fromZone) {
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
boolean faceDown = card.isFaceDown(); // move sets card to face up
|
||||||
if (card.moveToZone(Zone.HAND, sourceId, game, false)) {
|
if (card.moveToZone(Zone.HAND, sourceId, game, false)) {
|
||||||
if (card instanceof PermanentCard) {
|
if (card instanceof PermanentCard) {
|
||||||
card = game.getCard(card.getId());
|
card = game.getCard(card.getId());
|
||||||
}
|
}
|
||||||
game.informPlayers(new StringBuilder(this.getName())
|
game.informPlayers(new StringBuilder(this.getName())
|
||||||
.append(" puts ").append(card.isFaceDown() ? " a face down card":card.getLogName()).append(" ")
|
.append(" puts ").append(faceDown ? " a face down card":card.getLogName()).append(" ")
|
||||||
.append(fromZone != null ? new StringBuilder("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" "):"")
|
.append(fromZone != null ? new StringBuilder("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" "):"")
|
||||||
.append(card.getOwnerId().equals(this.getId()) ? "into his or her hand":"into its owner's hand").toString());
|
.append(card.getOwnerId().equals(this.getId()) ? "into his or her hand":"into its owner's hand").toString());
|
||||||
result = true;
|
result = true;
|
||||||
|
|
Loading…
Reference in a new issue