diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-13 16:50:41 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-13 16:50:41 +0100 |
commit | ee70909782faa66436f5784aab76c403170ed100 (patch) | |
tree | 577d05e92dff88ffd770667d26fbe3daae86a4ca /rules.js | |
parent | 104d2281d3bea55f2a835f7f154f3a759421c75a (diff) | |
download | maria-ee70909782faa66436f5784aab76c403170ed100.tar.gz |
fix prussia neutrality expiration
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -99,6 +99,7 @@ const F_WAR_OF_JENKINS_EAR = 64 // -1 France TC for one turn const F_SAXONY_TC_ONCE = 128 // only draw TCs once per turn const F_FRANCE_REDUCED = 256 const F_PRUSSIA_NEUTRAL = 512 +const F_PRUSSIA_NEUTRAL_2 = 65536 const F_MOVE_FLANDERS = 1024 const F_MOVE_DISPUTE = 2048 const F_INTRODUCTORY = 4096 @@ -1406,6 +1407,7 @@ const advanced_sequence_of_play = [ { power: P_FRANCE, action: goto_france_reduces_military_objectives }, { power: P_PRUSSIA, action: start_action_stage }, + { power: P_PRUSSIA, action: goto_prussia_ends_neutrality }, { power: P_PRUSSIA, action: goto_tactical_cards }, { power: P_SAXONY, action: goto_tactical_cards, condition: is_saxony_prussian }, { power: P_PRUSSIA, action: goto_supply }, @@ -1415,7 +1417,6 @@ const advanced_sequence_of_play = [ { power: P_PRUSSIA, action: end_movement }, { power: P_PRUSSIA, action: goto_combat }, { power: P_PRUSSIA, action: end_action_stage }, - { power: P_PRUSSIA, action: goto_prussia_ends_neutrality }, { power: P_PRUSSIA, action: goto_prussia_annexes_silesia }, { power: P_AUSTRIA, action: start_action_stage }, @@ -1455,6 +1456,7 @@ const two_player_sequence_of_play = [ { power: P_FRANCE, action: goto_france_reduces_military_objectives }, { power: P_PRUSSIA, action: start_action_stage }, + { power: P_PRUSSIA, action: goto_prussia_ends_neutrality }, { power: P_PRUSSIA, action: goto_tactical_cards }, { power: P_SAXONY, action: goto_tactical_cards, condition: is_saxony_prussian }, { power: P_PRUSSIA, action: goto_supply }, @@ -1464,7 +1466,6 @@ const two_player_sequence_of_play = [ { power: P_PRUSSIA, action: end_movement }, { power: P_PRUSSIA, action: goto_combat }, { power: P_PRUSSIA, action: end_action_stage }, - { power: P_PRUSSIA, action: goto_prussia_ends_neutrality }, { power: P_PRUSSIA, action: goto_prussia_annexes_silesia }, { power: P_AUSTRIA, action: start_action_stage }, @@ -2241,13 +2242,12 @@ states.supply_suffer = { }, piece(p) { let s = game.pos[p] - log(`>P${p} at S${s}`) set_delete(game.supply.suffer, p) if (is_out_of_supply(p)) { - //log(`>P${p} at S${s} -2 troops`) + log(`>P${p} at S${s} (\u{2212}2)`) game.troops[p] -= 2 } else { - //log(`>P${p} at S${s} -1 troop`) + log(`>P${p} at S${s} (\u{2212}1)`) set_out_of_supply(p) game.troops[p] -= 1 } @@ -5603,7 +5603,12 @@ function end_saxony_neutral() { /* PRUSSIA ANNEXES SILESIA */ function goto_prussia_ends_neutrality() { - game.flags &= ~F_PRUSSIA_NEUTRAL + if (game.flags & F_PRUSSIA_NEUTRAL_2) { + game.flags &= ~F_PRUSSIA_NEUTRAL_2 + } else if (game.flags & F_PRUSSIA_NEUTRAL) { + game.flags &= ~F_PRUSSIA_NEUTRAL + log("Prussian Neutrality ended.") + } next_sequence_of_play() } @@ -5674,6 +5679,7 @@ function goto_annex_silesia() { game.flags |= F_SILESIA_ANNEXED game.flags |= F_PRUSSIA_NEUTRAL + game.flags |= F_PRUSSIA_NEUTRAL_2 // remove all austrian markers in prussia for (let s of all_prussian_and_silesian_fortresses) { |