diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -2246,6 +2246,19 @@ states.supply_restore = { }, } +function remove_one_troop(p) { + if (game.troops[p] === 1) { + for (let x of all_power_generals[game.power]) { + if (game.pos[x] === game.pos[p] && game.troops[x] > 1) { + game.troops[x] -- + return + } + } + } + if (game.troops[p] > 0) + game.troops[p] -- +} + states.supply_suffer = { inactive: "supply", prompt() { @@ -2258,11 +2271,12 @@ states.supply_suffer = { set_delete(game.supply.suffer, p) if (is_out_of_supply(p)) { log(`>P${p} at S${s} (-2)`) - game.troops[p] -= 2 + remove_one_troop(p) + remove_one_troop(p) } else { log(`>P${p} at S${s} (-1)`) set_out_of_supply(p) - game.troops[p] -= 1 + remove_one_troop(p) } if (game.troops[p] <= 0) { eliminate_general(p, true) @@ -5074,6 +5088,8 @@ function is_saxony_austrian_ally() { } function should_shift_saxony_after_battle(n) { + if (is_intro()) + return false if (n > 0 && game.saxony < 5) { if (game.loser_power === P_PRUSSIA) return true @@ -5084,6 +5100,8 @@ function should_shift_saxony_after_battle(n) { } function should_saxony_shift_after_supply(pow) { + if (is_intro()) + return false if (game.saxony < 5) { if (pow === P_PRUSSIA) return true |