mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[KHM] Foretell - Do not show card name in game log (fixes #7522)
This commit is contained in:
parent
2716c60fb5
commit
ec01caece1
2 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -84,6 +84,11 @@ public class ForetellAbility extends SpecialAction {
|
|||
+ "Cast it on a later turn for its foretell cost.)</i>";
|
||||
}
|
||||
|
||||
@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);
|
||||
|
|
Loading…
Reference in a new issue