From aba2c3fad8f59fbd7a85ddbd5207350eecb50ac6 Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Fri, 13 Oct 2023 18:14:30 +0200 Subject: [PATCH] Keep both variants --- forge-gui/res/cardsfolder/t/tranquil_frillback.txt | 2 +- .../upcoming/tempest_hart_scan_the_clouds.txt | 2 +- .../main/java/forge/player/PlayerControllerHuman.java | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/forge-gui/res/cardsfolder/t/tranquil_frillback.txt b/forge-gui/res/cardsfolder/t/tranquil_frillback.txt index b2b52e56f79..2153f71c551 100644 --- a/forge-gui/res/cardsfolder/t/tranquil_frillback.txt +++ b/forge-gui/res/cardsfolder/t/tranquil_frillback.txt @@ -3,7 +3,7 @@ ManaCost:2 G Types:Creature Dinosaur PT:3/3 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPay | TriggerDescription$ When CARDNAME enters the battlefield, you may pay {G} up to three times. When you pay this cost one or more times, ABILITY -SVar:TrigPay:AB$ ImmediateTrigger | Cost$ Mana | Announce$ NumTimes | XMaxLimit$ 3 | ConditionCheckSVar$ NumTimes | ConditionSVarCompare$ GE1 | RememberSVarAmount$ NumTimes | Execute$ TrigCharm | TriggerDescription$ When you pay this cost one or more times, ABILITY +SVar:TrigPay:AB$ ImmediateTrigger | Cost$ Mana | Announce$ NumTimes | AnnounceLimit$ 3 | ConditionCheckSVar$ NumTimes | ConditionSVarCompare$ GE1 | RememberSVarAmount$ NumTimes | Execute$ TrigCharm | TriggerDescription$ When you pay this cost one or more times, ABILITY SVar:TrigCharm:DB$ Charm | MinCharmNum$ 0 | CharmNum$ X | Choices$ DestroyAE,ExileGrave,GainLife SVar:DestroyAE:DB$ Destroy | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment | SpellDescription$ Destroy target artifact or enchantment. SVar:ExileGrave:DB$ ChangeZoneAll | ValidTgts$ Player | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | SpellDescription$ Exile target player's graveyard. diff --git a/forge-gui/res/cardsfolder/upcoming/tempest_hart_scan_the_clouds.txt b/forge-gui/res/cardsfolder/upcoming/tempest_hart_scan_the_clouds.txt index 2d2b333519a..c0056339513 100644 --- a/forge-gui/res/cardsfolder/upcoming/tempest_hart_scan_the_clouds.txt +++ b/forge-gui/res/cardsfolder/upcoming/tempest_hart_scan_the_clouds.txt @@ -13,7 +13,7 @@ ALTERNATE Name:Scan the Clouds ManaCost:1 U -Types:Instant Adventure +Types:Instant Adventure A:SP$ Draw | NumCards$ 2 | SubAbility$ DBDiscard | SpellDescription$ Draw two cards, then discard two cards. (Then exile this card. You may cast the creature later from exile.) SVar:DBDiscard:DB$ Discard | Defined$ You | NumCards$ 2 | Mode$ TgtChoose Oracle:Draw two cards, then discard two cards. (Then exile this card. You may cast the creature later from exile.) \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java index b5c549a134f..df9d7c2baae 100644 --- a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java +++ b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java @@ -448,12 +448,11 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont boolean canChooseZero = true; Cost cost = ability.getPayCosts(); - if (ability.hasParam("XMaxLimit")) { - max = Math.min(max, AbilityUtils.calculateAmount(host, ability.getParam("XMaxLimit"), ability)); - } - if ("X".equals(announce)) { canChooseZero = !ability.hasParam("XCantBe0"); + if (ability.hasParam("XMaxLimit")) { + max = Math.min(max, AbilityUtils.calculateAmount(host, ability.getParam("XMaxLimit"), ability)); + } if (cost != null) { Integer costX = cost.getMaxForNonManaX(ability, player, false); if (costX != null) { @@ -466,6 +465,10 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont } final int min = canChooseZero ? 0 : 1; + if (ability.hasParam("AnnounceMax")) { + max = Math.min(max, AbilityUtils.calculateAmount(host, ability.getParam("AnnounceMax"), ability)); + } + if (ability.usesTargeting()) { // if announce is used as min targets, check what the max possible number would be if (announce.equals(ability.getTargetRestrictions().getMinTargets())) {