From 9c33c3a27e483bcebce877f60dddfa1f64306388 Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Wed, 13 Apr 2022 21:16:10 +0200 Subject: [PATCH] xCount Cleanup --- .../java/forge/game/ability/AbilityUtils.java | 139 +++++------------- .../res/cardsfolder/a/abzan_beastmaster.txt | 4 +- .../cardsfolder/a/alena_kessig_trapper.txt | 2 +- forge-gui/res/cardsfolder/a/ancient_ooze.txt | 2 +- .../res/cardsfolder/a/arni_brokenbrow.txt | 2 +- .../cardsfolder/a/arni_slays_the_troll.txt | 2 +- forge-gui/res/cardsfolder/c/carrion_grub.txt | 2 +- .../res/cardsfolder/d/discerning_taste.txt | 2 +- .../res/cardsfolder/e/essence_harvest.txt | 2 +- .../res/cardsfolder/f/flourishing_hunter.txt | 2 +- .../res/cardsfolder/f/fungal_sprouting.txt | 2 +- .../cardsfolder/g/garruk_primal_hunter.txt | 2 +- .../cardsfolder/h/huatli_the_suns_heart.txt | 2 +- .../res/cardsfolder/h/huatli_warrior_poet.txt | 2 +- .../res/cardsfolder/i/impetuous_protege.txt | 2 +- .../res/cardsfolder/i/inferno_project.txt | 2 +- .../i/inscription_of_abundance.txt | 2 +- .../res/cardsfolder/k/kin_tree_invocation.txt | 2 +- .../res/cardsfolder/l/loxodon_lifechanter.txt | 6 +- .../res/cardsfolder/m/metalwork_colossus.txt | 2 +- forge-gui/res/cardsfolder/m/miming_slime.txt | 2 +- .../res/cardsfolder/m/monstrous_onslaught.txt | 2 +- .../cardsfolder/o/overwhelming_stampede.txt | 2 +- .../res/cardsfolder/p/pathbreaker_ibex.txt | 2 +- .../res/cardsfolder/p/peema_aether_seer.txt | 2 +- .../res/cardsfolder/p/primal_empathy.txt | 2 +- .../cardsfolder/p/prime_speaker_zegana.txt | 2 +- .../r/return_of_the_wildspeaker.txt | 2 +- .../res/cardsfolder/r/rishkars_expertise.txt | 2 +- .../res/cardsfolder/r/rubblebelt_rioters.txt | 2 +- .../s/selvala_heart_of_the_wilds.txt | 2 +- forge-gui/res/cardsfolder/s/spell_rupture.txt | 2 +- .../res/cardsfolder/s/sudden_insight.txt | 2 +- forge-gui/res/cardsfolder/s/szats_will.txt | 2 +- .../res/cardsfolder/t/the_great_henge.txt | 2 +- .../cardsfolder/t/traverse_the_outlands.txt | 2 +- .../res/cardsfolder/t/triumph_of_cruelty.txt | 4 +- .../res/cardsfolder/t/triumph_of_ferocity.txt | 4 +- forge-gui/res/cardsfolder/t/tuya_bearclaw.txt | 2 +- 39 files changed, 81 insertions(+), 144 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 7b215fa299f..8ef8013dcaf 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -2662,27 +2662,6 @@ public class AbilityUtils { return doXMath(manaCost.size(), expr, c, ctb); } - //Count$DifferentManaValue - if (l[0].contains("DifferentManaValue")) { - String[] sqparts = l[0].split(" ", 2); - final String[] rest = sqparts[1].split(","); - - final CardCollectionView cardsInZones = sqparts[0].length() > 18 - ? game.getCardsIn(ZoneType.listValueOf(sqparts[0].substring(18))) - : game.getCardsIn(ZoneType.Battlefield); - - CardCollection cards = CardLists.getValidCards(cardsInZones, rest, player, c, ctb); - final List cmcs = Lists.newArrayList(); - - for (Card card : cards) { - Integer cmc = card.getCMC(); - if (!cmcs.contains(cmc)) { - cmcs.add(cmc); - } - } - return doXMath(cmcs.size(), expr, c, ctb); - } - if (sq[0].equals("StormCount")) { return doXMath(game.getStack().getSpellsCastThisTurn().size() - 1, expr, c, ctb); } @@ -2711,25 +2690,6 @@ public class AbilityUtils { return MyRandom.getRandom().nextInt(1+max-min) + min; } - // Count$SumPower_valid - if (sq[0].startsWith("SumPower")) { - final String[] restrictions = l[0].split("_"); - CardCollection filteredCards = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restrictions[1], player, c, ctb); - return doXMath(Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetNetPower), expr, c, ctb); - } - - // Count$SumCMC_valid - if (sq[0].startsWith("SumCMC")) { - ZoneType zone = ZoneType.Battlefield; - //graveyard support for Inferno Project (may need other zones or multi-zone in future) - if (sq[0].contains("Graveyard")) - zone = ZoneType.Graveyard; - final String[] restrictions = l[0].split("_"); - CardCollectionView cardsonbattlefield = game.getCardsIn(zone); - CardCollection filteredCards = CardLists.getValidCards(cardsonbattlefield, restrictions[1], player, c, ctb); - return Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetCmc); - } - // Count$TotalCounters._ if (sq[0].startsWith("TotalCounters")) { final String[] restrictions = l[0].split("_"); @@ -2795,49 +2755,19 @@ public class AbilityUtils { // count valid cards in any specified zone/s if (sq[0].startsWith("Valid")) { - String[] lparts = l[0].split(" ", 2); + String[] paidparts = l[0].split("\\$", 2); + String[] lparts = paidparts[0].split(" ", 2); final CardCollectionView cardsInZones = lparts[0].length() > 5 ? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(5))) : game.getCardsIn(ZoneType.Battlefield); + if (paidparts.length > 1) { + return doXMath(handlePaid(CardLists.getValidCards(cardsInZones, lparts[1], player, c, ctb), paidparts[1], c, ctb), expr, c, ctb); + } return doXMath(CardLists.getValidCardCount(cardsInZones, lparts[1], player, c, ctb), expr, c, ctb); } - if (sq[0].startsWith("GreatestPower")) { - final String[] lparts = l[0].split("_", 2); - final String[] rest = lparts[1].split(","); - final CardCollectionView cardsInZones = lparts[0].length() > 13 - ? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(13))) - : game.getCardsIn(ZoneType.Battlefield); - CardCollection list = CardLists.getValidCards(cardsInZones, rest, player, c, ctb); - int highest = 0; - for (final Card crd : list) { - if (crd.getNetPower() > highest) { - highest = crd.getNetPower(); - } - } - return highest; - } - - if (sq[0].startsWith("GreatestToughness_")) { - final String restriction = l[0].substring(18); - CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb); - int highest = 0; - for (final Card crd : list) { - if (crd.getNetToughness() > highest) { - highest = crd.getNetToughness(); - } - } - return highest; - } - - if (sq[0].startsWith("HighestCMC_")) { - final String restriction = l[0].substring(11); - CardCollection list = CardLists.getValidCards(game.getCardsInGame(), restriction, player, c, ctb); - return Aggregates.max(list, CardPredicates.Accessors.fnGetCmc); - } - if (sq[0].startsWith("MostCardName")) { String[] lparts = l[0].split(" ", 2); final String[] rest = lparts[1].split(","); @@ -2877,19 +2807,6 @@ public class AbilityUtils { return doXMath(crdname.size(), expr, c, ctb); } - if (sq[0].startsWith("DifferentPower_")) { - final List powers = Lists.newArrayList(); - final String restriction = l[0].substring(15); - CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb); - for (final Card card : list) { - Integer pow = card.getNetPower(); - if (!powers.contains(pow)) { - powers.add(pow); - } - } - return doXMath(powers.size(), expr, c, ctb); - } - if (sq[0].startsWith("MostProminentCreatureType")) { String restriction = l[0].split(" ")[1]; CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb); @@ -2929,6 +2846,31 @@ public class AbilityUtils { } return doXMath(creatTypes.size(), expr, c, ctb); } + + // TODO move below to handlePaid + if (sq[0].startsWith("SumPower")) { + final String[] restrictions = l[0].split("_"); + CardCollection filteredCards = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restrictions[1], player, c, ctb); + return doXMath(Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetNetPower), expr, c, ctb); + } + if (sq[0].startsWith("HighestCMC_")) { + final String restriction = l[0].substring(11); + CardCollection list = CardLists.getValidCards(game.getCardsInGame(), restriction, player, c, ctb); + return Aggregates.max(list, CardPredicates.Accessors.fnGetCmc); + } + if (sq[0].startsWith("DifferentPower_")) { + final List powers = Lists.newArrayList(); + final String restriction = l[0].substring(15); + CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb); + for (final Card card : list) { + Integer pow = card.getNetPower(); + if (!powers.contains(pow)) { + powers.add(pow); + } + } + return doXMath(powers.size(), expr, c, ctb); + } + // Complex counting methods CardCollectionView someCards = getCardListForXCount(c, player, sq, ctb); @@ -3628,13 +3570,14 @@ public class AbilityUtils { } if (string.startsWith("GreatestPower")) { - int highest = 0; - for (final Card crd : paidList) { - if (crd.getNetPower() > highest) { - highest = crd.getNetPower(); - } - } - return highest; + return Aggregates.max(paidList, CardPredicates.Accessors.fnGetNetPower); + } + if (string.startsWith("GreatestToughness")) { + return Aggregates.max(paidList, CardPredicates.Accessors.fnGetNetToughness); + } + + if (string.startsWith("SumToughness")) { + return Aggregates.sum(paidList, CardPredicates.Accessors.fnGetNetToughness); } if (string.startsWith("DifferentCMC")) { @@ -3646,11 +3589,7 @@ public class AbilityUtils { } if (string.startsWith("SumCMC")) { - int sumCMC = 0; - for (Card c : paidList) { - sumCMC += c.getCMC(); - } - return sumCMC; + return Aggregates.sum(paidList, CardPredicates.Accessors.fnGetCmc); } if (string.startsWith("Valid")) { diff --git a/forge-gui/res/cardsfolder/a/abzan_beastmaster.txt b/forge-gui/res/cardsfolder/a/abzan_beastmaster.txt index 229c0ac9f75..7c5f621403d 100644 --- a/forge-gui/res/cardsfolder/a/abzan_beastmaster.txt +++ b/forge-gui/res/cardsfolder/a/abzan_beastmaster.txt @@ -4,6 +4,6 @@ Types:Creature Dog Shaman PT:2/1 T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToughDraw | TriggerDescription$ At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness. SVar:TrigToughDraw:DB$ Draw | Defined$ You | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourTough | ConditionSVarCompare$ GEOppsTough -SVar:YourTough:Count$GreatestToughness_Creature.YouCtrl -SVar:OppsTough:Count$GreatestToughness_Creature.YouDontCtrl +SVar:YourTough:Count$Valid Creature.YouCtrl$GreatestToughness +SVar:OppsTough:Count$Valid Creature.YouDontCtrl$GreatestToughness Oracle:At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness. diff --git a/forge-gui/res/cardsfolder/a/alena_kessig_trapper.txt b/forge-gui/res/cardsfolder/a/alena_kessig_trapper.txt index e24ef429e33..1d0cd90348d 100644 --- a/forge-gui/res/cardsfolder/a/alena_kessig_trapper.txt +++ b/forge-gui/res/cardsfolder/a/alena_kessig_trapper.txt @@ -5,5 +5,5 @@ PT:4/3 K:First Strike K:Partner A:AB$ Mana | Cost$ T | Produced$ R | Amount$ X | SpellDescription$ Add an amount of {R} equal to the greatest power among creatures you control that entered the battlefield this turn. -SVar:X:Count$GreatestPower_Creature.YouCtrl+ThisTurnEntered +SVar:X:Count$Valid Creature.YouCtrl+ThisTurnEntered$GreatestPower Oracle:First strike\n{T}: Add an amount of {R} equal to the greatest power among creatures you control that entered the battlefield this turn.\nPartner (You can have two commanders if both have partner.) diff --git a/forge-gui/res/cardsfolder/a/ancient_ooze.txt b/forge-gui/res/cardsfolder/a/ancient_ooze.txt index e3569385722..1fa408514f1 100644 --- a/forge-gui/res/cardsfolder/a/ancient_ooze.txt +++ b/forge-gui/res/cardsfolder/a/ancient_ooze.txt @@ -3,6 +3,6 @@ ManaCost:5 G G Types:Creature Ooze PT:*/* S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the total mana value of other creatures you control. -SVar:X:Count$SumCMC_Creature.Other+YouCtrl +SVar:X:Count$Valid Creature.Other+YouCtrl$SumCMC SVar:NeedsToPlayVar:X GE4 Oracle:Ancient Ooze's power and toughness are each equal to the total mana value of other creatures you control. diff --git a/forge-gui/res/cardsfolder/a/arni_brokenbrow.txt b/forge-gui/res/cardsfolder/a/arni_brokenbrow.txt index a295e957b28..d16a348f6a9 100644 --- a/forge-gui/res/cardsfolder/a/arni_brokenbrow.txt +++ b/forge-gui/res/cardsfolder/a/arni_brokenbrow.txt @@ -5,5 +5,5 @@ PT:3/3 K:Haste A:AB$ Animate | Cost$ 1 | Power$ Y | Boast$ True | StackDescription$ SpellDescription | SpellDescription$ You may change CARDNAME's base power to 1 plus the greatest power among other creatures you control until end of turn. SVar:Y:SVar$X/Plus.1 -SVar:X:Count$GreatestPower_Creature.Other+YouCtrl +SVar:X:Count$Valid Creature.Other+YouCtrl$GreatestPower Oracle:Haste\nBoast — {1}: You may change Arni Brokenbrow's base power to 1 plus the greatest power among other creatures you control until end of turn. (Activate only if this creature attacked this turn and only once each turn.) diff --git a/forge-gui/res/cardsfolder/a/arni_slays_the_troll.txt b/forge-gui/res/cardsfolder/a/arni_slays_the_troll.txt index 65e833aa249..9ba27582696 100644 --- a/forge-gui/res/cardsfolder/a/arni_slays_the_troll.txt +++ b/forge-gui/res/cardsfolder/a/arni_slays_the_troll.txt @@ -7,6 +7,6 @@ SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.YouDontCtrl SVar:DBPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 2 | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBRedMana | SpellDescription$ Add {R}. Put two +1/+1 counters on up to one target creature you control. SVar:DBRedMana:DB$ Mana | Produced$ R SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | SpellDescription$ You gain life equal to the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower DeckHas:Ability$Counters|LifeGain Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Target creature you control fights up to one target creature you don't control.\nII — Add {R}. Put two +1/+1 counters on up to one target creature you control.\nIII — You gain life equal to the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/c/carrion_grub.txt b/forge-gui/res/cardsfolder/c/carrion_grub.txt index 91827f85a27..6c0c8e9f88d 100644 --- a/forge-gui/res/cardsfolder/c/carrion_grub.txt +++ b/forge-gui/res/cardsfolder/c/carrion_grub.txt @@ -3,7 +3,7 @@ ManaCost:3 B Types:Creature Insect PT:0/5 S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | Description$ CARDNAME gets +X/+0, where X is the greatest power among creature cards in your graveyard. -SVar:X:Count$GreatestPowerGraveyard_Creature.YouOwn +SVar:X:Count$ValidGraveyard Creature.YouOwn$GreatestPower T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When CARDNAME enters the battlefield, mill four cards. SVar:TrigMill:DB$ Mill | Defined$ You | NumCards$ 4 DeckHas:Ability$Graveyard diff --git a/forge-gui/res/cardsfolder/d/discerning_taste.txt b/forge-gui/res/cardsfolder/d/discerning_taste.txt index a3dabc0f9e7..b8cf8b46b3c 100644 --- a/forge-gui/res/cardsfolder/d/discerning_taste.txt +++ b/forge-gui/res/cardsfolder/d/discerning_taste.txt @@ -4,7 +4,7 @@ Types:Sorcery A:SP$ Dig | DigNum$ 4 | DestinationZone2$ Graveyard | RememberMovedToZone$ 2 | SubAbility$ DBLifeGain | StackDescription$ SpellDescription | SpellDescription$ Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. You gain life equal to the greatest power among creature cards put into your graveyard this way. SVar:DBLifeGain:DB$ GainLife | Defined$ You | LifeAmount$ X | SubAbility$ DBCleanup | StackDescription$ None SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$GreatestPowerGraveyard_Creature.IsRemembered +SVar:X:Count$ValidGraveyard Creature.IsRemembered$GreatestPower DeckHints:Ability$Graveyard DeckHas:Ability$LifeGain Oracle:Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. You gain life equal to the greatest power among creature cards put into your graveyard this way. diff --git a/forge-gui/res/cardsfolder/e/essence_harvest.txt b/forge-gui/res/cardsfolder/e/essence_harvest.txt index db6b2cac9c5..83d4441ef1b 100644 --- a/forge-gui/res/cardsfolder/e/essence_harvest.txt +++ b/forge-gui/res/cardsfolder/e/essence_harvest.txt @@ -3,5 +3,5 @@ ManaCost:2 B Types:Sorcery A:SP$ LoseLife | Cost$ 2 B | ValidTgts$ Player | TgtPrompt$ Select target player | LifeAmount$ X | SubAbility$ DBGainLife | SpellDescription$ Target player loses X life and you gain X life, where X is the highest power amongst creatures you control. SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Target player loses X life and you gain X life, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/f/flourishing_hunter.txt b/forge-gui/res/cardsfolder/f/flourishing_hunter.txt index dc80d276dbf..7ee5452d0a5 100644 --- a/forge-gui/res/cardsfolder/f/flourishing_hunter.txt +++ b/forge-gui/res/cardsfolder/f/flourishing_hunter.txt @@ -4,6 +4,6 @@ Types:Creature Wolf Spirit PT:6/6 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain life equal to the greatest toughness among other creatures you control. SVar:TrigGainLife:DB$ GainLife | LifeAmount$ X -SVar:X:Count$GreatestToughness_Creature.YouCtrl+Other +SVar:X:Count$Valid Creature.YouCtrl+Other$GreatestToughness DeckHas:Ability$LifeGain Oracle:When Flourishing Hunter enters the battlefield, you gain life equal to the greatest toughness among other creatures you control. diff --git a/forge-gui/res/cardsfolder/f/fungal_sprouting.txt b/forge-gui/res/cardsfolder/f/fungal_sprouting.txt index d2e9dd49406..a6bd1f9cdba 100644 --- a/forge-gui/res/cardsfolder/f/fungal_sprouting.txt +++ b/forge-gui/res/cardsfolder/f/fungal_sprouting.txt @@ -2,6 +2,6 @@ Name:Fungal Sprouting ManaCost:3 G Types:Sorcery A:SP$ Token | Cost$ 3 G | TokenAmount$ X | TokenScript$ g_1_1_saproling | TokenOwner$ You | SpellDescription$ Create X 1/1 green Saproling creature tokens, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower DeckHas:Ability$Token Oracle:Create X 1/1 green Saproling creature tokens, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/g/garruk_primal_hunter.txt b/forge-gui/res/cardsfolder/g/garruk_primal_hunter.txt index c93bbf1ed2e..7ee32c34c2f 100644 --- a/forge-gui/res/cardsfolder/g/garruk_primal_hunter.txt +++ b/forge-gui/res/cardsfolder/g/garruk_primal_hunter.txt @@ -4,7 +4,7 @@ Types:Legendary Planeswalker Garruk Loyalty:3 A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenScript$ g_3_3_beast | TokenOwner$ You | SpellDescription$ Create a 3/3 green Beast creature token. A:AB$ Draw | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Defined$ You | NumCards$ X | SpellDescription$ Draw cards equal to the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower A:AB$ Token | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | TokenAmount$ Y | TokenScript$ g_6_6_wurm | TokenOwner$ You | SpellDescription$ Create a 6/6 green Wurm creature token for each land you control. SVar:Y:Count$Valid Land.YouCtrl Oracle:[+1]: Create a 3/3 green Beast creature token.\n[-3]: Draw cards equal to the greatest power among creatures you control.\n[-6]: Create a 6/6 green Wurm creature token for each land you control. diff --git a/forge-gui/res/cardsfolder/h/huatli_the_suns_heart.txt b/forge-gui/res/cardsfolder/h/huatli_the_suns_heart.txt index 433d61d4fb4..79832f84a58 100644 --- a/forge-gui/res/cardsfolder/h/huatli_the_suns_heart.txt +++ b/forge-gui/res/cardsfolder/h/huatli_the_suns_heart.txt @@ -4,7 +4,7 @@ Types:Legendary Planeswalker Huatli Loyalty:7 S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME assigns combat damage equal to its toughness rather than its power | Description$ Each creature you control assigns combat damage equal to its toughness rather than its power. A:AB$ GainLife | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | LifeAmount$ X | SpellDescription$ You gain life equal to the greatest toughness among creatures you control. -SVar:X:Count$GreatestToughness_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestToughness SVar:NeedsToPlay:Creature.YouCtrl AI:RemoveDeck:Random DeckHas:Ability$LifeGain diff --git a/forge-gui/res/cardsfolder/h/huatli_warrior_poet.txt b/forge-gui/res/cardsfolder/h/huatli_warrior_poet.txt index 07d111a03d6..6bd038145d2 100644 --- a/forge-gui/res/cardsfolder/h/huatli_warrior_poet.txt +++ b/forge-gui/res/cardsfolder/h/huatli_warrior_poet.txt @@ -3,7 +3,7 @@ ManaCost:3 R W Types:Legendary Planeswalker Huatli Loyalty:3 A:AB$ GainLife | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | LifeAmount$ GreatestPow | SpellDescription$ You gain life equal to the greatest power among creatures you control. -SVar:GreatestPow:Count$GreatestPower_Creature.YouCtrl +SVar:GreatestPow:Count$Valid Creature.YouCtrl$GreatestPower A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenScript$ g_3_3_dinosaur_trample | TokenOwner$ You | SpellDescription$ Create a 3/3 green Dinosaur creature token with trample. A:AB$ DealDamage | Cost$ SubCounter | NumDmg$ X | Planeswalker$ True | Ultimate$ True | ValidTgts$ Creature | TgtPrompt$ Select any number of target creatures | TargetMin$ 1 | TargetMax$ X | DividedAsYouChoose$ X | RememberDamaged$ True | SubAbility$ DBNoBlock | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn. SVar:DBNoBlock:DB$ Pump | KW$ HIDDEN CARDNAME can't block. | Defined$ Remembered | SubAbility$ DBCleanup | StackDescription$ Creatures dealt damage this way can't block this turn. diff --git a/forge-gui/res/cardsfolder/i/impetuous_protege.txt b/forge-gui/res/cardsfolder/i/impetuous_protege.txt index b16cd2cfa53..2d7662aaea7 100644 --- a/forge-gui/res/cardsfolder/i/impetuous_protege.txt +++ b/forge-gui/res/cardsfolder/i/impetuous_protege.txt @@ -5,6 +5,6 @@ PT:0/4 K:Partner:Proud Mentor T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+0 until end of turn, where X is the greatest power among tapped creatures your opponents control. SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X -SVar:X:Count$GreatestPower_Creature.tapped+OppCtrl +SVar:X:Count$Valid Creature.tapped+OppCtrl$GreatestPower DeckHints:Name$Proud Mentor Oracle:Partner with Proud Mentor (When this creature enters the battlefield, target player may put Proud Mentor into their hand from their library, then shuffle.)\nWhenever Impetuous Protege attacks, it gets +X/+0 until end of turn, where X is the greatest power among tapped creatures your opponents control. diff --git a/forge-gui/res/cardsfolder/i/inferno_project.txt b/forge-gui/res/cardsfolder/i/inferno_project.txt index 9aa0b5b85cc..0bc91fe62ba 100644 --- a/forge-gui/res/cardsfolder/i/inferno_project.txt +++ b/forge-gui/res/cardsfolder/i/inferno_project.txt @@ -4,7 +4,7 @@ Types:Creature Elemental PT:0/0 K:Trample K:etbCounter:P1P1:X:no Condition:CARDNAME enters the battlefield with X +1/+1 counters on it, where X is the total mana value of instant and sorcery cards in your graveyard. -SVar:X:Count$SumCMCGraveyard_Instant.YouOwn,Sorcery.YouOwn +SVar:X:Count$ValidGraveyard Instant.YouOwn,Sorcery.YouOwn$SumCMC DeckHas:Ability$Counters DeckNeeds:Type$Instant|Sorcery AI:RemoveDeck:Random diff --git a/forge-gui/res/cardsfolder/i/inscription_of_abundance.txt b/forge-gui/res/cardsfolder/i/inscription_of_abundance.txt index 24fdfb96ef7..f0d1aad1e47 100644 --- a/forge-gui/res/cardsfolder/i/inscription_of_abundance.txt +++ b/forge-gui/res/cardsfolder/i/inscription_of_abundance.txt @@ -9,5 +9,5 @@ SVar:DBPump:DB$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target cr SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature you don't control SVar:X:Count$Kicked.0.1 SVar:Y:Count$Kicked.3.1 -SVar:Z:Count$GreatestPower_Creature.TargetedPlayerCtrl +SVar:Z:Count$Valid Creature.TargetedPlayerCtrl$GreatestPower Oracle:Kicker {2}{G}\nChoose one. If this spell was kicked, choose any number instead.\n• Put two +1/+1 counters on target creature.\n• Target player gains X life, where X is the greatest power among creatures they control.\n• Target creature you control fights target creature you don't control. diff --git a/forge-gui/res/cardsfolder/k/kin_tree_invocation.txt b/forge-gui/res/cardsfolder/k/kin_tree_invocation.txt index 741473108b8..ffca27d3768 100644 --- a/forge-gui/res/cardsfolder/k/kin_tree_invocation.txt +++ b/forge-gui/res/cardsfolder/k/kin_tree_invocation.txt @@ -2,6 +2,6 @@ Name:Kin-Tree Invocation ManaCost:B G Types:Sorcery A:SP$ Token | Cost$ B G | TokenAmount$ 1 | TokenScript$ bg_x_x_spirit_warrior | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control. -SVar:X:Count$GreatestToughness_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestToughness SVar:NeedsToPlay:Creature.YouCtrl Oracle:Create an X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control. diff --git a/forge-gui/res/cardsfolder/l/loxodon_lifechanter.txt b/forge-gui/res/cardsfolder/l/loxodon_lifechanter.txt index 6af1ce7b22e..705631e0df3 100644 --- a/forge-gui/res/cardsfolder/l/loxodon_lifechanter.txt +++ b/forge-gui/res/cardsfolder/l/loxodon_lifechanter.txt @@ -3,10 +3,8 @@ ManaCost:5 W Types:Creature Elephant Cleric PT:4/6 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLife | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may have your life total become the total toughness of creatures you control. -SVar:TrigLife:DB$ PumpAll | ValidCards$ Creature.YouCtrl | RememberAllPumped$ True | SubAbility$ DBSetLife -SVar:DBSetLife:DB$ SetLife | Defined$ You | LifeAmount$ Y | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:Y:Remembered$CardToughness +SVar:TrigLife:DB$ SetLife | Defined$ You | LifeAmount$ Y | SubAbility$ DBCleanup +SVar:Y:Count$Valid Creature.YouCtrl$SumToughness A:AB$ Pump | Cost$ 5 W | NumAtt$ X | NumDef$ X | SpellDescription$ CARDNAME gets +X/+X until end of turn, where X is your life total. SVar:X:Count$YourLifeTotal AI:RemoveDeck:All diff --git a/forge-gui/res/cardsfolder/m/metalwork_colossus.txt b/forge-gui/res/cardsfolder/m/metalwork_colossus.txt index 4ac8855816b..b4dd3a5910f 100644 --- a/forge-gui/res/cardsfolder/m/metalwork_colossus.txt +++ b/forge-gui/res/cardsfolder/m/metalwork_colossus.txt @@ -5,6 +5,6 @@ PT:10/10 S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ This spell costs {X} less to cast, where X is the total mana value of noncreature artifacts you control. A:AB$ ChangeZone | Cost$ Sac<2/Artifact> | Origin$ Graveyard | Destination$ Hand | ActivationZone$ Graveyard | SpellDescription$ Return CARDNAME from your graveyard to your hand. SVar:DiscardMe:1 -SVar:X:Count$SumCMC_Artifact.nonCreature+YouCtrl +SVar:X:Count$Valid Artifact.nonCreature+YouCtrl$SumCMC SVar:AIPreference:SacCost$Artifact.token,Artifact.cmcEQ1,Artifact.cmcEQ2 Oracle:This spell costs {X} less to cast, where X is the total mana value of noncreature artifacts you control.\nSacrifice two artifacts: Return Metalwork Colossus from your graveyard to your hand. diff --git a/forge-gui/res/cardsfolder/m/miming_slime.txt b/forge-gui/res/cardsfolder/m/miming_slime.txt index 22fc35d12df..b7dd2334c94 100644 --- a/forge-gui/res/cardsfolder/m/miming_slime.txt +++ b/forge-gui/res/cardsfolder/m/miming_slime.txt @@ -2,7 +2,7 @@ Name:Miming Slime ManaCost:2 G Types:Sorcery A:SP$ Token | Cost$ 2 G | TokenAmount$ 1 | TokenScript$ g_x_x_ooze | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X green Ooze creature token, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower SVar:NeedsToPlay:Creature.YouCtrl DeckHas:Ability$Token Oracle:Create an X/X green Ooze creature token, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/m/monstrous_onslaught.txt b/forge-gui/res/cardsfolder/m/monstrous_onslaught.txt index f51ea90631c..27a0263d5ce 100644 --- a/forge-gui/res/cardsfolder/m/monstrous_onslaught.txt +++ b/forge-gui/res/cardsfolder/m/monstrous_onslaught.txt @@ -4,7 +4,7 @@ Types:Sorcery A:SP$ DealDamage | Cost$ 3 G G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute damage to | NumDmg$ OrigPower | TargetMin$ Min | TargetMax$ OrigPower | DividedAsYouChoose$ OrigPower | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast this spell. T:Mode$ SpellCast | ValidCard$ Card.Self | Static$ True | Execute$ CountPowerAtCast SVar:CountPowerAtCast:DB$ StoreSVar | SVar$ OrigPower | Type$ Count | Expression$ GreatestPower_Creature.YouCtrl -SVar:OrigPower:Count$GreatestPower_Creature.YouCtrl +SVar:OrigPower:Count$Valid Creature.YouCtrl$GreatestPower SVar:Min:SVar$OrigPower/LimitMax.1 SVar:X:Count$GreatestPower_Creature.YouCtrl Oracle:Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast this spell. diff --git a/forge-gui/res/cardsfolder/o/overwhelming_stampede.txt b/forge-gui/res/cardsfolder/o/overwhelming_stampede.txt index 4c005377f7a..d8ab927f0cf 100644 --- a/forge-gui/res/cardsfolder/o/overwhelming_stampede.txt +++ b/forge-gui/res/cardsfolder/o/overwhelming_stampede.txt @@ -2,5 +2,5 @@ Name:Overwhelming Stampede ManaCost:3 G G Types:Sorcery A:SP$ PumpAll | Cost$ 3 G G | ValidCards$ Creature.YouCtrl | NumAtt$ +X | NumDef$ +X | KW$ Trample | SpellDescription$ Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/p/pathbreaker_ibex.txt b/forge-gui/res/cardsfolder/p/pathbreaker_ibex.txt index 2fa0e922903..f92aefad9bc 100644 --- a/forge-gui/res/cardsfolder/p/pathbreaker_ibex.txt +++ b/forge-gui/res/cardsfolder/p/pathbreaker_ibex.txt @@ -4,6 +4,6 @@ Types:Creature Goat PT:3/3 T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control. SVar:TrigPump:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ X | NumDef$ X | KW$ Trample -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower SVar:HasAttackEffect:TRUE Oracle:Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/p/peema_aether_seer.txt b/forge-gui/res/cardsfolder/p/peema_aether_seer.txt index d2a6b86e34e..62bef89511d 100644 --- a/forge-gui/res/cardsfolder/p/peema_aether_seer.txt +++ b/forge-gui/res/cardsfolder/p/peema_aether_seer.txt @@ -4,6 +4,6 @@ Types:Creature Elf Druid PT:3/2 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEnergy | TriggerDescription$ When CARDNAME enters the battlefield, you get an amount of {E} (energy counters) equal to the greatest power among creatures you control. SVar:TrigEnergy:DB$ PutCounter | Defined$ You | CounterType$ ENERGY | CounterNum$ X -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower A:AB$ Pump | Cost$ PayEnergy<3> | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ HIDDEN CARDNAME blocks each combat if able. | SpellDescription$ Target creature blocks this turn if able. Oracle:When Peema Aether-Seer enters the battlefield, you get an amount of {E} (energy counters) equal to the greatest power among creatures you control.\nPay {E}{E}{E}: Target creature blocks this turn if able. diff --git a/forge-gui/res/cardsfolder/p/primal_empathy.txt b/forge-gui/res/cardsfolder/p/primal_empathy.txt index 6478f105474..ac29e7ccd5b 100644 --- a/forge-gui/res/cardsfolder/p/primal_empathy.txt +++ b/forge-gui/res/cardsfolder/p/primal_empathy.txt @@ -5,7 +5,7 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | E SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ Y | BranchConditionSVarCompare$ GE1 | TrueSubAbility$ Draw | FalseSubAbility$ PutCounter SVar:Draw:DB$ Draw | Defined$ You | NumCards$ 1 SVar:PutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 -SVar:X:Count$GreatestPower_Creature +SVar:X:Count$Valid Creature$GreatestPower SVar:Y:Count$Valid Creature.powerGEX+YouCtrl DeckHas:Ability$Counters Oracle:At the beginning of your upkeep, draw a card if you control a creature with the greatest power among creatures on the battlefield. Otherwise, put a +1/+1 counter on a creature you control. diff --git a/forge-gui/res/cardsfolder/p/prime_speaker_zegana.txt b/forge-gui/res/cardsfolder/p/prime_speaker_zegana.txt index e31189a90ad..4ba5ef6392c 100644 --- a/forge-gui/res/cardsfolder/p/prime_speaker_zegana.txt +++ b/forge-gui/res/cardsfolder/p/prime_speaker_zegana.txt @@ -5,7 +5,7 @@ PT:1/1 K:etbCounter:P1P1:X:no Condition:CARDNAME enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw cards equal to its power. SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ Y -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower SVar:Y:TriggeredCard$CardPower SVar:NeedsToPlayVar:X GE3 Oracle:Prime Speaker Zegana enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control.\nWhen Prime Speaker Zegana enters the battlefield, draw cards equal to its power. diff --git a/forge-gui/res/cardsfolder/r/return_of_the_wildspeaker.txt b/forge-gui/res/cardsfolder/r/return_of_the_wildspeaker.txt index 12618878d41..1e1caa53276 100644 --- a/forge-gui/res/cardsfolder/r/return_of_the_wildspeaker.txt +++ b/forge-gui/res/cardsfolder/r/return_of_the_wildspeaker.txt @@ -3,6 +3,6 @@ ManaCost:4 G Types:Instant A:SP$ Charm | Cost$ 4 G | Choices$ DBDraw,DBPumpAll SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SpellDescription$ Draw cards equal to the greatest power among non-Human creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl+nonHuman +SVar:X:Count$Valid Creature.YouCtrl+nonHuman$GreatestPower SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl+nonHuman | NumAtt$ 3 | NumDef$ 3 | SpellDescription$ Non-Human creatures you control get +3/+3 until end of turn. Oracle:Choose one —\n• Draw cards equal to the greatest power among non-Human creatures you control.\n• Non-Human creatures you control get +3/+3 until end of turn. diff --git a/forge-gui/res/cardsfolder/r/rishkars_expertise.txt b/forge-gui/res/cardsfolder/r/rishkars_expertise.txt index f6c5f46d845..8196a84d0c4 100644 --- a/forge-gui/res/cardsfolder/r/rishkars_expertise.txt +++ b/forge-gui/res/cardsfolder/r/rishkars_expertise.txt @@ -2,6 +2,6 @@ Name:Rishkar's Expertise ManaCost:4 G G Types:Sorcery A:SP$ Draw | Cost$ 4 G G | NumCards$ X | SubAbility$ DBPlay | SpellDescription$ Draw cards equal to the greatest power among creatures you control. You may cast a spell with mana value 5 or less from your hand without paying its mana cost. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower SVar:DBPlay:DB$ Play | Valid$ Card.nonLand+YouOwn | ValidSA$ Spell.cmcLE5 | ValidZone$ Hand | WithoutManaCost$ True | Amount$ 1 | Controller$ You | Optional$ True Oracle:Draw cards equal to the greatest power among creatures you control.\nYou may cast a spell with mana value 5 or less from your hand without paying its mana cost. diff --git a/forge-gui/res/cardsfolder/r/rubblebelt_rioters.txt b/forge-gui/res/cardsfolder/r/rubblebelt_rioters.txt index 486a75be626..08c389dd518 100644 --- a/forge-gui/res/cardsfolder/r/rubblebelt_rioters.txt +++ b/forge-gui/res/cardsfolder/r/rubblebelt_rioters.txt @@ -5,5 +5,5 @@ PT:0/4 K:Haste T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+0 until end of turn, where X is the greatest power among creatures you control. SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Haste\nWhenever Rubblebelt Rioters attacks, it gets +X/+0 until end of turn, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/s/selvala_heart_of_the_wilds.txt b/forge-gui/res/cardsfolder/s/selvala_heart_of_the_wilds.txt index 690d0b70c5d..a7956009718 100644 --- a/forge-gui/res/cardsfolder/s/selvala_heart_of_the_wilds.txt +++ b/forge-gui/res/cardsfolder/s/selvala_heart_of_the_wilds.txt @@ -7,5 +7,5 @@ SVar:TrigDraw:DB$ Draw | OptionalDecider$ TriggeredCardController | Defined$ Tri SVar:Z:TriggeredCard$Valid Card.greatestPower SVar:Y:Count$Valid Card.greatestPower A:AB$ Mana | Cost$ G T | Produced$ Combo Any | Amount$ X | SpellDescription$ Add X mana in any combination of colors, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Whenever another creature enters the battlefield, its controller may draw a card if its power is greater than each other creature's power.\n{G}, {T}: Add X mana in any combination of colors, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/s/spell_rupture.txt b/forge-gui/res/cardsfolder/s/spell_rupture.txt index 7d28981a32f..36139d34234 100644 --- a/forge-gui/res/cardsfolder/s/spell_rupture.txt +++ b/forge-gui/res/cardsfolder/s/spell_rupture.txt @@ -2,5 +2,5 @@ Name:Spell Rupture ManaCost:1 U Types:Instant A:SP$ Counter | Cost$ 1 U | TargetType$ Spell | ValidTgts$ Card | UnlessCost$ X | UnlessPayer$ TargetedController | SpellDescription$ Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control. diff --git a/forge-gui/res/cardsfolder/s/sudden_insight.txt b/forge-gui/res/cardsfolder/s/sudden_insight.txt index 4dccadd8582..9ce10a5c4b3 100644 --- a/forge-gui/res/cardsfolder/s/sudden_insight.txt +++ b/forge-gui/res/cardsfolder/s/sudden_insight.txt @@ -2,5 +2,5 @@ Name:Sudden Insight ManaCost:4 U U Types:Instant A:SP$ Draw | NumCards$ X | SpellDescription$ Draw a card for each different mana value among nonland cards in your graveyard. -SVar:X:Count$DifferentManaValueGraveyard Card.YouOwn+nonLand +SVar:X:Count$ValidGraveyard Card.YouOwn+nonLand$DifferentCMC Oracle:Draw a card for each different mana value among nonland cards in your graveyard. diff --git a/forge-gui/res/cardsfolder/s/szats_will.txt b/forge-gui/res/cardsfolder/s/szats_will.txt index b58201aa459..9134cfc882b 100644 --- a/forge-gui/res/cardsfolder/s/szats_will.txt +++ b/forge-gui/res/cardsfolder/s/szats_will.txt @@ -10,6 +10,6 @@ SVar:DBExile:DB$ ChangeZoneAll | ChangeType$ Card.OppCtrl | Origin$ Graveyard | SVar:DBToken:DB$ Token | TokenScript$ b_0_1_thrull | TokenAmount$ Z | SubAbility$ DBCleanup SVar:X:Count$Compare Y GE1.2.1 SVar:Y:Count$Valid Card.IsCommander+YouCtrl -SVar:Z:Count$GreatestPowerExile_Creature.IsRemembered +SVar:Z:Count$ValidExile Creature.IsRemembered$GreatestPower DeckHas:Ability$Token Oracle:Choose one. If you control a commander as you cast this spell, you may choose both.\n• Each opponent sacrifices a creature they control with the greatest power.\n• Exile all cards from all opponents' graveyards, then create X 0/1 black Thrull creature tokens, where X is the greatest power among creature cards exiled this way. diff --git a/forge-gui/res/cardsfolder/t/the_great_henge.txt b/forge-gui/res/cardsfolder/t/the_great_henge.txt index f7dd7a9387d..a2f7a38713f 100644 --- a/forge-gui/res/cardsfolder/t/the_great_henge.txt +++ b/forge-gui/res/cardsfolder/t/the_great_henge.txt @@ -2,7 +2,7 @@ Name:The Great Henge ManaCost:7 G G Types:Legendary Artifact S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ CARDNAME costs {X} less to cast, where X is the greatest power among creatures you control. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower A:AB$ Mana | Cost$ T | Produced$ G | Amount$ 2 | SubAbility$ DBGainLife | AILogic$ AtOppEOT | SpellDescription$ Add {G}{G}. You gain 2 life. SVar:DBGainLife:DB$ GainLife | LifeAmount$ 2 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonToken+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a nontoken creature enters the battlefield under your control, put a +1/+1 counter on it and draw a card. diff --git a/forge-gui/res/cardsfolder/t/traverse_the_outlands.txt b/forge-gui/res/cardsfolder/t/traverse_the_outlands.txt index c224ebb1089..6d70289c3ab 100644 --- a/forge-gui/res/cardsfolder/t/traverse_the_outlands.txt +++ b/forge-gui/res/cardsfolder/t/traverse_the_outlands.txt @@ -2,5 +2,5 @@ Name:Traverse the Outlands ManaCost:4 G Types:Sorcery A:SP$ ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ X | Tapped$ True | SpellDescription$ Search your library for up to X basic land cards, where X is the greatest power among creatures you control. Put those cards onto the battlefield tapped, then shuffle. -SVar:X:Count$GreatestPower_Creature.YouCtrl +SVar:X:Count$Valid Creature.YouCtrl$GreatestPower Oracle:Search your library for up to X basic land cards, where X is the greatest power among creatures you control. Put those cards onto the battlefield tapped, then shuffle. diff --git a/forge-gui/res/cardsfolder/t/triumph_of_cruelty.txt b/forge-gui/res/cardsfolder/t/triumph_of_cruelty.txt index 39f143c1076..e7544af2716 100644 --- a/forge-gui/res/cardsfolder/t/triumph_of_cruelty.txt +++ b/forge-gui/res/cardsfolder/t/triumph_of_cruelty.txt @@ -3,6 +3,6 @@ ManaCost:2 B Types:Enchantment T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCruelDiscard | TriggerDescription$ At the beginning of your upkeep, target opponent discards a card if you control the creature with the greatest power or tied for the greatest power. SVar:TrigCruelDiscard:DB$ Discard | ValidTgts$ Opponent | NumCards$ 1 | Mode$ TgtChoose | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourCruelty | ConditionSVarCompare$ GEOppsCruelty -SVar:YourCruelty:Count$GreatestPower_Creature.YouCtrl -SVar:OppsCruelty:Count$GreatestPower_Creature.YouDontCtrl +SVar:YourCruelty:Count$Valid Creature.YouCtrl$GreatestPower +SVar:OppsCruelty:Count$Valid Creature.YouDontCtrl$GreatestPower Oracle:At the beginning of your upkeep, target opponent discards a card if you control the creature with the greatest power or tied for the greatest power. diff --git a/forge-gui/res/cardsfolder/t/triumph_of_ferocity.txt b/forge-gui/res/cardsfolder/t/triumph_of_ferocity.txt index 016b4c988a9..2f4bb226d4d 100644 --- a/forge-gui/res/cardsfolder/t/triumph_of_ferocity.txt +++ b/forge-gui/res/cardsfolder/t/triumph_of_ferocity.txt @@ -3,6 +3,6 @@ ManaCost:2 G Types:Enchantment T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigFerociousDraw | TriggerDescription$ At the beginning of your upkeep, draw a card if you control the creature with the greatest power or tied for the greatest power. SVar:TrigFerociousDraw:DB$ Draw | Defined$ You | NumCards$ 1 | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourFerocity | ConditionSVarCompare$ GEOppsFerocity -SVar:YourFerocity:Count$GreatestPower_Creature.YouCtrl -SVar:OppsFerocity:Count$GreatestPower_Creature.YouDontCtrl +SVar:YourFerocity:Count$Valid Creature.YouCtrl$GreatestPower +SVar:OppsFerocity:Count$Valid Creature.YouDontCtrl$GreatestPower Oracle:At the beginning of your upkeep, draw a card if you control the creature with the greatest power or tied for the greatest power. diff --git a/forge-gui/res/cardsfolder/t/tuya_bearclaw.txt b/forge-gui/res/cardsfolder/t/tuya_bearclaw.txt index ed2dc6240a1..46d264a8a50 100644 --- a/forge-gui/res/cardsfolder/t/tuya_bearclaw.txt +++ b/forge-gui/res/cardsfolder/t/tuya_bearclaw.txt @@ -4,7 +4,7 @@ Types:Legendary Creature Human Warrior PT:2/2 T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+X until end of turn, where X is the greatest power among other creatures you control. SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X | NumDef$ X -SVar:X:Count$GreatestPower_Creature.YouCtrl+Other +SVar:X:Count$Valid Creature.YouCtrl+Other$GreatestPower SVar:HasAttackEffect:TRUE DeckHints:Type$Creature Oracle:Whenever Tuya Bearclaw attacks, it gets +X/+X until end of turn, where X is the greatest power among other creatures you control.