diff --git a/.gitattributes b/.gitattributes index b73af860f7e..1cd7cfb4089 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4992,6 +4992,7 @@ forge-gui/res/cardsfolder/g/galvanic_juggernaut.txt -text forge-gui/res/cardsfolder/g/galvanic_key.txt svneol=native#text/plain forge-gui/res/cardsfolder/g/galvanoth.txt -text forge-gui/res/cardsfolder/g/gamble.txt svneol=native#text/plain +forge-gui/res/cardsfolder/g/game_of_chaos.txt -text forge-gui/res/cardsfolder/g/game_preserve.txt -text forge-gui/res/cardsfolder/g/game_trail_changeling.txt svneol=native#text/plain forge-gui/res/cardsfolder/g/gamekeeper.txt -text diff --git a/forge-game/src/main/java/forge/game/ability/effects/RepeatEffect.java b/forge-game/src/main/java/forge/game/ability/effects/RepeatEffect.java index 6a015513670..4d85cf65114 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/RepeatEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/RepeatEffect.java @@ -123,7 +123,10 @@ public class RepeatEffect extends SpellAbilityEffect { } if (sa.hasParam("RepeatOptional")) { - return sa.getActivatingPlayer().getController().confirmAction(sa, null, "Do you want to repeat this process again?"); + Player decider = sa.hasParam("RepeatOptionalDecider") + ? AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("RepeatOptionalDecider"), sa).get(0) + : sa.getActivatingPlayer(); + return decider.getController().confirmAction(sa, null, "Do you want to repeat this process again?"); } return true; diff --git a/forge-gui/res/cardsfolder/g/game_of_chaos.txt b/forge-gui/res/cardsfolder/g/game_of_chaos.txt new file mode 100644 index 00000000000..2c79cf77427 --- /dev/null +++ b/forge-gui/res/cardsfolder/g/game_of_chaos.txt @@ -0,0 +1,18 @@ +Name:Game of Chaos +ManaCost:R R R +Types:Sorcery +A:SP$ Repeat | Cost$ R R R | ValidTgts$ Opponent | IsCurse$ True | StackDescription$ SpellDescription | RepeatOptional$ True | RepeatSubAbility$ DBCleanup | RepeatOptionalDecider$ Remembered | SubAbility$ DBRestore | SpellDescription$ Flip a coin. If you win the flip, you gain 1 life and target opponent loses 1 life, and you decide whether to flip again. If you lose the flip, you lose 1 life and that opponent gains 1 life, and that player decides whether to flip again. Double the life stakes with each flip. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBFlip +SVar:DBFlip:DB$ FlipACoin | Caller$ You | WinSubAbility$ GainlifeYou | LoseSubAbility$ GainlifeOpp | SubAbility$ DoubleLifeStake +SVar:GainlifeYou:DB$ GainLife | Defined$ You | LifeAmount$ NumLife | SubAbility$ LoseLifeOpp +SVar:LoseLifeOpp:DB$ LoseLife | Defined$ Targeted | LifeAmount$ NumLife | SubAbility$ RememberYou +SVar:RememberYou:DB$ Pump | RememberObjects$ You +SVar:GainlifeOpp:DB$ GainLife | Defined$ Targeted | LifeAmount$ NumLife | SubAbility$ LoseLifeYou +SVar:LoseLifeYou:DB$ LoseLife | Defined$ You | LifeAmount$ NumLife | SubAbility$ RememberOpp +SVar:RememberOpp:DB$ Pump | RememberObjects$ Targeted +SVar:DoubleLifeStake:DB$ StoreSVar | SVar$ NumLife | References$ NumLife | Type$ CountSVar | Expression$ NumLife/Times.2 +SVar:DBRestore:DB$ StoreSVar | SVar$ NumLife | References$ NumLife | Type$ Number | Expression$ 1 +SVar:NumLife:Number$1 +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/game_of_chaos.jpg +Oracle:Flip a coin. If you win the flip, you gain 1 life and target opponent loses 1 life, and you decide whether to flip again. If you lose the flip, you lose 1 life and that opponent gains 1 life, and that player decides whether to flip again. Double the life stakes with each flip.