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 3f22941ab29..15278e49798 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -599,21 +599,8 @@ public class AbilityUtils { // All the following only work for SpellAbilities else if (ability instanceof SpellAbility) { final SpellAbility sa = (SpellAbility) ability; - if (calcX[0].startsWith("Modes")) { - int chosenModes = 0; - SpellAbility sub = sa; - while(sub != null) { - if (!sub.getSVar("CharmOrder").equals("")) { - chosenModes++; - } - sub = sub.getSubAbility(); - } - // Count Math - final String m = CardFactoryUtil.extractOperators(calcX[1]); - val = doXMath(chosenModes, m, card, ability); - } // Player attribute counting - else if (calcX[0].startsWith("TargetedPlayer")) { + if (calcX[0].startsWith("TargetedPlayer")) { final List players = new ArrayList<>(); final SpellAbility saTargeting = sa.getSATargetingPlayer(); if (null != saTargeting) { @@ -1739,14 +1726,11 @@ public class AbilityUtils { } // Count$NumTimesChoseMode if (sq[0].startsWith("NumTimesChoseMode")) { - final SpellAbility root = sa.getRootAbility(); + SpellAbility sub = sa.getRootAbility(); int amount = 0; - if (root != null) { - SpellAbility sub = root; - while(sub != null) { - if (!sub.getSVar("CharmOrder").equals("")) amount++; - sub = sub.getSubAbility(); - } + while (sub != null) { + if (sub.getDirectSVars().containsKey("CharmOrder")) amount++; + sub = sub.getSubAbility(); } return doXMath(amount, expr, c, ctb); } @@ -2037,9 +2021,6 @@ public class AbilityUtils { return doXMath(c.getNetPower() + c.getNetToughness(), expr, c, ctb); } - if (sq[0].equals("CardNumTypes")) { - return doXMath(getNumberOfTypes(c), expr, c, ctb); - } if (sq[0].equals("CardNumNotedTypes")) { return doXMath(c.getNumNotedTypes(), expr, c, ctb); } @@ -2653,21 +2634,6 @@ public class AbilityUtils { return game.getPhaseHandler().getPlanarDiceSpecialActionThisTurn(); } - if (sq[0].contains("CardTypes")) { - return doXMath(getCardTypesFromList(getDefinedCards(c, sq[1], ctb), false), expr, c, ctb); - } - if (sq[0].contains("CardControllerTypes")) { - return doXMath(getCardTypesFromList(player.getCardsIn(ZoneType.listValueOf(sq[1])), false), expr, c, ctb); - } - if (sq[0].contains("CardControllerPermanentTypes")) { - return doXMath(getCardTypesFromList(player.getCardsIn(ZoneType.listValueOf(sq[1])), true), expr, c, ctb); - } - if (sq[0].startsWith("OppTypesInGrave")) { - final PlayerCollection opponents = player.getOpponents(); - CardCollection oppCards = opponents.getCardsIn(ZoneType.Graveyard); - return doXMath(getCardTypesFromList(oppCards, false), expr, c, ctb); - } - if (sq[0].equals("TotalTurns")) { return doXMath(game.getPhaseHandler().getTurn(), expr, c, ctb); } @@ -3680,6 +3646,10 @@ public class AbilityUtils { return doXMath(num, splitString.length > 1 ? splitString[1] : null, source, ctb); } + if (string.startsWith("CardTypes")) { + return doXMath(getCardTypesFromList(paidList, string.startsWith("CardTypesPermanent")), CardFactoryUtil.extractOperators(string), source, ctb); + } + String filteredString = string; Iterable filteredList = paidList; final String[] filter = filteredString.split("_"); @@ -3895,12 +3865,6 @@ public class AbilityUtils { return list; } - public static int getNumberOfTypes(final Card card) { - EnumSet types = EnumSet.noneOf(CardType.CoreType.class); - Iterables.addAll(types, card.getType().getCoreTypes()); - return types.size(); - } - public static int getCardTypesFromList(final Iterable list, boolean permanentTypes) { EnumSet types = EnumSet.noneOf(CardType.CoreType.class); for (Card c1 : list) { diff --git a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java index 5cd1f7021dc..8a93fcfccf6 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java @@ -368,7 +368,7 @@ public class PlayEffect extends SpellAbilityEffect { continue; } - boolean unpayableCost = tgtSA.getHostCard().getManaCost().isNoCost(); + boolean unpayableCost = tgtSA.getPayCosts().getCostMana().getMana().isNoCost(); if (sa.hasParam("WithoutManaCost")) { tgtSA = tgtSA.copyWithNoManaCost(); } else if (sa.hasParam("PlayCost")) { diff --git a/forge-gui/res/cardsfolder/a/altar_of_the_goyf.txt b/forge-gui/res/cardsfolder/a/altar_of_the_goyf.txt index e28f467596c..3583870501a 100644 --- a/forge-gui/res/cardsfolder/a/altar_of_the_goyf.txt +++ b/forge-gui/res/cardsfolder/a/altar_of_the_goyf.txt @@ -4,6 +4,6 @@ Types:Tribal Artifact Lhurgoyf T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | Alone$ True | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of card types among cards in all graveyards. SVar:TrigPump:DB$ Pump | Defined$ TriggeredAttackerLKICopy | NumAtt$ +X | NumDef$ +X S:Mode$ Continuous | Affected$ Creature.Lhurgoyf+YouCtrl | AddKeyword$ Trample | Description$ Lhurgoyf creatures you control have trample. -SVar:X:Count$CardTypes.ValidGraveyard Card +SVar:X:Count$ValidGraveyard Card$CardTypes SVar:PlayMain1:TRUE Oracle:Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of card types among cards in all graveyards.\nLhurgoyf creatures you control have trample. diff --git a/forge-gui/res/cardsfolder/b/baba_lysaga_night_witch.txt b/forge-gui/res/cardsfolder/b/baba_lysaga_night_witch.txt index b6c8549baed..a5456397f42 100644 --- a/forge-gui/res/cardsfolder/b/baba_lysaga_night_witch.txt +++ b/forge-gui/res/cardsfolder/b/baba_lysaga_night_witch.txt @@ -6,6 +6,6 @@ A:AB$ LoseLife | Cost$ T Sac | XMaxLimit$ 3 | CostDesc$ {T}, Sacrif SVar:DBGainThree:DB$ GainLife | LifeAmount$ 3 | SubAbility$ DBDrawThree | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE3 SVar:DBDrawThree:DB$ Draw | NumCards$ 3 | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE3 SVar:X:Count$xPaid -SVar:Y:Count$CardTypes.Sacrificed +SVar:Y:Sacrificed$CardTypes DeckHas:Ability$Sacrifice Oracle:{T}, Sacrifice up to three permanents: If there were three or more card types among the sacrificed permanents, each opponent loses 3 life, you gain 3 life, and you draw three cards. diff --git a/forge-gui/res/cardsfolder/c/chimney_goyf.txt b/forge-gui/res/cardsfolder/c/chimney_goyf.txt index 40e2ac66ea8..2cf2a9a9f31 100644 --- a/forge-gui/res/cardsfolder/c/chimney_goyf.txt +++ b/forge-gui/res/cardsfolder/c/chimney_goyf.txt @@ -4,7 +4,7 @@ Types:Creature Lhurgoyf Imp PT:*/1+* K:Flying S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ CARDNAME's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. -SVar:X:Count$CardTypes.ValidGraveyard Card +SVar:X:Count$ValidGraveyard Card$CardTypes SVar:Y:SVar$X/Plus.1 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME dies, target opponent puts a card from their hand on top of their library. SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Hand | Destination$ Library | LibraryPosition$ 0 | ValidTgts$ Opponent | Chooser$ Targeted | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | IsCurse$ True diff --git a/forge-gui/res/cardsfolder/c/consuming_blob.txt b/forge-gui/res/cardsfolder/c/consuming_blob.txt index 8ad5856cb92..ee3a4a161da 100644 --- a/forge-gui/res/cardsfolder/c/consuming_blob.txt +++ b/forge-gui/res/cardsfolder/c/consuming_blob.txt @@ -3,8 +3,8 @@ ManaCost:3 G G Types:Creature Ooze PT:*/*+1 S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ CARDNAME's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1. -SVar:X:Count$CardControllerTypes.Graveyard -SVar:Y:Count$CardControllerTypes.Graveyard/Plus.1 +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes +SVar:Y:SVar$X/Plus.1 T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, create a green Ooze creature token with "This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1." SVar:TrigToken:DB$ Token | TokenScript$ g_x_y_ooze_types_graveyard DeckHas:Ability$Graveyard|Token diff --git a/forge-gui/res/cardsfolder/d/dusk_feaster.txt b/forge-gui/res/cardsfolder/d/dusk_feaster.txt index d41b5d3b526..6a58f6f9363 100644 --- a/forge-gui/res/cardsfolder/d/dusk_feaster.txt +++ b/forge-gui/res/cardsfolder/d/dusk_feaster.txt @@ -3,7 +3,7 @@ ManaCost:5 B B Types:Creature Vampire PT:4/5 S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ 2 | EffectZone$ All | CheckSVar$ X | SVarCompare$ GE4 | Description$ Delirium — This spell costs {2} less to cast if there are four or more card types among cards in your graveyard. -SVar:X:Count$CardControllerTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes K:Flying DeckHints:Ability$Graveyard|Discard DeckHas:Ability$Delirium diff --git a/forge-gui/res/cardsfolder/e/emrakul_the_promised_end.txt b/forge-gui/res/cardsfolder/e/emrakul_the_promised_end.txt index 1c1e1eb321a..c8ef56f4b69 100644 --- a/forge-gui/res/cardsfolder/e/emrakul_the_promised_end.txt +++ b/forge-gui/res/cardsfolder/e/emrakul_the_promised_end.txt @@ -6,7 +6,7 @@ K:Flying K:Trample K:Protection:Instant:instants S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ This spell costs {1} less to cast for each card type among cards in your graveyard. -SVar:X:Count$CardControllerTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigControlPlayer | TriggerDescription$ When you cast CARDNAME, you gain control of target opponent during that player's next turn. After that turn, that player takes an extra turn. SVar:TrigControlPlayer:DB$ ControlPlayer | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ DBDelTrig SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | DelayedTriggerDefinedPlayer$ Targeted | RememberObjects$ Targeted | Phase$ Cleanup | Execute$ DBAddTurn | Static$ True diff --git a/forge-gui/res/cardsfolder/h/happily_ever_after.txt b/forge-gui/res/cardsfolder/h/happily_ever_after.txt index e70ba93fb40..66116160f81 100644 --- a/forge-gui/res/cardsfolder/h/happily_ever_after.txt +++ b/forge-gui/res/cardsfolder/h/happily_ever_after.txt @@ -7,7 +7,7 @@ SVar:DBDraw:DB$ Draw | Defined$ Player | NumCards$ 1 T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ Z | SVarCompare$ EQ11 | LifeTotal$ You | LifeAmount$ GEW | Execute$ TrigWin | TriggerDescription$ At the beginning of your upkeep, if there are five colors among permanents you control, there are six or more card types among permanents you control and/or cards in your graveyard, and your life total is greater than or equal to your starting life total, you win the game. SVar:TrigWin:DB$ WinsGame | Defined$ You SVar:X:Count$ColorsCtrl Permanent/LimitMax.5 -SVar:Y:Count$CardControllerTypes.Battlefield,Graveyard/LimitMax.6 +SVar:Y:Count$ValidBattlefield,Graveyard Card.YouCtrl$CardTypes/LimitMax.6 SVar:Z:SVar$X/Plus.Y SVar:W:Count$YourStartingLife DeckHas:Ability$LifeGain diff --git a/forge-gui/res/cardsfolder/k/korvold_gleeful_glutton.txt b/forge-gui/res/cardsfolder/k/korvold_gleeful_glutton.txt index 378256914eb..62fe1ae1bd2 100644 --- a/forge-gui/res/cardsfolder/k/korvold_gleeful_glutton.txt +++ b/forge-gui/res/cardsfolder/k/korvold_gleeful_glutton.txt @@ -10,5 +10,5 @@ T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage SVar:DBCounter:DB$ PutCounter | CounterNum$ X | CounterType$ P1P1 | Defined$ Self | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw | NumCards$ X SVar:SacrificedPermanentsTypes:PlayerCountPropertyYou$SacrificedPermanentTypesThisTurn -SVar:X:Count$CardControllerPermanentTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypesPermanent Oracle:This spell costs {1} less to cast for each card type among permanents you've sacrificed this turn.\nFlying, trample, haste\nWhenever Korvold deals combat damage to a player, put X +1/+1 counters on Korvold and draw X cards, where X is the number of permanent types among cards in your graveyard. diff --git a/forge-gui/res/cardsfolder/l/loot_the_key_to_everything.txt b/forge-gui/res/cardsfolder/l/loot_the_key_to_everything.txt index 2df39252865..b1e55a75572 100644 --- a/forge-gui/res/cardsfolder/l/loot_the_key_to_everything.txt +++ b/forge-gui/res/cardsfolder/l/loot_the_key_to_everything.txt @@ -8,5 +8,5 @@ SVar:TrigDig:DB$ Dig | Defined$ You | DigNum$ X | ChangeNum$ All | DestinationZo SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play those cards this turn. SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$CardTypes.Valid Permanent.nonLand+Other+YouCtrl +SVar:X:Count$Valid Permanent.nonLand+Other+YouCtrl$CardTypes Oracle:Ward {1}\nAt the beginning of your upkeep, exile the top X cards of your library, where X is the number of card types among other nonland permanents you control. You may play those cards this turn. diff --git a/forge-gui/res/cardsfolder/l/lucid_dreams.txt b/forge-gui/res/cardsfolder/l/lucid_dreams.txt index 590ef1bd391..76a2b47cdda 100644 --- a/forge-gui/res/cardsfolder/l/lucid_dreams.txt +++ b/forge-gui/res/cardsfolder/l/lucid_dreams.txt @@ -2,6 +2,6 @@ Name:Lucid Dreams ManaCost:3 U U Types:Sorcery A:SP$ Draw | NumCards$ X | SpellDescription$ Draw X cards, where X is the number of card types among cards in your graveyard. -SVar:X:Count$CardControllerTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes DeckHints:Ability$Discard|Graveyard Oracle:Draw X cards, where X is the number of card types among cards in your graveyard. diff --git a/forge-gui/res/cardsfolder/m/matzalantli_the_great_door_the_core.txt b/forge-gui/res/cardsfolder/m/matzalantli_the_great_door_the_core.txt index 4a608861da9..71dabf526c3 100644 --- a/forge-gui/res/cardsfolder/m/matzalantli_the_great_door_the_core.txt +++ b/forge-gui/res/cardsfolder/m/matzalantli_the_great_door_the_core.txt @@ -4,7 +4,7 @@ Types:Legendary Artifact A:AB$ Draw | Cost$ T | SubAbility$ DBDiscard | SpellDescription$ Draw a card, then discard a card. SVar:DBDiscard:DB$ Discard | Mode$ TgtChoose A:AB$ SetState | Cost$ 4 T | Defined$ Self | Mode$ Transform | CheckSVar$ X | SVarCompare$ GE4 | SpellDescription$ Transform CARDNAME. Activate only if there are four or more permanent types among cards in your graveyard. (Artifact, battle, creature, enchantment, land, and planeswalker are permanent types.) -SVar:X:Count$CardControllerPermanentTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypesPermanent DeckHas:Ability$Discard DeckHints:Ability$Graveyard|Mill|Dredge AlternateMode:DoubleFaced diff --git a/forge-gui/res/cardsfolder/m/mount_velus_manticore.txt b/forge-gui/res/cardsfolder/m/mount_velus_manticore.txt index 6a6aa426276..518a1cc769a 100644 --- a/forge-gui/res/cardsfolder/m/mount_velus_manticore.txt +++ b/forge-gui/res/cardsfolder/m/mount_velus_manticore.txt @@ -6,7 +6,7 @@ T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigDiscard | T SVar:TrigDiscard:DB$ Discard | Defined$ You | NumCards$ 1 | Mode$ TgtChoose | RememberDiscarded$ True | SubAbility$ DBImmediateTrigger SVar:DBImmediateTrigger:DB$ ImmediateTrigger | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 | Execute$ TrigDamage | RememberObjects$ RememberedCard | SubAbility$ DBCleanup | TriggerDescription$ When you do, CARDNAME deals X damage to any target, where X is the number of card types the discarded card has. SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Any | NumDmg$ X -SVar:X:TriggerRemembered$CardNumTypes +SVar:X:TriggerRemembered$CardTypes SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True AI:RemoveDeck:Random Oracle:At the beginning of combat on your turn, you may discard a card. When you do, Mount Velus Manticore deals X damage to any target, where X is the number of card types the discarded card has. diff --git a/forge-gui/res/cardsfolder/n/nighthawk_scavenger.txt b/forge-gui/res/cardsfolder/n/nighthawk_scavenger.txt index bd9c52dcd02..6daf40287ff 100644 --- a/forge-gui/res/cardsfolder/n/nighthawk_scavenger.txt +++ b/forge-gui/res/cardsfolder/n/nighthawk_scavenger.txt @@ -6,5 +6,5 @@ K:Flying K:Deathtouch K:Lifelink S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | Description$ CARDNAME's power is equal to 1 plus the number of card types among cards in your opponents' graveyards. (Cards in graveyards have only the characteristics of their front face.) -SVar:X:Count$OppTypesInGrave/Plus.1 +SVar:X:Count$ValidGraveyard Card.OppOwn$CardTypes/Plus.1 Oracle:Flying, deathtouch, lifelink\nNighthawk Scavenger's power is equal to 1 plus the number of card types among cards in your opponents' graveyards. (Cards in graveyards have only the characteristics of their front face.) diff --git a/forge-gui/res/cardsfolder/o/occult_epiphany.txt b/forge-gui/res/cardsfolder/o/occult_epiphany.txt index f770e051943..cb9700d4c2f 100644 --- a/forge-gui/res/cardsfolder/o/occult_epiphany.txt +++ b/forge-gui/res/cardsfolder/o/occult_epiphany.txt @@ -6,6 +6,6 @@ SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose | NumCards$ X | Reme SVar:DBToken:DB$ Token | TokenScript$ w_1_1_spirit_flying | TokenAmount$ Y | SubAbility$ DBCleanup | SpellDescription$ Create a 1/1 white Spirit creature token with flying for each card type among cards discarded this way. SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Count$xPaid -SVar:Y:Count$CardTypes.Remembered +SVar:Y:Remembered$CardTypes DeckHas:Ability$Discard|Token & Type$Spirit Oracle:Draw X cards, then discard X cards. Create a 1/1 white Spirit creature token with flying for each card type among cards discarded this way. diff --git a/forge-gui/res/cardsfolder/p/prophetic_titan.txt b/forge-gui/res/cardsfolder/p/prophetic_titan.txt index e49a1ca022a..58c02b93f4a 100644 --- a/forge-gui/res/cardsfolder/p/prophetic_titan.txt +++ b/forge-gui/res/cardsfolder/p/prophetic_titan.txt @@ -6,6 +6,6 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S SVar:TrigCharm:DB$ Charm | CharmNum$ Count$Compare Y GE4.2.1 | Choices$ DBDealDamage,DBDig | AdditionalDescription$ . If there are four or more card types among cards in your graveyard, choose both. SVar:DBDealDamage:DB$ DealDamage | ValidTgts$ Any | NumDmg$ 4 | SpellDescription$ CARDNAME deals 4 damage to any target. SVar:DBDig:DB$ Dig | DigNum$ 4 | RestRandomOrder$ True | NoReveal$ True | SpellDescription$ Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in a random order. -SVar:Y:Count$CardControllerTypes.Graveyard +SVar:Y:Count$ValidGraveyard Card.YouOwn$CardTypes SVar:PlayMain1:TRUE Oracle:Delirium — When Prophetic Titan enters the battlefield, choose one. If there are four or more card types among cards in your graveyard, choose both instead.\n• Prophetic Titan deals 4 damage to any target.\n• Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in a random order. diff --git a/forge-gui/res/cardsfolder/rebalanced/a-baba_lysaga_night_witch.txt b/forge-gui/res/cardsfolder/rebalanced/a-baba_lysaga_night_witch.txt index 7619468e127..9c22af551c6 100644 --- a/forge-gui/res/cardsfolder/rebalanced/a-baba_lysaga_night_witch.txt +++ b/forge-gui/res/cardsfolder/rebalanced/a-baba_lysaga_night_witch.txt @@ -6,6 +6,6 @@ A:AB$ LoseLife | Cost$ T Sac | Defined$ Player.Opponent | LifeAmoun SVar:DBGainThree:DB$ GainLife | LifeAmount$ 3 | SubAbility$ DBDrawThree | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE3 SVar:DBDrawThree:DB$ Draw | NumCards$ 3 | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE3 SVar:X:Count$ChosenNumber -SVar:Y:Count$CardTypes.Sacrificed +SVar:Y:Sacrificed$CardTypes DeckHas:Ability$Sacrifice Oracle:{T}, Sacrifice up to three permanents: If there were three or more card types among the sacrificed permanents, each opponent loses 3 life, you gain 3 life, and you draw three cards. diff --git a/forge-gui/res/cardsfolder/rebalanced/a-unholy_heat.txt b/forge-gui/res/cardsfolder/rebalanced/a-unholy_heat.txt index e677adfc180..1b70d522b40 100644 --- a/forge-gui/res/cardsfolder/rebalanced/a-unholy_heat.txt +++ b/forge-gui/res/cardsfolder/rebalanced/a-unholy_heat.txt @@ -3,5 +3,5 @@ ManaCost:R Types:Instant A:SP$ DealDamage | Cost$ R | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ X | SpellDescription$ CARDNAME deals 2 damage to target creature or planeswalker. Delirium — CARDNAME deals 4 damage instead if there are four or more card types among cards in your graveyard. SVar:X:Count$Compare Y GE4.4.2 -SVar:Y:Count$CardControllerTypes.Graveyard +SVar:Y:Count$ValidGraveyard Card.YouOwn$CardTypes Oracle:Unholy Heat deals 2 damage to target creature or planeswalker.\nDelirium — Unholy Heat deals 4 damage instead if there are four or more card types among cards in your graveyard. diff --git a/forge-gui/res/cardsfolder/s/scour_the_laboratory.txt b/forge-gui/res/cardsfolder/s/scour_the_laboratory.txt index 0cffdf13ebd..bed7dbfb676 100644 --- a/forge-gui/res/cardsfolder/s/scour_the_laboratory.txt +++ b/forge-gui/res/cardsfolder/s/scour_the_laboratory.txt @@ -2,7 +2,7 @@ Name:Scour the Laboratory ManaCost:4 U U Types:Instant S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ 2 | EffectZone$ All | CheckSVar$ X | SVarCompare$ GE4 | Description$ Delirium — This spell costs {2} less to cast if there are four or more card types among cards in your graveyard. -SVar:X:Count$CardControllerTypes.Graveyard +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes A:SP$ Draw | Cost$ 4 U U | NumCards$ 3 | SpellDescription$ Draw three cards. DeckHints:Ability$Graveyard|Discard DeckHas:Ability$Delirium diff --git a/forge-gui/res/cardsfolder/s/stella_lee_wild_card.txt b/forge-gui/res/cardsfolder/s/stella_lee_wild_card.txt index c3f62104dc3..b70d833e648 100644 --- a/forge-gui/res/cardsfolder/s/stella_lee_wild_card.txt +++ b/forge-gui/res/cardsfolder/s/stella_lee_wild_card.txt @@ -7,7 +7,7 @@ SVar:TrigExile:DB$ Dig | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | R SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | Duration$ UntilTheEndOfYourNextTurn | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ Until the end of your next turn, you may play that card. SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -A:AB$ CopySpellAbility | Cost$ T | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | MayChooseTarget$ True | CheckSVar$ Count$ThisTurnCast_Card.YouCtrl | SVarCompare$ GE3 | SpellDescription$ Copy target instant or sorcery spell you control. You may choose new targets for the copy. Activate only if you've cast three or more spells this turn. +A:AB$ CopySpellAbility | Cost$ T | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TargetType$ Spell | MayChooseTarget$ True | CheckSVar$ Count$ThisTurnCast_Card.YouCtrl | SVarCompare$ GE3 | SpellDescription$ Copy target instant or sorcery spell you control. You may choose new targets for the copy. Activate only if you've cast three or more spells this turn. DeckNeeds:Type$Instant|Sorcery DeckHints:Keyword$Flash Oracle:Whenever you cast your second spell each turn, exile the top card of your library. Until the end of your next turn, you may play that card.\n{T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy. Activate only if you've cast three or more spells this turn. diff --git a/forge-gui/res/cardsfolder/t/tarmogoyf.txt b/forge-gui/res/cardsfolder/t/tarmogoyf.txt index e2921310068..36625d6adc9 100644 --- a/forge-gui/res/cardsfolder/t/tarmogoyf.txt +++ b/forge-gui/res/cardsfolder/t/tarmogoyf.txt @@ -3,6 +3,6 @@ ManaCost:1 G Types:Creature Lhurgoyf PT:*/1+* S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ CARDNAME's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. -SVar:X:Count$CardTypes.ValidGraveyard Card +SVar:X:Count$ValidGraveyard Card$CardTypes SVar:Y:SVar$X/Plus.1 Oracle:Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. diff --git a/forge-gui/res/cardsfolder/u/unholy_heat.txt b/forge-gui/res/cardsfolder/u/unholy_heat.txt index 650788cd5a2..faf6a1a473c 100644 --- a/forge-gui/res/cardsfolder/u/unholy_heat.txt +++ b/forge-gui/res/cardsfolder/u/unholy_heat.txt @@ -3,5 +3,5 @@ ManaCost:R Types:Instant A:SP$ DealDamage | Cost$ R | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ X | SpellDescription$ CARDNAME deals 2 damage to target creature or planeswalker. Delirium — CARDNAME deals 6 damage instead if there are four or more card types among cards in your graveyard. SVar:X:Count$Compare Y GE4.6.2 -SVar:Y:Count$CardControllerTypes.Graveyard +SVar:Y:Count$ValidGraveyard Card.YouOwn$CardTypes Oracle:Unholy Heat deals 2 damage to target creature or planeswalker.\nDelirium — Unholy Heat deals 6 damage instead if there are four or more card types among cards in your graveyard. diff --git a/forge-gui/res/tokenscripts/g_x_y_ooze_types_graveyard.txt b/forge-gui/res/tokenscripts/g_x_y_ooze_types_graveyard.txt index 0578dd8011a..dc6c64395f2 100644 --- a/forge-gui/res/tokenscripts/g_x_y_ooze_types_graveyard.txt +++ b/forge-gui/res/tokenscripts/g_x_y_ooze_types_graveyard.txt @@ -4,6 +4,6 @@ Types:Creature Ooze Colors:green PT:*/*+1 S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1. -SVar:X:Count$CardControllerTypes.Graveyard -SVar:Y:Count$CardControllerTypes.Graveyard/Plus.1 +SVar:X:Count$ValidGraveyard Card.YouOwn$CardTypes +SVar:Y:SVar$X/Plus.1 Oracle:This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.