From cf9a8013f068ebd91971d08c9b82ad8e10cd7795 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Mon, 7 Nov 2022 16:49:33 -0500 Subject: [PATCH] v2 --- .../java/forge/game/ability/AbilityUtils.java | 15 +++++++-------- .../cardsfolder/upcoming/bladecoil_serpent.txt | 6 +++--- .../res/cardsfolder/upcoming/clay_champion.txt | 7 ++++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 55177825cb4..6f9a78e61af 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -2087,19 +2087,18 @@ public class AbilityUtils { return doXMath(castSA == null ? 0 : castSA.getPayingColors().countColors(), expr, c, ctb); } - if (sq[0].startsWith("Each2SpentToCast")) { + if (sq[0].startsWith("EachSpentToCast")) { SpellAbility castSA = c.getCastSA(); + if (castSA == null) { + return 0; + } final List paidMana = castSA.getPayingMana(); - final String type = sq[0].split("_")[1]; + final String type = sq[1]; int count = 0; - int t = 0; for (Mana m : paidMana) { if (m.toString().equals(type)) { - t++; - if (t == 2) { - count++; - t = 0; - } + count++; + } } return doXMath(count, expr, c, ctb); diff --git a/forge-gui/res/cardsfolder/upcoming/bladecoil_serpent.txt b/forge-gui/res/cardsfolder/upcoming/bladecoil_serpent.txt index 983569eba03..f7b6dbac179 100644 --- a/forge-gui/res/cardsfolder/upcoming/bladecoil_serpent.txt +++ b/forge-gui/res/cardsfolder/upcoming/bladecoil_serpent.txt @@ -8,9 +8,9 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S SVar:TrigDiscard:DB$ Discard | Defined$ Opponent | NumCards$ BB | Mode$ TgtChoose T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | CheckSVar$ RR | Execute$ TrigPump | TriggerDescription$ When CARDNAME enters the battlefield, for each {R}{R} spent to cast it, it gets +1/+0 and gains trample and haste until end of turn. SVar:TrigPump:DB$ Pump | KW$ Trample & Haste | NumAtt$ RR -SVar:UU:Count$Each2SpentToCast_U -SVar:BB:Count$Each2SpentToCast_B -SVar:RR:Count$Each2SpentToCast_R +SVar:UU:Count$EachSpentToCast.U/HalfDown +SVar:BB:Count$EachSpentToCast.B/HalfDown +SVar:RR:Count$EachSpentToCast.R/HalfDown SVar:X:Count$xPaid DeckHints:Color$Blue|Black|Red Oracle:When Bladecoil Serpent enters the battlefield, for each {U}{U} spent to cast it, draw a card.\nWhen Bladecoil Serpent enters the battlefield, for each {B}{B} spent to cast it, each opponent discards a card.\nWhen Bladecoil Serpent enters the battlefield, for each {R}{R} spent to cast it, it gets +1/+0 and gains trample and haste until end of turn. diff --git a/forge-gui/res/cardsfolder/upcoming/clay_champion.txt b/forge-gui/res/cardsfolder/upcoming/clay_champion.txt index d64d9ab98ac..3fbb6183b0e 100644 --- a/forge-gui/res/cardsfolder/upcoming/clay_champion.txt +++ b/forge-gui/res/cardsfolder/upcoming/clay_champion.txt @@ -2,11 +2,12 @@ Name:Clay Champion ManaCost:X 4 Types:Artifact Creature Construct PT:2/2 -K:etbCounter:P1P1:GG:no condition:CARDNAME enters the battlefield with three +1/+1 counters on it for each {G}{G} spent to cast it. +K:etbCounter:P1P1:GGx3:no condition:CARDNAME enters the battlefield with three +1/+1 counters on it for each {G}{G} spent to cast it. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, choose up to two other target creatures you control. For each {W}{W} spent to cast CARDNAME, put a +1/+1 counter on each of them. SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.Other+YouCtrl | TgtPrompt$ Choose up to two other target creatures you control | TargetMin$ 0 | TargetMax$ 2 | CounterType$ P1P1 | CounterNum$ WW -SVar:GG:Count$Each2SpentToCast_G/Times.3 -SVar:WW:Count$Each2SpentToCast_W +SVar:GG:Count$EachSpentToCast.G/HalfDown +SVar:GGx3:SVar$GG/Times.3 +SVar:WW:Count$EachSpentToCast.W/HalfDown SVar:X:Count$xPaid DeckHas:Ability$Counters DeckHints:Color$Green|White