mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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;
|
private UUID exileId = null;
|
||||||
protected boolean multitargetHandling;
|
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 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) {
|
public ExileTargetEffect(String effectText) {
|
||||||
this(effectText, false);
|
this(effectText, false);
|
||||||
|
@ -73,6 +74,7 @@ public class ExileTargetEffect extends OneShotEffect {
|
||||||
this.onlyFromZone = effect.onlyFromZone;
|
this.onlyFromZone = effect.onlyFromZone;
|
||||||
this.multitargetHandling = effect.multitargetHandling;
|
this.multitargetHandling = effect.multitargetHandling;
|
||||||
this.toSourceExileZone = effect.toSourceExileZone;
|
this.toSourceExileZone = effect.toSourceExileZone;
|
||||||
|
this.withName = effect.withName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -85,6 +87,10 @@ public class ExileTargetEffect extends OneShotEffect {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWithName(boolean withName) {
|
||||||
|
this.withName = withName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
@ -160,7 +166,7 @@ public class ExileTargetEffect extends OneShotEffect {
|
||||||
exileZone = sourceObject.getIdName();
|
exileZone = sourceObject.getIdName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
controller.moveCardsToExile(toExile, source, game, true, exileId, exileZone);
|
controller.moveCardsToExile(toExile, source, game, withName, exileId, exileZone);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -84,6 +84,11 @@ public class ForetellAbility extends SpecialAction {
|
||||||
+ "Cast it on a later turn for its foretell cost.)</i>";
|
+ "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 {
|
public class ForetellExileEffect extends OneShotEffect {
|
||||||
|
|
||||||
private final Card card;
|
private final Card card;
|
||||||
|
@ -119,7 +124,7 @@ public class ForetellAbility extends SpecialAction {
|
||||||
UUID exileId = CardUtil.getExileZoneId(mainCardId.toString() + "foretellAbility", game);
|
UUID exileId = CardUtil.getExileZoneId(mainCardId.toString() + "foretellAbility", game);
|
||||||
|
|
||||||
// foretell turn number shows up on exile window
|
// 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
|
// remember turn number it was cast
|
||||||
game.getState().setValue(mainCardId.toString() + "Foretell Turn Number", game.getTurnNum());
|
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);
|
game.getState().setValue(mainCardId.toString() + "Foretell Split Cost", foretellSplitCost);
|
||||||
|
|
||||||
// exile the card face-down
|
// exile the card face-down
|
||||||
|
effect.setWithName(false);
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
effect.apply(game, source);
|
effect.apply(game, source);
|
||||||
card.setFaceDown(true, game);
|
card.setFaceDown(true, game);
|
||||||
|
|
Loading…
Reference in a new issue