From c0d729cddac3fd95caff3efbc2b4efb11aac477b Mon Sep 17 00:00:00 2001 From: tool4ever Date: Sun, 5 Mar 2023 14:26:17 +0100 Subject: [PATCH] Fix refund timing (#2618) --- .../src/main/java/forge/ai/ComputerUtilMana.java | 8 +++----- .../java/forge/game/card/CardFactoryUtil.java | 15 +++++---------- .../res/cardsfolder/b/biblioplex_assistant.txt | 2 +- .../res/cardsfolder/c/canoptek_tomb_sentinel.txt | 2 +- forge-gui/res/cardsfolder/c/citizens_arrest.txt | 2 +- forge-gui/res/cardsfolder/d/dazzling_sphinx.txt | 2 +- forge-gui/res/cardsfolder/d/deadwood_treefolk.txt | 2 +- forge-gui/res/cardsfolder/g/green_slime.txt | 2 +- forge-gui/res/cardsfolder/h/hissing_miasma.txt | 2 +- .../res/cardsfolder/h/hunter_of_eyeblights.txt | 2 +- .../res/cardsfolder/i/ixhel_scion_of_atraxa.txt | 2 +- .../res/cardsfolder/j/juggernaut_peddler.txt | 2 +- forge-gui/res/cardsfolder/p/prison_realm.txt | 2 +- forge-gui/res/cardsfolder/r/radiant_epicure.txt | 2 +- .../res/cardsfolder/r/righteous_valkyrie.txt | 2 +- forge-gui/res/cardsfolder/r/rivaz_of_the_claw.txt | 2 +- .../res/cardsfolder/s/stone_retrieval_unit.txt | 2 +- .../res/cardsfolder/t/tyrannical_pitlord.txt | 2 +- .../res/cardsfolder/upcoming/phyresis_roach.txt | 2 +- .../main/java/forge/player/HumanCostDecision.java | 6 ------ 20 files changed, 25 insertions(+), 38 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index d4419d083f4..72c139ed4af 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -686,7 +686,7 @@ public class ComputerUtilMana { } boolean hasConverge = sa.getHostCard().hasConverge(); ListMultimap sourcesForShards = getSourcesForShards(cost, sa, ai, test, - checkPlayable, manaSpentToPay, hasConverge, ignoreColor, ignoreType); + checkPlayable, hasConverge, ignoreColor, ignoreType); int testEnergyPool = ai.getCounters(CounterEnumType.ENERGY); final ManaPool manapool = ai.getManaPool(); @@ -722,7 +722,7 @@ public class ComputerUtilMana { } if (sourcesForShards == null && !purePhyrexian) { - return false; // no mana abilities to use for paying + break; // no mana abilities to use for paying } toPay = getNextShardToPay(cost); @@ -916,13 +916,11 @@ public class ComputerUtilMana { */ private static ListMultimap getSourcesForShards(final ManaCostBeingPaid cost, final SpellAbility sa, final Player ai, final boolean test, final boolean checkPlayable, - List manaSpentToPay, final boolean hasConverge, final boolean ignoreColor, final boolean ignoreType) { + final boolean hasConverge, final boolean ignoreColor, final boolean ignoreType) { // arrange all mana abilities by color produced. final ListMultimap manaAbilityMap = groupSourcesByManaColor(ai, checkPlayable); if (manaAbilityMap.isEmpty()) { // no mana abilities, bailing out - ManaPool.refundMana(manaSpentToPay, ai, sa); - CostPayment.handleOfferings(sa, test, cost.isPaid()); return null; } if (DEBUG_MANA_PAYMENT) { diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 540b7c3e0ad..e2dba01db83 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1683,8 +1683,7 @@ public class CardFactoryUtil { final String recoverCost = keyword.split(":")[1]; final String changeStr = "DB$ ChangeZone | Defined$ Self" + " | Origin$ Graveyard | Destination$ Hand | UnlessCost$ " - + recoverCost + " | UnlessPayer$ You | UnlessSwitched$ True" - + " | UnlessResolveSubs$ WhenNotPaid"; + + recoverCost + " | UnlessPayer$ You | UnlessSwitched$ True | UnlessResolveSubs$ WhenNotPaid"; final String exileStr = "DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Exile"; SpellAbility changeSA = AbilityFactory.getAbility(changeStr, card); @@ -1700,13 +1699,11 @@ public class CardFactoryUtil { String trigObject = card.isCreature() ? "Creature.Other+YouOwn" : "Creature.YouOwn"; String trigArticle = card.isCreature() ? "another" : "a"; String trigStr = "Mode$ ChangesZone | ValidCard$ " + trigObject - + " | Origin$ Battlefield | Destination$ Graveyard | " - + "TriggerZones$ Graveyard | Secondary$ True | " + + " | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Graveyard | Secondary$ True | " + "TriggerDescription$ Recover " + costDesc + " (When " + trigArticle + " creature is " + "put into your graveyard from the battlefield, you " + "may pay " + costDesc + ". If you do, return " - + "CARDNAME from your graveyard to your hand. Otherwise," - + " exile CARDNAME.)"; + + "CARDNAME from your graveyard to your hand. Otherwise, exile CARDNAME.)"; final Trigger myTrigger = TriggerHandler.parseTrigger(trigStr, card, intrinsic); changeSA.setIntrinsic(intrinsic); myTrigger.setOverridingAbility(changeSA); @@ -1732,8 +1729,7 @@ public class CardFactoryUtil { final String abString = "DB$ PeekAndReveal | PeekAmount$ " + num + " | RememberRevealed$ True"; final String dbCast = "DB$ Play | Valid$ Card.IsRemembered+sameName | ValidSA$ Spell | " + - "ValidZone$ Library | WithoutManaCost$ True | Optional$ True | " + - "Amount$ All"; + "ValidZone$ Library | WithoutManaCost$ True | Optional$ True | Amount$ All"; final String toBottom = "DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered " + "| Origin$ Library | Destination$ Library | LibraryPosition$ -1"; @@ -1974,8 +1970,7 @@ public class CardFactoryUtil { upkeepTrig.append(" | TriggerDescription$ At the beginning of your upkeep, " + "if CARDNAME has a time counter on it, remove a time counter from it."); - final String remove = "DB$ RemoveCounter | Defined$ Self" + - " | CounterType$ TIME | CounterNum$ 1"; + final String remove = "DB$ RemoveCounter | Defined$ Self | CounterType$ TIME | CounterNum$ 1"; final Trigger parsedUpkeepTrig = TriggerHandler.parseTrigger(upkeepTrig.toString(), card, intrinsic); parsedUpkeepTrig.setOverridingAbility(AbilityFactory.getAbility(remove, card)); diff --git a/forge-gui/res/cardsfolder/b/biblioplex_assistant.txt b/forge-gui/res/cardsfolder/b/biblioplex_assistant.txt index b360853ce82..4aaa51aa27c 100644 --- a/forge-gui/res/cardsfolder/b/biblioplex_assistant.txt +++ b/forge-gui/res/cardsfolder/b/biblioplex_assistant.txt @@ -4,5 +4,5 @@ Types:Artifact Creature Gargoyle PT:2/1 K:Flying T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, put up to one target instant or sorcery card from your graveyard on top of your library. -SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TgtPrompt$ Select target instant or sorcery card from your graveyard | TargetMin$ 0 | TargetMax$ 1 | SpellDescription$ When CARDNAME enters the battlefield, put up to one target instant or sorcery card from your graveyard on top of your library. +SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TgtPrompt$ Select target instant or sorcery card from your graveyard | TargetMin$ 0 | TargetMax$ 1 Oracle:Flying\nWhen Biblioplex Assistant enters the battlefield, put up to one target instant or sorcery card from your graveyard on top of your library. diff --git a/forge-gui/res/cardsfolder/c/canoptek_tomb_sentinel.txt b/forge-gui/res/cardsfolder/c/canoptek_tomb_sentinel.txt index 9b298c2a7fd..2c987577822 100644 --- a/forge-gui/res/cardsfolder/c/canoptek_tomb_sentinel.txt +++ b/forge-gui/res/cardsfolder/c/canoptek_tomb_sentinel.txt @@ -3,7 +3,7 @@ ManaCost:4 Types:Artifact Creature Insect PT:4/3 K:Vigilance -T:Mode$ ChangesZone | Origin$ Graveyard | Destination$ Battlefield | TriggerZones$ Battlefield | ValidCard$ Card.Self | Execute$ DBChangeZone | SpellDescription$ Exile Cannon — When CARDNAME enters the battlefield from a graveyard, exile up to one target nonland permanent. +T:Mode$ ChangesZone | Origin$ Graveyard | Destination$ Battlefield | TriggerZones$ Battlefield | ValidCard$ Card.Self | Execute$ DBChangeZone | TriggerDescription$ Exile Cannon — When CARDNAME enters the battlefield from a graveyard, exile up to one target nonland permanent. SVar:DBChangeZone:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand | TargetMin$ 0 | TargetMax$ 1 K:Unearth:7 DeckHas:Ability$Graveyard diff --git a/forge-gui/res/cardsfolder/c/citizens_arrest.txt b/forge-gui/res/cardsfolder/c/citizens_arrest.txt index e9b48bc6021..2a882058ddb 100644 --- a/forge-gui/res/cardsfolder/c/citizens_arrest.txt +++ b/forge-gui/res/cardsfolder/c/citizens_arrest.txt @@ -1,7 +1,7 @@ Name:Citizen's Arrest ManaCost:1 W W Types:Enchantment -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | SpellDescription$ When CARDNAME enters the battlefield, exile target creature or planeswalker an opponent controls until CARDNAME leaves the battlefield. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target creature or planeswalker an opponent controls until CARDNAME leaves the battlefield. SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.OppCtrl,Planeswalker.OppCtrl | Duration$ UntilHostLeavesPlay SVar:PlayMain1:TRUE Oracle:When Citizen's Arrest enters the battlefield, exile target creature or planeswalker an opponent controls until Citizen's Arrest leaves the battlefield. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/d/dazzling_sphinx.txt b/forge-gui/res/cardsfolder/d/dazzling_sphinx.txt index f95bb14b3fe..d22879d836c 100644 --- a/forge-gui/res/cardsfolder/d/dazzling_sphinx.txt +++ b/forge-gui/res/cardsfolder/d/dazzling_sphinx.txt @@ -4,7 +4,7 @@ Types:Creature Sphinx PT:4/5 K:Flying T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDigUntil | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, that player exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost. Then that player puts the exiled cards that weren't cast this way on the bottom of their library in a random order. -SVar:TrigDigUntil:DB$ DigUntil | Defined$ TriggeredTarget | Valid$ Instant,Sorcery | ValidDescription$ instant or sorcery | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | RememberRevealed$ True | IsCurse$ True | SubAbility$ DBPlay | SpellDescription$ Whenever CARDNAME deals combat damage to a player, that player exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost. Then that player puts the exiled cards that weren't cast this way on the bottom of their library in a random order. +SVar:TrigDigUntil:DB$ DigUntil | Defined$ TriggeredTarget | Valid$ Instant,Sorcery | ValidDescription$ instant or sorcery | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | RememberRevealed$ True | IsCurse$ True | SubAbility$ DBPlay SVar:DBPlay:DB$ Play | Defined$ Remembered | ValidZone$ Exile | Valid$ Instant.IsRemembered,Sorcery.IsRemembered | ValidSA$ Spell | WithoutManaCost$ True | RememberObjects$ Remembered | Optional$ True | ForgetPlayed$ True | SubAbility$ DBRestRandomOrder SVar:DBRestRandomOrder:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Exile | Destination$ Library | LibraryPosition$ -1 | RandomOrder$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True diff --git a/forge-gui/res/cardsfolder/d/deadwood_treefolk.txt b/forge-gui/res/cardsfolder/d/deadwood_treefolk.txt index 02b6fc29c40..fe47bc78da7 100644 --- a/forge-gui/res/cardsfolder/d/deadwood_treefolk.txt +++ b/forge-gui/res/cardsfolder/d/deadwood_treefolk.txt @@ -5,5 +5,5 @@ PT:3/6 K:Vanishing:3 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME enters or leaves the battlefield, return another target creature card from your graveyard to your hand. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReturn | Secondary$ True | TriggerDescription$ When CARDNAME enters or leaves the battlefield, return another target creature card from your graveyard to your hand. -SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.Other | TargetsWithDefinedController$ TriggeredCardController | SpellDescription$ When CARDNAME enters or leaves the battlefield, return another target creature card from your graveyard to your hand. +SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.Other | TargetsWithDefinedController$ TriggeredCardController Oracle:Vanishing 3 (This creature enters the battlefield with three time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)\nWhen Deadwood Treefolk enters or leaves the battlefield, return another target creature card from your graveyard to your hand. diff --git a/forge-gui/res/cardsfolder/g/green_slime.txt b/forge-gui/res/cardsfolder/g/green_slime.txt index 0d33e2c3a2d..f675db5c4ad 100644 --- a/forge-gui/res/cardsfolder/g/green_slime.txt +++ b/forge-gui/res/cardsfolder/g/green_slime.txt @@ -4,7 +4,7 @@ Types:Creature Ooze PT:2/2 K:Flash K:Foretell: G -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounterAbility | SpellDescription$ When CARDNAME enters the battlefield, counter target activated or triggered ability from an artifact or enchantment source. If a permanent's ability is countered this way, destroy that permanent. +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounterAbility | TriggerDescription$ When CARDNAME enters the battlefield, counter target activated or triggered ability from an artifact or enchantment source. If a permanent's ability is countered this way, destroy that permanent. SVar:TrigCounterAbility:DB$ Counter | TargetType$ Activated,Triggered | TgtPrompt$ Select target activated or triggered ability from an artifact or enchantment source | ValidTgts$ Artifact,Enchantment | DestroyPermanent$ True AI:RemoveDeck:Random Oracle:Flash\nWhen Green Slime enters the battlefield, counter target activated or triggered ability from an artifact or enchantment source. If a permanent's ability is countered this way, destroy that permanent.\nFortell {G} diff --git a/forge-gui/res/cardsfolder/h/hissing_miasma.txt b/forge-gui/res/cardsfolder/h/hissing_miasma.txt index 6d839252336..0c1b1075e21 100644 --- a/forge-gui/res/cardsfolder/h/hissing_miasma.txt +++ b/forge-gui/res/cardsfolder/h/hissing_miasma.txt @@ -2,5 +2,5 @@ Name:Hissing Miasma ManaCost:1 B B Types:Enchantment T:Mode$ Attacks | ValidCard$ Creature | Attacked$ You | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a creature attacks you, its controller loses 1 life. -SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredAttackerController | LifeAmount$ 1 | SpellDescription$ Whenever a creature attacks you, its controller loses 1 life. +SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredAttackerController | LifeAmount$ 1 Oracle:Whenever a creature attacks you, its controller loses 1 life. diff --git a/forge-gui/res/cardsfolder/h/hunter_of_eyeblights.txt b/forge-gui/res/cardsfolder/h/hunter_of_eyeblights.txt index e9c4e8b9dca..8c5d7e3b6dd 100644 --- a/forge-gui/res/cardsfolder/h/hunter_of_eyeblights.txt +++ b/forge-gui/res/cardsfolder/h/hunter_of_eyeblights.txt @@ -3,6 +3,6 @@ ManaCost:3 B B Types:Creature Elf Assassin PT:3/3 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounterOpp | TriggerDescription$ When CARDNAME enters the battlefield, put a +1/+1 counter on target creature you don't control. -SVar:TrigPutCounterOpp:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Choose target creature you don't control | SpellDescription$ When CARDNAME enters the battlefield, put a +1/+1 counter on target creature you don't control. +SVar:TrigPutCounterOpp:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Choose target creature you don't control A:AB$ Destroy | Cost$ 2 B T | ValidTgts$ Creature.HasCounters | TgtPrompt$ Select target creature with a counter on it | SpellDescription$ Destroy target creature with a counter on it. Oracle:When Hunter of Eyeblights enters the battlefield, put a +1/+1 counter on target creature you don't control.\n{2}{B}, {T}: Destroy target creature with a counter on it. diff --git a/forge-gui/res/cardsfolder/i/ixhel_scion_of_atraxa.txt b/forge-gui/res/cardsfolder/i/ixhel_scion_of_atraxa.txt index 8c7cd8473e3..1b82c11563d 100644 --- a/forge-gui/res/cardsfolder/i/ixhel_scion_of_atraxa.txt +++ b/forge-gui/res/cardsfolder/i/ixhel_scion_of_atraxa.txt @@ -5,7 +5,7 @@ PT:2/5 K:Flying K:Vigilance K:Toxic:2 -T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigExile | TriggerDesciption$ Corrupted — At the beginning of your end step, each opponent who has three or more poison counters exiles the top card of their library face down. You may look at and play those cards for as long as they remain exiled, and you may spend many as though it were mana of any color to cast those spells. +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigExile | TriggerDescription$ Corrupted — At the beginning of your end step, each opponent who has three or more poison counters exiles the top card of their library face down. You may look at and play those cards for as long as they remain exiled, and you may spend many as though it were mana of any color to cast those spells. SVar:TrigExile:DB$ Dig | DigNum$ 1 | ChangeNum$ All | Defined$ Opponent.IsCorrupted | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True | SubAbility$ DBEffect SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STLookPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup SVar:STLookPlay:Mode$ Continuous | MayLookAt$ You | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may look at and play that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell. diff --git a/forge-gui/res/cardsfolder/j/juggernaut_peddler.txt b/forge-gui/res/cardsfolder/j/juggernaut_peddler.txt index 52a07466a23..b7214f371a8 100644 --- a/forge-gui/res/cardsfolder/j/juggernaut_peddler.txt +++ b/forge-gui/res/cardsfolder/j/juggernaut_peddler.txt @@ -3,7 +3,7 @@ ManaCost:W B Types:Creature Human Artificer PT:2/2 K:Vigilance -T:Mode$ ChangesZone | Affected$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigDiscard | SpellDescription$ When CARDNAME enters the battlefield, target player reveals all nonland cards in their hand. You may choose one of those cards. If you do, that player exiles it and conjures a card named Juggernaut into their hand. +T:Mode$ ChangesZone | Affected$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigDiscard | TriggerDescription$ When CARDNAME enters the battlefield, target player reveals all nonland cards in their hand. You may choose one of those cards. If you do, that player exiles it and conjures a card named Juggernaut into their hand. SVar:TrigDiscard:DB$ Reveal | ValidTgts$ Player | TgtPrompt$ Select target player | RevealAllValid$ Card.nonLand+TargetedPlayerCtrl | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | DefinedPlayer$ Targeted | Chooser$ You | Origin$ Hand | Destination$ Exile | ChangeNum$ 1 | ChangeType$ Card.nonLand+TargetedPlayerCtrl | AlreadyRevealed$ True | AILogic$ BestCard | RememberChanged$ True | SubAbility$ DBConjure SVar:DBConjure:DB$ MakeCard | ConditionDefined$ Remembered | ConditionPresent$ Card | Conjure$ True | Defined$ TargetedPlayer | Name$ Juggernaut | Zone$ Hand | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/p/prison_realm.txt b/forge-gui/res/cardsfolder/p/prison_realm.txt index 4f59787884d..de6457eb0d8 100644 --- a/forge-gui/res/cardsfolder/p/prison_realm.txt +++ b/forge-gui/res/cardsfolder/p/prison_realm.txt @@ -1,7 +1,7 @@ Name:Prison Realm ManaCost:2 W Types:Enchantment -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target creature or planeswalker an opponent controls until CARDNAME leaves the battlefield. | SpellDescription$ When CARDNAME enters the battlefield, exile target creature or planeswalker an opponent controls until CARDNAME leaves the battlefield. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target creature or planeswalker an opponent controls until CARDNAME leaves the battlefield. SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.OppCtrl,Planeswalker.OppCtrl | TgtPrompt$ Select target creature an opponent controls | Duration$ UntilHostLeavesPlay SVar:PlayMain1:TRUE T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigScry | TriggerDescription$ When CARDNAME enters the battlefield, scry 1. diff --git a/forge-gui/res/cardsfolder/r/radiant_epicure.txt b/forge-gui/res/cardsfolder/r/radiant_epicure.txt index d59dd08e62a..455c7e8a897 100644 --- a/forge-gui/res/cardsfolder/r/radiant_epicure.txt +++ b/forge-gui/res/cardsfolder/r/radiant_epicure.txt @@ -2,7 +2,7 @@ Name:Radiant Epicure ManaCost:4 B Types:Creature Vampire Wizard PT:5/5 -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDrain | SpellDescription$ Converge — When CARDNAME enters the battlefield, each opponent loses X life and you gain X life, where X is the number of colors of mana spent to cast this spell. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDrain | TriggerDescription$ Converge — When CARDNAME enters the battlefield, each opponent loses X life and you gain X life, where X is the number of colors of mana spent to cast this spell. SVar:TrigDrain:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ X | SubAbility$ DBGainLife SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X SVar:X:Count$Converge diff --git a/forge-gui/res/cardsfolder/r/righteous_valkyrie.txt b/forge-gui/res/cardsfolder/r/righteous_valkyrie.txt index 1ffb539a873..d78ec696e42 100644 --- a/forge-gui/res/cardsfolder/r/righteous_valkyrie.txt +++ b/forge-gui/res/cardsfolder/r/righteous_valkyrie.txt @@ -6,7 +6,7 @@ K:Flying T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Cleric.Other+YouCtrl,Angel.Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ Whenever another Angel or Cleric enters the battlefield under your control, you gain life equal to that creature's toughness. SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X SVar:X:TriggeredCard$CardToughness -S:Mode$ Continuous | CheckSVar$ Z | SVarCompare$ GEY | Affected$ Creature.YouCtrl | AddPower$ 2 | AddToughness$ 2 | SpellDescription$ As long as you have at least 7 life more than your starting life total, creatures you control get +2/+2. +S:Mode$ Continuous | CheckSVar$ Z | SVarCompare$ GEY | Affected$ Creature.YouCtrl | AddPower$ 2 | AddToughness$ 2 | Description$ As long as you have at least 7 life more than your starting life total, creatures you control get +2/+2. SVar:Z:Count$YourLifeTotal SVar:Y:Count$YourStartingLife/Plus.7 DeckHas:Ability$LifeGain diff --git a/forge-gui/res/cardsfolder/r/rivaz_of_the_claw.txt b/forge-gui/res/cardsfolder/r/rivaz_of_the_claw.txt index b471a011c85..8a567d3483f 100644 --- a/forge-gui/res/cardsfolder/r/rivaz_of_the_claw.txt +++ b/forge-gui/res/cardsfolder/r/rivaz_of_the_claw.txt @@ -4,7 +4,7 @@ Types:Legendary Creature Viashino Warlock PT:3/3 K:Menace A:AB$ Mana | Cost$ T | Produced$ Combo Any | Amount$ 2 | RestrictValid$ Spell.Creature+Dragon | SpellDescription$ Add two mana in any combination of colors. Spend this mana only to cast Dragon creature spells. -S:Mode$ Continuous | Affected$ Creature.Dragon+YouOwn | Condition$ PlayerTurn | MayPlay$ True | MayPlayLimit$ 1 | EffectZone$ Battlefield | AffectedZone$ Graveyard | SpellDescription$ Once during each of your turns, you may cast a Dragon creature spell from your graveyard. +S:Mode$ Continuous | Affected$ Creature.Dragon+YouOwn | Condition$ PlayerTurn | MayPlay$ True | MayPlayLimit$ 1 | EffectZone$ Battlefield | AffectedZone$ Graveyard | Description$ Once during each of your turns, you may cast a Dragon creature spell from your graveyard. T:Mode$ SpellCast | ValidCard$ Dragon.wasCastFromYourGraveyard | ValidActivatingPlayer$ You | Execute$ DBAnimate | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a Dragon creature spell from your graveyard, it gains "When this creature dies, exile it." SVar:DBAnimate:DB$ Animate | Defined$ TriggeredCard | Duration$ Permanent | Triggers$ TrigDieExile SVar:TrigDieExile:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When this creature dies, exile it. diff --git a/forge-gui/res/cardsfolder/s/stone_retrieval_unit.txt b/forge-gui/res/cardsfolder/s/stone_retrieval_unit.txt index 02160442199..058d846bdac 100644 --- a/forge-gui/res/cardsfolder/s/stone_retrieval_unit.txt +++ b/forge-gui/res/cardsfolder/s/stone_retrieval_unit.txt @@ -2,7 +2,7 @@ Name:Stone Retrieval Unit ManaCost:4 Types:Artifact Creature Construct PT:2/3 -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | SpellDescription$ When CARDNAME enters the battlefield, create a tapped Powerstone token. (It's an artifact with "{T}: Add {C}. This mana can't be spent to cast a nonartifact spell.) +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a tapped Powerstone token. (It's an artifact with "{T}: Add {C}. This mana can't be spent to cast a nonartifact spell.) SVar:TrigToken:DB$ Token | TokenTapped$ True | TokenScript$ c_a_powerstone DeckHas:Ability$Token & Type$Artifact Oracle:When Stone Retrieval Unit enters the battlefield, create a tapped Powerstone token. (It's an artifact with "{T}: Add {C}. This mana can't be spent to cast a nonartifact spell.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/t/tyrannical_pitlord.txt b/forge-gui/res/cardsfolder/t/tyrannical_pitlord.txt index 0f6831fefb2..afb11dec900 100644 --- a/forge-gui/res/cardsfolder/t/tyrannical_pitlord.txt +++ b/forge-gui/res/cardsfolder/t/tyrannical_pitlord.txt @@ -6,7 +6,7 @@ K:Flying K:Trample K:ETBReplacement:Other:DBChoose SVar:DBChoose:DB$ ChooseCard | Choices$ Creature.Other+YouCtrl | Mandatory$ True | SpellDescription$ As CARDNAME enters the battlefield, choose another creature you control. -S:Mode$ Continuous | Affected$ Card.ChosenCardStrict | AddKeyword$ Flying | AddToughness$ 3 | AddPower$ 3 | SpellDescription$ The chosen creature gets +3/+3 and has flying. +S:Mode$ Continuous | Affected$ Card.ChosenCardStrict | AddKeyword$ Flying | AddToughness$ 3 | AddPower$ 3 | Description$ The chosen creature gets +3/+3 and has flying. T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ TrigSacrifice | SubAbility$ TrigSacrifice | TriggerDescription$ When CARDNAME leaves the battlefield, sacrifice the chosen creature. SVar:TrigSacrifice:DB$ SacrificeAll | ValidCards$ Card.ChosenCardStrict DeckHas:Ability$Sacrifice diff --git a/forge-gui/res/cardsfolder/upcoming/phyresis_roach.txt b/forge-gui/res/cardsfolder/upcoming/phyresis_roach.txt index 153b24f5f5b..7a6ec26bd14 100644 --- a/forge-gui/res/cardsfolder/upcoming/phyresis_roach.txt +++ b/forge-gui/res/cardsfolder/upcoming/phyresis_roach.txt @@ -4,7 +4,7 @@ Types:Creature Phyrexian Insect PT:1/1 K:Toxic:1 T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigEffect | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, Insects you control and Insect cards in your graveyard, hand, and library perpetually gain toxic 1. -SVar:TrigEffect:DB$ Effect | Name$ Phyresis Roach's Perpetual Effect | RememberObjects$ Valid Insect.YouCtrl,ValidGraveyard,Hand,Library Insect.YouOwn | StaticAbilities$ PerpetualToxic | Duration$ Permanent | Triggers$ Update +SVar:TrigEffect:DB$ Effect | Name$ Phyresis Roach's Perpetual Effect | RememberObjects$ Valid Insect.YouCtrl,ValidGraveyard Insect.YouOwn,ValidHand Insect.YouOwn,ValidLibrary Insect.YouOwn | StaticAbilities$ PerpetualToxic | Duration$ Permanent | Triggers$ Update SVar:PerpetualToxic:Mode$ Continuous | Affected$ Card.IsRemembered | AddKeyword$ Toxic:1 | EffectZone$ Command | AffectedZone$ Battlefield,Hand,Graveyard,Exile,Stack,Library,Command | Description$ These cards perpetually gain toxic 1. SVar:Update:Mode$ ChangesZone | Origin$ Any | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered | Execute$ DBUpdate SVar:DBUpdate:DB$ UpdateRemember diff --git a/forge-gui/src/main/java/forge/player/HumanCostDecision.java b/forge-gui/src/main/java/forge/player/HumanCostDecision.java index 13a0476f8f7..477a3e2ce32 100644 --- a/forge-gui/src/main/java/forge/player/HumanCostDecision.java +++ b/forge-gui/src/main/java/forge/player/HumanCostDecision.java @@ -292,12 +292,6 @@ public class HumanCostDecision extends CostDecisionMakerBase { // Inputs - // Exile - // ExileFromHand - // ExileFromGrave - // ExileFromTop (of library) - // ExileSameGrave - private PaymentDecision exileFromSame(final CostExile cost, final CardCollectionView list, final int nNeeded, final List payableZone) { if (nNeeded == 0) { return PaymentDecision.number(0);