diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-12-07 12:46:21 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-12-07 12:46:21 +0100 |
commit | bd283b25d99ea18901bff4f6d53aa9a62ac875d3 (patch) | |
tree | 99a96036c3ef7f5e4e39deb8a99dc1b62240478d /rules.js | |
parent | 14b8222d7059df64234bd92ee627b6f6b4ff051d (diff) | |
download | maria-bd283b25d99ea18901bff4f6d53aa9a62ac875d3.tar.gz |
Allow ending hussar placement early if no pieces on bohemia map.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1627,7 +1627,7 @@ states.place_hussars = { for (let p of all_hussars) if (!set_has(game.moved, p)) gen_action_piece(p) - if (!has_any_hussar(ELIMINATED)) + if (!has_any_hussar(ELIMINATED) || !has_piece_on_bohemia_map(P_AUSTRIA)) view.actions.end_place_hussars = 1 }, piece(p) { @@ -2424,6 +2424,13 @@ function has_unmoved_piece_on_flanders_map(pow) { return false } +function has_piece_on_bohemia_map(pow) { + for (let p of all_power_pieces[pow]) + if (is_bohemia_space(game.pos[p])) + return true + return false +} + function resume_movement() { if (is_two_player() && game.power === P_PRAGMATIC) game.power = P_AUSTRIA |