diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-15 21:59:50 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-15 21:59:50 +0200 |
commit | d5b08dcd310e5bad9a9bfdacca392250ee270b60 (patch) | |
tree | 92fa8654d837013d5d35d06ec2067715e94d87e8 | |
parent | 6e4b62e1548e7cd2b7038881334e2d2503a051a9 (diff) | |
download | friedrich-d5b08dcd310e5bad9a9bfdacca392250ee270b60.tar.gz |
fix "Friedrich must reach positive score" event
reset the flag after first card play where it triggered
-rw-r--r-- | rules.js | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -2239,10 +2239,13 @@ function goto_resolve_combat() { } } -function end_resolve_combat() { +function end_combat_card_play() { + clear_undo() if (must_reach_positive_score()) clear_fate_effect() +} +function end_resolve_combat() { if (game.fx === NEXT_TURN_SOUBISE_AND_HILDBURGHAUSEN_MAY_NOT_ATTACK_WITH_THE_SAME_TC_SYMBOL) if (get_supreme_commander(game.attacker) === GEN_HILDBURGHAUSEN) game.ia_attack = get_space_suit(game.attacker) @@ -2487,7 +2490,7 @@ states.combat_attack = { play_combat_card(c, +1, resume_combat_attack, "combat_attack_reserve") }, pass() { - clear_undo() + end_combat_card_play() end_resolve_combat() }, } @@ -2502,7 +2505,7 @@ states.combat_defend = { play_combat_card(c, -1, resume_combat_defend, "combat_defend_reserve") }, pass() { - clear_undo() + end_combat_card_play() end_resolve_combat() }, } @@ -2540,7 +2543,7 @@ states.combat_attack_swap = { view.actions.next = 1 }, next() { - clear_undo() + end_combat_card_play() set_active_defender() game.state = "combat_defend" }, @@ -2553,7 +2556,7 @@ states.combat_defend_swap = { view.actions.next = 1 }, next() { - clear_undo() + end_combat_card_play() set_active_attacker() game.state = "combat_attack" }, |