From ec01caece12af93a2f2799f4694744bd15711957 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Mon, 8 Feb 2021 09:09:11 -0600 Subject: [PATCH] [KHM] Foretell - Do not show card name in game log (fixes #7522) --- .../mage/abilities/effects/common/ExileTargetEffect.java | 8 +++++++- .../main/java/mage/abilities/keyword/ForetellAbility.java | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java index f7dc493b35..ebb9ea059e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java @@ -31,6 +31,7 @@ public class ExileTargetEffect extends OneShotEffect { private UUID exileId = null; protected boolean multitargetHandling; private boolean toSourceExileZone = false; // exile the targets to a source object specific exile zone (takes care of zone change counter) + private boolean withName = true; public ExileTargetEffect(String effectText) { this(effectText, false); @@ -73,6 +74,7 @@ public class ExileTargetEffect extends OneShotEffect { this.onlyFromZone = effect.onlyFromZone; this.multitargetHandling = effect.multitargetHandling; this.toSourceExileZone = effect.toSourceExileZone; + this.withName = effect.withName; } @Override @@ -85,6 +87,10 @@ public class ExileTargetEffect extends OneShotEffect { return this; } + public void setWithName(boolean withName) { + this.withName = withName; + } + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -160,7 +166,7 @@ public class ExileTargetEffect extends OneShotEffect { exileZone = sourceObject.getIdName(); } } - controller.moveCardsToExile(toExile, source, game, true, exileId, exileZone); + controller.moveCardsToExile(toExile, source, game, withName, exileId, exileZone); return true; } return false; diff --git a/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java b/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java index 58e849d72d..d2c01d5378 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java @@ -84,6 +84,11 @@ public class ForetellAbility extends SpecialAction { + "Cast it on a later turn for its foretell cost.)"; } + @Override + public String getGameLogMessage(Game game) { + return " foretells a card from hand"; + } + public class ForetellExileEffect extends OneShotEffect { private final Card card; @@ -119,7 +124,7 @@ public class ForetellAbility extends SpecialAction { UUID exileId = CardUtil.getExileZoneId(mainCardId.toString() + "foretellAbility", game); // foretell turn number shows up on exile window - Effect effect = new ExileTargetEffect(exileId, " Foretell Turn Number: " + game.getTurnNum()); + ExileTargetEffect effect = new ExileTargetEffect(exileId, " Foretell Turn Number: " + game.getTurnNum()); // remember turn number it was cast game.getState().setValue(mainCardId.toString() + "Foretell Turn Number", game.getTurnNum()); @@ -129,6 +134,7 @@ public class ForetellAbility extends SpecialAction { game.getState().setValue(mainCardId.toString() + "Foretell Split Cost", foretellSplitCost); // exile the card face-down + effect.setWithName(false); effect.setTargetPointer(new FixedTarget(card.getId())); effect.apply(game, source); card.setFaceDown(true, game);