diff options
-rw-r--r-- | rules.js | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -4494,17 +4494,28 @@ function automatic_victory() { function norths_government_falls() { let n_american = 0 - for (let c = 0; c <= 13; ++c) + let n_british = 0 + for (let c = 0; c <= 13; ++c) { if (get_colony_control(c) === PC_AMERICAN) ++n_american + if (get_colony_control(c) === PC_BRITISH) + ++n_british + } - if (n_american >= 7) - game.result = P_AMERICA - else + if (n_british >= 6) { game.result = P_BRITAIN + } else { + if (n_american >= 7) + game.result = P_AMERICA + else + game.result = P_BRITAIN + } log("=! Game Over") - game.victory = "North's Government Falls: " + game.result + " Victory!" + if (game.result === P_AMERICA) + game.victory = "North's Government Falls:\nAmerican victory!" + else + game.victory = "North's Government Falls:\nBritish victory!" game.active = "None" game.state = "game_over" |