From 1ee37020ddd482e7238aa6667711bfe81b19fe0e Mon Sep 17 00:00:00 2001 From: tool4ever Date: Wed, 4 Sep 2024 18:13:39 +0200 Subject: [PATCH] Hauntwoods Shrieker and support (#6058) --- forge-game/src/main/java/forge/game/GameAction.java | 1 - .../forge/game/ability/effects/SetStateEffect.java | 10 +++++++++- .../res/cardsfolder/upcoming/hauntwoods_shrieker.txt | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index fd69f3422a9..e28cf5572ca 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -692,7 +692,6 @@ public class GameAction { if (wasFacedown) { Card revealLKI = CardCopyService.getLKICopy(c); revealLKI.forceTurnFaceUp(); - reveal(new CardCollection(revealLKI), revealLKI.getOwner(), true, "Face-down card leaves the battlefield: "); copied.setState(CardStateName.Original, true); diff --git a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java index 45706a32ad3..4611047be93 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java @@ -96,6 +96,15 @@ public class SetStateEffect extends SpellAbilityEffect { continue; } + if (sa.hasParam("RevealFirst")) { + Card lki = CardCopyService.getLKICopy(tgtCard); + lki.forceTurnFaceUp(); + game.getAction().reveal(new CardCollection(lki), lki.getOwner(), true, Localizer.getInstance().getMessage("lblRevealFaceDownCards")); + if (sa.hasParam("ValidNewFace") && !lki.isValid(sa.getParam("ValidNewFace").split(","), p, host, sa)) { + continue; + } + } + // facedown cards that are not Permanent, can't turn faceup there if ("TurnFaceUp".equals(mode) && gameCard.isFaceDown() && gameCard.isInPlay()) { if (gameCard.hasMergedCard()) { @@ -118,7 +127,6 @@ public class SetStateEffect extends SpellAbilityEffect { Card lki = CardCopyService.getLKICopy(gameCard); lki.forceTurnFaceUp(); game.getAction().reveal(new CardCollection(lki), lki.getOwner(), true, Localizer.getInstance().getMessage("lblFaceDownCardCantTurnFaceUp")); - continue; } } diff --git a/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt b/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt new file mode 100644 index 00000000000..1cd5fb8ed13 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt @@ -0,0 +1,8 @@ +Name:Hauntwoods Shrieker +ManaCost:1 G G +Types:Creature Beast Mutant +PT:3/3 +T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigDread | TriggerDescription$ Whenever CARDNAME attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) +SVar:TrigDread:DB$ Manifest | Dread$ True +A:AB$ SetState | ValidTgts$ Card.faceDown | Cost$ 1 G | Mode$ TurnFaceUp | Optional$ True | RevealFirst$ True | ValidNewFace$ Creature | StackDescription$ SpellDescription | SpellDescription$ Reveal target face-down permanent. If it's a creature card, you may turn it face up. +Oracle:Whenever Hauntwoods Shrieker attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.)\n{1}{G}: Reveal target face-down permanent. If it's a creature card, you may turn it face up.