diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-04-02 01:23:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 12:53:18 +0100 |
commit | be57396131c9d64a515bbe2122f09783f7010d63 (patch) | |
tree | ec7ee9fb1bf5916634980ee5eb696bbd02bdfb8a /rules.js | |
parent | 91af980dfff5ea7648ce882c3ae3d2b94eb96fa1 (diff) | |
download | hammer-of-the-scots-be57396131c9d64a515bbe2122f09783f7010d63.tar.gz |
Check instant victory after Winter Turn.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2813,6 +2813,17 @@ function goto_english_feudal_levy() { } function end_winter_turn() { + if (count_english_nobles() === 0) { + game.victory = "Scotland wins by controlling all the nobles!"; + game.result = SCOTLAND; + } + if (count_scottish_nobles() === 0) { + game.victory = "England wins by controlling all the nobles!"; + game.result = ENGLAND; + } + if (game.victory) + return goto_game_over(); + if (++game.year > game.end_year) goto_game_over(); else @@ -2839,6 +2850,7 @@ function goto_game_over() { } } } + log(""); log(game.victory); game.active = "None"; game.state = 'game_over'; |