From dabaca10a22c2969a2e2e24974682bee2b42c991 Mon Sep 17 00:00:00 2001 From: Klisz Date: Sat, 2 Dec 2023 00:53:40 -0700 Subject: [PATCH] Update unleash_the_flux.txt (#4250) * Update unleash_the_flux.txt Fixes a crash that would occur from a memory buffer overflow whenever the AbilityFactory tries to create Unleash the Flux's ability, due to the SubAbility loop in the previous script for that card --- .../res/cardsfolder/upcoming/unleash_the_flux.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/unleash_the_flux.txt b/forge-gui/res/cardsfolder/upcoming/unleash_the_flux.txt index cfc2d362544..e46d08807cc 100644 --- a/forge-gui/res/cardsfolder/upcoming/unleash_the_flux.txt +++ b/forge-gui/res/cardsfolder/upcoming/unleash_the_flux.txt @@ -1,8 +1,10 @@ Name:Unleash the Flux ManaCost:no cost Types:Phenomenon -T:Mode$ PlaneswalkedTo | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ When you encounter CARDNAME, each player sacrifices a nonland permanent, then you flip a coin. If you lose the flip, repeat this process. (Then planeswalk away from this phenomenon.) -SVar:TrigEffect:DB$ Sacrifice | Defined$ Player | SacValid$ Permanent.nonLand | SubAbility$ DBCoin -SVar:DBCoin:DB$ FlipACoin | WinSubAbility$ PWAway | LoseSubAbility$ TrigEffect -SVar:PWAway:DB$ Planeswalk +T:Mode$ PlaneswalkedTo | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ When you encounter CARDNAME, each player sacrifices a nonland permanent, then you flip a coin. If you lose the flip, repeat this process. (Then planeswalk away from this phenomenon.) +SVar:TrigEffect:DB$ Repeat | RepeatCheckSVar$ PlayerCountRemembered$HasPropertyYou | RepeatSVarCompare$ GT0 | RepeatSubAbility$ DBSacrifice +SVar:DBSacrifice:DB$ Sacrifice | Defined$ Player | SacValid$ Permanent.nonLand | SubAbility$ DBCoin +SVar:DBCoin:DB$ FlipACoin | RememberLoser$ True | WinSubAbility$ PWAway +SVar:PWAway:DB$ Planeswalk | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True Oracle:When you encounter Unleash the Flux, each player sacrifices a nonland permanent, then you flip a coin. If you lose the flip, repeat this process. (Then planeswalk away from this phenomenon.) \ No newline at end of file