From 0ad0c048b5d6fff151993d79938ba1c097540d80 Mon Sep 17 00:00:00 2001 From: Hythonia Date: Tue, 20 Oct 2020 14:03:59 +0000 Subject: [PATCH 1/4] RaiseTo param for cost adjustment (Trinisphere) --- .../main/java/forge/game/cost/CostAdjustment.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index 3ead5f27d1b..075cdc606f1 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -337,15 +337,12 @@ public class CostAdjustment { return; } - int value = 0; - if (StringUtils.isNumeric(amount)) { - value = Integer.parseInt(amount); - } else { - if ("Min3".equals(amount)) { - int cmc = manaCost.getConvertedManaCost(); - if (cmc < 3) { - value = 3 - cmc; - } + int value = Integer.parseInt(amount); + + } if staticAbility.hasParam("RaiseTo") { + int cmc = manaCost.getConvertedManaCost(); + if (cmc < value) { + value = Integer.parseInt(amount) - cmc; } } From 15e6a21428e92d26be70cbc8ef4f8dd2409efde4 Mon Sep 17 00:00:00 2001 From: Hythonia Date: Tue, 20 Oct 2020 14:12:16 +0000 Subject: [PATCH 2/4] Update trinisphere.txt --- forge-gui/res/cardsfolder/t/trinisphere.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/t/trinisphere.txt b/forge-gui/res/cardsfolder/t/trinisphere.txt index 6324a0c5bdb..9d938295bf4 100644 --- a/forge-gui/res/cardsfolder/t/trinisphere.txt +++ b/forge-gui/res/cardsfolder/t/trinisphere.txt @@ -1,7 +1,7 @@ Name:Trinisphere ManaCost:3 Types:Artifact -S:Mode$ SetCost | ValidCard$ Card | Type$ Spell | Amount$ Min3 | CheckSVar$ X | SVarCompare$ EQ1 | Description$ As long as CARDNAME is untapped, each spell that would cost less than three mana to cast costs three mana to cast. +S:Mode$ SetCost | ValidCard$ Card | Type$ Spell | Amount$ 3 | RaiseTo$ True | CheckSVar$ X | SVarCompare$ EQ1 | Description$ As long as CARDNAME is untapped, each spell that would cost less than three mana to cast costs three mana to cast. SVar:X:Count$Valid Card.Self+untapped AI:RemoveDeck:Random SVar:NonStackingEffect:True From 2ba11ae00940a2c9798b97e0e7adfe486aa064ea Mon Sep 17 00:00:00 2001 From: Hythonia Date: Tue, 20 Oct 2020 16:59:23 +0000 Subject: [PATCH 3/4] Fix CostAdjustment.java --- forge-game/src/main/java/forge/game/cost/CostAdjustment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index 075cdc606f1..08a3b007446 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -339,7 +339,7 @@ public class CostAdjustment { int value = Integer.parseInt(amount); - } if staticAbility.hasParam("RaiseTo") { + if staticAbility.hasParam("RaiseTo") { int cmc = manaCost.getConvertedManaCost(); if (cmc < value) { value = Integer.parseInt(amount) - cmc; From 29841b18a497912d9072a72f9229cc19526cd13a Mon Sep 17 00:00:00 2001 From: Hythonia Date: Tue, 20 Oct 2020 17:01:10 +0000 Subject: [PATCH 4/4] Fix CostAdjustment.java #2 --- forge-game/src/main/java/forge/game/cost/CostAdjustment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index 08a3b007446..c384212499c 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -339,7 +339,7 @@ public class CostAdjustment { int value = Integer.parseInt(amount); - if staticAbility.hasParam("RaiseTo") { + if (staticAbility.hasParam("RaiseTo")) { int cmc = manaCost.getConvertedManaCost(); if (cmc < value) { value = Integer.parseInt(amount) - cmc;