From f1201a7e68cdeadcbb3e8dc5fead88e3368a0044 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Sun, 7 Nov 2021 12:45:50 +0100 Subject: [PATCH] Player: Static for CantGainLife --- .../main/java/forge/game/player/Player.java | 7 +-- .../StaticAbilityCantGainLosePayLife.java | 54 +++++++++++++++++++ .../cardsfolder/a/archfiend_of_despair.txt | 2 +- .../res/cardsfolder/a/atarkas_command.txt | 3 +- .../cardsfolder/e/erebos_god_of_the_dead.txt | 3 +- .../res/cardsfolder/e/everlasting_torment.txt | 2 +- .../res/cardsfolder/f/forsaken_wastes.txt | 3 +- .../res/cardsfolder/h/havoc_festival.txt | 3 +- .../cardsfolder/l/leyline_of_punishment.txt | 3 +- .../res/cardsfolder/p/platinum_emperion.txt | 3 +- forge-gui/res/cardsfolder/q/quakebringer.txt | 2 +- .../res/cardsfolder/r/rampaging_ferocidon.txt | 3 +- .../res/cardsfolder/r/roiling_vortex.txt | 3 +- forge-gui/res/cardsfolder/s/skullcrack.txt | 2 +- forge-gui/res/cardsfolder/s/stigma_lasher.txt | 3 +- .../res/cardsfolder/t/teferis_protection.txt | 4 +- .../t/tibalt_rakish_instigator.txt | 2 +- forge-gui/res/cardsfolder/w/witch_hunt.txt | 3 +- 18 files changed, 77 insertions(+), 28 deletions(-) create mode 100644 forge-game/src/main/java/forge/game/staticability/StaticAbilityCantGainLosePayLife.java diff --git a/forge-game/src/main/java/forge/game/player/Player.java b/forge-game/src/main/java/forge/game/player/Player.java index 6ad07f3c382..687b7e65628 100644 --- a/forge-game/src/main/java/forge/game/player/Player.java +++ b/forge-game/src/main/java/forge/game/player/Player.java @@ -105,6 +105,7 @@ import forge.game.spellability.SpellAbility; import forge.game.staticability.StaticAbility; import forge.game.staticability.StaticAbilityCantBeCast; import forge.game.staticability.StaticAbilityCantDraw; +import forge.game.staticability.StaticAbilityCantGainLosePayLife; import forge.game.staticability.StaticAbilityCantPutCounter; import forge.game.trigger.Trigger; import forge.game.trigger.TriggerHandler; @@ -539,7 +540,7 @@ public class Player extends GameEntity implements Comparable { } public final boolean canGainLife() { - return !hasLost() && !hasKeyword("You can't gain life.") && !hasKeyword("Your life total can't change."); + return !hasLost() && !StaticAbilityCantGainLosePayLife.anyCantGainLife(this); } public final int loseLife(int toLose, final boolean damage, final boolean manaBurn) { @@ -607,14 +608,14 @@ public class Player extends GameEntity implements Comparable { } public final boolean canLoseLife() { - return !hasLost() && !hasKeyword("Your life total can't change."); + return !hasLost() && !StaticAbilityCantGainLosePayLife.anyCantLosePayLife(this); } public final boolean canPayLife(final int lifePayment) { if (lifePayment > 0 && life < lifePayment) { return false; } - return (lifePayment <= 0) || !hasKeyword("Your life total can't change."); + return (lifePayment <= 0) || !StaticAbilityCantGainLosePayLife.anyCantLosePayLife(this); } public final boolean payLife(final int lifePayment, final Card source) { diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantGainLosePayLife.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantGainLosePayLife.java new file mode 100644 index 00000000000..59cfaeecf8d --- /dev/null +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantGainLosePayLife.java @@ -0,0 +1,54 @@ +package forge.game.staticability; + +import forge.game.Game; +import forge.game.card.Card; +import forge.game.player.Player; +import forge.game.zone.ZoneType; + +public class StaticAbilityCantGainLosePayLife { + + static String MODE_CANT_GAIN_LIFE = "CantGainLife"; + static String MODE_CANT_CHANGE_LIFE = "CantChangeLife"; + + public static boolean anyCantGainLife(final Player player) { + final Game game = player.getGame(); + for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) { + for (final StaticAbility stAb : ca.getStaticAbilities()) { + if (stAb.isSuppressed() || !stAb.checkConditions()) { + continue; + } + if (!(stAb.getParam("Mode").equals(MODE_CANT_GAIN_LIFE) || stAb.getParam("Mode").equals(MODE_CANT_CHANGE_LIFE))) { + continue; + } + + if (applyCommonAbility(stAb, player)) { + return true; + } + } + } + return false; + } + + public static boolean anyCantLosePayLife(final Player player) { + final Game game = player.getGame(); + for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) { + for (final StaticAbility stAb : ca.getStaticAbilities()) { + if (!stAb.getParam("Mode").equals(MODE_CANT_CHANGE_LIFE) || stAb.isSuppressed() || !stAb.checkConditions()) { + continue; + } + + if (applyCommonAbility(stAb, player)) { + return true; + } + } + } + return false; + } + + public static boolean applyCommonAbility(final StaticAbility stAb, final Player player) { + if (!stAb.matchesValidParam("ValidPlayer", player)) { + return false; + } + return true; + } +} diff --git a/forge-gui/res/cardsfolder/a/archfiend_of_despair.txt b/forge-gui/res/cardsfolder/a/archfiend_of_despair.txt index eba83fa0fbc..8cdc2680e97 100644 --- a/forge-gui/res/cardsfolder/a/archfiend_of_despair.txt +++ b/forge-gui/res/cardsfolder/a/archfiend_of_despair.txt @@ -3,7 +3,7 @@ ManaCost:6 B B Types:Creature Demon PT:6/6 K:Flying -S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ You can't gain life. | Description$ Your opponents can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player.Opponent | Description$ Your opponents can't gain life. T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ RepeatOpps | TriggerDescription$ At the beginning of each end step, each opponent loses life equal to the life they lost this turn. (Damage causes loss of life.) SVar:RepeatOpps:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ TrigLoseLife SVar:TrigLoseLife:DB$ LoseLife | Defined$ Remembered | LifeAmount$ X diff --git a/forge-gui/res/cardsfolder/a/atarkas_command.txt b/forge-gui/res/cardsfolder/a/atarkas_command.txt index b72da0adbf1..01a469f0388 100644 --- a/forge-gui/res/cardsfolder/a/atarkas_command.txt +++ b/forge-gui/res/cardsfolder/a/atarkas_command.txt @@ -3,9 +3,8 @@ ManaCost:R G Types:Instant A:SP$ Charm | Cost$ R G | Choices$ DBNoLife,DBDamage,DBLand,DBPumpAll | CharmNum$ 2 SVar:DBNoLife:DB$ Effect | Name$ Atarka's Command Effect | StaticAbilities$ STCantGain | AILogic$ NoGain | SpellDescription$ Your opponents can't gain life this turn. -SVar:STCantGain:Mode$ Continuous | EffectZone$ Command | Affected$ Player.Opponent | AddKeyword$ You can't gain life. | Description$ Your opponents can't gain life. +SVar:STCantGain:Mode$ CantGainLife | ValidPlayer$ Player.Opponent | Description$ Your opponents can't gain life this turn. SVar:DBDamage:DB$ DealDamage | Defined$ Player.Opponent | NumDmg$ 3 | AILogic$ Good | SpellDescription$ CARDNAME deals 3 damage to each opponent. SVar:DBLand:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 | Optional$ You | SpellDescription$ You may put a land card from your hand onto the battlefield. SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | KW$ Reach | SpellDescription$ Creatures you control get +1/+1 and gain reach until end of turn. -SVar:Picture:http://www.wizards.com/global/images/magic/general/atarkas_command.jpg Oracle:Choose two —\n• Your opponents can't gain life this turn.\n• Atarka's Command deals 3 damage to each opponent.\n• You may put a land card from your hand onto the battlefield.\n• Creatures you control get +1/+1 and gain reach until end of turn. diff --git a/forge-gui/res/cardsfolder/e/erebos_god_of_the_dead.txt b/forge-gui/res/cardsfolder/e/erebos_god_of_the_dead.txt index 4e99c401ca2..747afe6a85f 100644 --- a/forge-gui/res/cardsfolder/e/erebos_god_of_the_dead.txt +++ b/forge-gui/res/cardsfolder/e/erebos_god_of_the_dead.txt @@ -5,9 +5,8 @@ PT:5/7 K:Indestructible S:Mode$ Continuous | Affected$ Card.Self | RemoveType$ Creature | CheckSVar$ X | SVarCompare$ LT5 | Description$ As long as your devotion to black is less than 5, CARDNAME isn't a creature. (Each {B} in the mana costs of permanents you control counts towards your devotion to black.) SVar:X:Count$Devotion.Black -S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ You can't gain life. | Description$ Your opponents can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player.Opponent | Description$ Your opponents can't gain life. A:AB$ Draw | Cost$ 1 B PayLife<2> | NumCards$ 1 | SpellDescription$ Draw a card. SVar:PlayMain1:TRUE SVar:BuffedBy:Permanent.Black -SVar:Picture:http://www.wizards.com/global/images/magic/general/erebos_god_of_the_dead.jpg Oracle:Indestructible\nAs long as your devotion to black is less than five, Erebos isn't a creature. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.)\nYour opponents can't gain life.\n{1}{B}, Pay 2 life: Draw a card. diff --git a/forge-gui/res/cardsfolder/e/everlasting_torment.txt b/forge-gui/res/cardsfolder/e/everlasting_torment.txt index c54cb3fc17d..9bebb75958e 100644 --- a/forge-gui/res/cardsfolder/e/everlasting_torment.txt +++ b/forge-gui/res/cardsfolder/e/everlasting_torment.txt @@ -1,7 +1,7 @@ Name:Everlasting Torment ManaCost:2 BR Types:Enchantment -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. S:Mode$ CantPreventDamage | Description$ Damage can't be prevented. S:Mode$ Continuous | GlobalRule$ All damage is dealt as though its source had wither. | Description$ All damage is dealt as though its source had wither. (A source with wither deals damage to creatures in the form of -1/-1 counters.) SVar:NonStackingEffect:True diff --git a/forge-gui/res/cardsfolder/f/forsaken_wastes.txt b/forge-gui/res/cardsfolder/f/forsaken_wastes.txt index d05ca44ec40..7aa5e5dcbc7 100644 --- a/forge-gui/res/cardsfolder/f/forsaken_wastes.txt +++ b/forge-gui/res/cardsfolder/f/forsaken_wastes.txt @@ -1,11 +1,10 @@ Name:Forsaken Wastes ManaCost:2 B Types:World Enchantment -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ TrigLoseLife | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's upkeep, that player loses 1 life. T:Mode$ BecomesTarget | ValidTarget$ Card.Self | SourceType$ Spell | Execute$ TrigLoseLife5 | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME becomes the target of a spell, that spell's controller loses 5 life. SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredPlayer | LifeAmount$ 1 SVar:TrigLoseLife5:DB$ LoseLife | Defined$ TriggeredSourceController | LifeAmount$ 5 AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/forsaken_wastes.jpg Oracle:Players can't gain life.\nAt the beginning of each player's upkeep, that player loses 1 life.\nWhenever Forsaken Wastes becomes the target of a spell, that spell's controller loses 5 life. diff --git a/forge-gui/res/cardsfolder/h/havoc_festival.txt b/forge-gui/res/cardsfolder/h/havoc_festival.txt index e0eb3cc357a..382465d7dcd 100644 --- a/forge-gui/res/cardsfolder/h/havoc_festival.txt +++ b/forge-gui/res/cardsfolder/h/havoc_festival.txt @@ -1,10 +1,9 @@ Name:Havoc Festival ManaCost:4 B R Types:Enchantment -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ At the beginning of each player's upkeep, that player loses half their life, rounded up. SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredPlayer | LifeAmount$ HavocX SVar:HavocX:TriggeredPlayer$LifeTotal/HalfUp AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/havoc_festival.jpg Oracle:Players can't gain life.\nAt the beginning of each player's upkeep, that player loses half their life, rounded up. diff --git a/forge-gui/res/cardsfolder/l/leyline_of_punishment.txt b/forge-gui/res/cardsfolder/l/leyline_of_punishment.txt index 586a0827abe..e210f0c6813 100644 --- a/forge-gui/res/cardsfolder/l/leyline_of_punishment.txt +++ b/forge-gui/res/cardsfolder/l/leyline_of_punishment.txt @@ -3,9 +3,8 @@ ManaCost:2 R R Types:Enchantment K:MayEffectFromOpeningHand:FromHand SVar:FromHand:DB$ ChangeZone | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield. -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. S:Mode$ CantPreventDamage | Description$ Damage can't be prevented. SVar:NonStackingEffect:True AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_punishment.jpg Oracle:If Leyline of Punishment is in your opening hand, you may begin the game with it on the battlefield.\nPlayers can't gain life.\nDamage can't be prevented. diff --git a/forge-gui/res/cardsfolder/p/platinum_emperion.txt b/forge-gui/res/cardsfolder/p/platinum_emperion.txt index 5dc1097b470..ff194483dda 100644 --- a/forge-gui/res/cardsfolder/p/platinum_emperion.txt +++ b/forge-gui/res/cardsfolder/p/platinum_emperion.txt @@ -2,6 +2,5 @@ Name:Platinum Emperion ManaCost:8 Types:Artifact Creature Golem PT:8/8 -S:Mode$ Continuous | Affected$ You | AddKeyword$ Your life total can't change. | Description$ Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.) -SVar:Picture:http://www.wizards.com/global/images/magic/general/platinum_emperion.jpg +S:Mode$ CantChangeLife | ValidPlayer$ You | Description$ Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.) Oracle:Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.) diff --git a/forge-gui/res/cardsfolder/q/quakebringer.txt b/forge-gui/res/cardsfolder/q/quakebringer.txt index 7f3a6f1e940..581c0210122 100644 --- a/forge-gui/res/cardsfolder/q/quakebringer.txt +++ b/forge-gui/res/cardsfolder/q/quakebringer.txt @@ -2,7 +2,7 @@ Name:Quakebringer ManaCost:3 R R Types:Creature Giant Berserker PT:5/4 -S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ You can't gain life. | Description$ Your opponents can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player.Opponent | Description$ Your opponents can't gain life. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 2 damage to each opponent. This ability triggers only if CARDNAME is on the battlefield or if CARDNAME is in your graveyard and you control a Giant. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Graveyard | IsPresent$ Creature.YouCtrl+Giant | Execute$ TrigDealDamage | Secondary$ True | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 2 damage to each opponent. This ability triggers only if CARDNAME is on the battlefield or if CARDNAME is in your graveyard and you control a Giant. SVar:TrigDealDamage:DB$ DealDamage | NumDmg$ 2 | Defined$ Player.Opponent diff --git a/forge-gui/res/cardsfolder/r/rampaging_ferocidon.txt b/forge-gui/res/cardsfolder/r/rampaging_ferocidon.txt index 3e737fdb013..933fdedfd93 100644 --- a/forge-gui/res/cardsfolder/r/rampaging_ferocidon.txt +++ b/forge-gui/res/cardsfolder/r/rampaging_ferocidon.txt @@ -3,8 +3,7 @@ ManaCost:2 R Types:Creature Dinosaur PT:3/3 K:Menace -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Other | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever another creature enters the battlefield, CARDNAME deals 1 damage to that creature's controller. SVar:TrigDamage:DB$ DealDamage | Defined$ TriggeredCardController | NumDmg$ 1 -SVar:Picture:http://mythicspoiler.com/ixa/cards/rampagingferocidon.jpg Oracle:Menace\nPlayers can't gain life.\nWhenever another creature enters the battlefield, Rampaging Ferocidon deals 1 damage to that creature's controller. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/r/roiling_vortex.txt b/forge-gui/res/cardsfolder/r/roiling_vortex.txt index 9954c413a40..348beb6283d 100755 --- a/forge-gui/res/cardsfolder/r/roiling_vortex.txt +++ b/forge-gui/res/cardsfolder/r/roiling_vortex.txt @@ -5,5 +5,6 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ Trig1Damage | Tri SVar:Trig1Damage:DB$ DealDamage | Defined$ TriggeredPlayer | NumDmg$ 1 T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Player | TriggerZones$ Battlefield | Execute$ Trig5Damage | HasNoManaCost$ True | TriggerDescription$ Whenever a player casts a spell, if no mana was spent to cast that spell, CARDNAME deals 5 damage to that player. SVar:Trig5Damage:DB$ DealDamage | Defined$ TriggeredCardController | NumDmg$ 5 -A:AB$ Pump | Cost$ R | KW$ You can't gain life. | Defined$ Player.Opponent | StackDescription$ SpellDescription | SpellDescription$ Your opponents can't gain life this turn. +A:AB$ Effect | Cost$ R | Name$ Atarka's Command Effect | StaticAbilities$ STCantGain | AILogic$ NoGain | SpellDescription$ Your opponents can't gain life this turn. +SVar:STCantGain:Mode$ CantGainLife | ValidPlayer$ Player.Opponent | Description$ Your opponents can't gain life this turn. Oracle:At the beginning of each player's upkeep, Roiling Vortex deals 1 damage to them.\nWhenever a player casts a spell, if no mana was spent to cast that spell, Roiling Vortex deals 5 damage to that player.\n{R}: Your opponents can't gain life this turn. diff --git a/forge-gui/res/cardsfolder/s/skullcrack.txt b/forge-gui/res/cardsfolder/s/skullcrack.txt index 9d6e64ccfd5..8e44235459b 100644 --- a/forge-gui/res/cardsfolder/s/skullcrack.txt +++ b/forge-gui/res/cardsfolder/s/skullcrack.txt @@ -2,7 +2,7 @@ Name:Skullcrack ManaCost:1 R Types:Instant A:SP$ Effect | Cost$ 1 R | Name$ Skullcrack Effect | StaticAbilities$ STCantGain,STCantPrevent | AILogic$ Burn | SubAbility$ DBDamage | SpellDescription$ Players can't gain life this turn. Damage can't be prevented this turn. CARDNAME deals 3 damage to target player or planeswalker. -SVar:STCantGain:Mode$ Continuous | EffectZone$ Command | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +SVar:STCantGain:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life this turn. SVar:STCantPrevent:Mode$ CantPreventDamage | EffectZone$ Command | Description$ Damage can't be prevented. SVar:DBDamage:DB$ DealDamage | ValidTgts$ Player,Planeswalker | TgtPrompt$ Select target player or planeswalker | NumDmg$ 3 | NoPrevention$ True SVar:Picture:http://www.wizards.com/global/images/magic/general/skullcrack.jpg diff --git a/forge-gui/res/cardsfolder/s/stigma_lasher.txt b/forge-gui/res/cardsfolder/s/stigma_lasher.txt index d9919d32819..1edd7966ef4 100644 --- a/forge-gui/res/cardsfolder/s/stigma_lasher.txt +++ b/forge-gui/res/cardsfolder/s/stigma_lasher.txt @@ -5,6 +5,5 @@ PT:2/2 K:Wither T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | Execute$ TrigEffect | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage to a player, that player can't gain life for the rest of the game. SVar:TrigEffect:DB$ Effect | Name$ Stigma Lasher Effect | StaticAbilities$ CantGainLife | Duration$ Permanent | RememberObjects$ TriggeredTarget -SVar:CantGainLife:Mode$ Continuous | EffectZone$ Command | Affected$ Player.IsRemembered | AddKeyword$ You can't gain life. | Description$ The damaged player can't gain life for the rest of the game. -SVar:Picture:http://www.wizards.com/global/images/magic/general/stigma_lasher.jpg +SVar:CantGainLife:Mode$ CantGainLife | ValidPlayer$ Player.IsRemembered | Description$ The damaged player can't gain life for the rest of the game. Oracle:Wither (This deals damage to creatures in the form of -1/-1 counters.)\nWhenever Stigma Lasher deals damage to a player, that player can't gain life for the rest of the game. diff --git a/forge-gui/res/cardsfolder/t/teferis_protection.txt b/forge-gui/res/cardsfolder/t/teferis_protection.txt index 26b566c2490..d0539861dbd 100644 --- a/forge-gui/res/cardsfolder/t/teferis_protection.txt +++ b/forge-gui/res/cardsfolder/t/teferis_protection.txt @@ -1,7 +1,9 @@ Name:Teferi's Protection ManaCost:2 W Types:Instant -A:SP$ Pump | Cost$ 2 W | Duration$ UntilYourNextTurn | Defined$ You | KW$ Your life total can't change. & Protection from everything | SubAbility$ DBPhases | SpellDescription$ Until your next turn, your life total can't change and you gain protection from everything. All permanents you control phase out. (While they're phased out, they're treated as though they don't exist. They phase in before you untap during your untap step.) Exile Teferi's Protection. +A:SP$ Effect | Name$ Teferi's Protection Effect | StaticAbilities$ STCantChange | SpellDescription$ Until your next turn, your life total can't change and you gain protection from everything. All permanents you control phase out. (While they're phased out, they're treated as though they don't exist. They phase in before you untap during your untap step.) Exile CARDNAME. +SVar:DBPump:DB$ Pump | Defined$ You | KW$ Protection from everything | SubAbility$ DBPhases +STCantChange:Mode$ CantChangeLife | ValidPlayer$ You | Description$ Your life total can't change. SVar:DBPhases:DB$ Phases | Defined$ Valid Permanent.YouCtrl | SubAbility$ DBChange SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile Oracle:Until your next turn, your life total can't change and you gain protection from everything. All permanents you control phase out. (While they're phased out, they're treated as though they don't exist. They phase in before you untap during your untap step.)\nExile Teferi's Protection. diff --git a/forge-gui/res/cardsfolder/t/tibalt_rakish_instigator.txt b/forge-gui/res/cardsfolder/t/tibalt_rakish_instigator.txt index 8aec15d1662..b684a8d4d02 100644 --- a/forge-gui/res/cardsfolder/t/tibalt_rakish_instigator.txt +++ b/forge-gui/res/cardsfolder/t/tibalt_rakish_instigator.txt @@ -2,7 +2,7 @@ Name:Tibalt, Rakish Instigator ManaCost:2 R Types:Legendary Planeswalker Tibalt Loyalty:5 -S:Mode$ Continuous | Affected$ Player.Opponent | AddKeyword$ You can't gain life. | Description$ Your opponents can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Opponent | Description$ Your opponents can't gain life. A:AB$ Token | Cost$ SubCounter<2/LOYALTY> | TokenAmount$ 1 | TokenScript$ r_1_1_devil_burn | TokenOwner$ You | LegacyImage$ r 1 1 devil burn war | Planeswalker$ True | SpellDescription$ Create a 1/1 red Devil creature token "When this creature dies, it deals 1 damage to any target." DeckHas:Ability$Token Oracle:Your opponents can't gain life.\n[−2]: Create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." diff --git a/forge-gui/res/cardsfolder/w/witch_hunt.txt b/forge-gui/res/cardsfolder/w/witch_hunt.txt index 7475a1a132a..06cae0ca0c6 100644 --- a/forge-gui/res/cardsfolder/w/witch_hunt.txt +++ b/forge-gui/res/cardsfolder/w/witch_hunt.txt @@ -1,10 +1,9 @@ Name:Witch Hunt ManaCost:4 R Types:Enchantment -S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life. +S:Mode$ CantGainLife | ValidPlayer$ Player | Description$ Players can't gain life. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDmg | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 4 damage to you. SVar:TrigDmg:DB$ DealDamage | Defined$ You | NumDmg$ 4 T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGainControl | TriggerDescription$ At the beginning of your end step, target opponent chosen at random gains control of CARDNAME. SVar:TrigGainControl:DB$ GainControl | ValidTgts$ Opponent | TargetsAtRandom$ True | Defined$ Self -SVar:Picture:http://www.wizards.com/global/images/magic/general/witch_hunt.jpg Oracle:Players can't gain life.\nAt the beginning of your upkeep, Witch Hunt deals 4 damage to you.\nAt the beginning of your end step, target opponent chosen at random gains control of Witch Hunt.