diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index f42bb82d1e..83269a57ea 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -374,6 +374,7 @@ public interface Player extends MageItem, Copyable { * @return */ boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, Zone fromZone); + /** * Uses card.moveToExile and posts a inform message about moving the card to exile * into the game log @@ -388,6 +389,18 @@ public interface Player extends MageItem, Copyable { */ boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone); + /** + * Uses card.moveToZone and posts a inform message about moving the card to graveyard + * into the game log + * + * @param card + * @param sourceId + * @param game + * @param fromZone if null, this info isn't postet + * @return + */ + boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId, Game game, Zone fromZone); + /** * Uses putOntoBattlefield and posts also a info message about in the game log * @@ -398,7 +411,19 @@ public interface Player extends MageItem, Copyable { * @return */ boolean putOntoBattlefieldWithInfo(Card card, Game game, Zone fromZone, UUID sourceId); - + + /** + * Uses putOntoBattlefield and posts also a info message about in the game log + * + * @param card + * @param game + * @param fromZone + * @param sourceId + * @param tapped the card enters the battlefield tapped + * @return + */ + boolean putOntoBattlefieldWithInfo(Card card, Game game, Zone fromZone, UUID sourceId, boolean tapped); + /** * Checks if the playerToCheckId is from an opponent in range * diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 0c096dd990..aed03b2523 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -2112,6 +2112,18 @@ public abstract class PlayerImpl> implements Player, Ser return result; } + @Override + public boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId, Game game, Zone fromZone) { + boolean result = false; + if (card.moveToZone(Zone.GRAVEYARD, sourceId, game, fromZone != null ? fromZone.equals(Zone.BATTLEFIELD) : false)) { + game.informPlayers(new StringBuilder(this.getName()) + .append(" puts ").append(card.getName()).append(" ") + .append(fromZone != null ? new StringBuilder("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" "):"") + .append("into his or her graveyard").toString()); + } + return result; + } + @Override public boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone) { boolean result = false; @@ -2126,8 +2138,13 @@ public abstract class PlayerImpl> implements Player, Ser @Override public boolean putOntoBattlefieldWithInfo(Card card, Game game, Zone fromZone, UUID sourceId) { + return this.putOntoBattlefieldWithInfo(card, game, fromZone, sourceId, false); + } + + @Override + public boolean putOntoBattlefieldWithInfo(Card card, Game game, Zone fromZone, UUID sourceId, boolean tapped) { boolean result = false; - if (card.putOntoBattlefield(game, fromZone, sourceId, this.getId())) { + if (card.putOntoBattlefield(game, fromZone, sourceId, this.getId(), tapped)) { game.informPlayers(new StringBuilder(this.getName()) .append(" puts ").append(card.getName()) .append(" from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ")