diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-09 13:55:18 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-09 13:55:18 +0100 |
commit | bdbd53895c57a715bfe2636a1c83126b6785c43c (patch) | |
tree | 385b57b251fa9e88dda8242b65e87d195ef4162f /rules.js | |
parent | e9a84ae8f28b98981b5af247731cc3c8949a0544 (diff) | |
download | maria-bdbd53895c57a715bfe2636a1c83126b6785c43c.tar.gz |
fix retroactive conquest for austria/pragmatic
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -2545,7 +2545,7 @@ states.movement = { else if (game.power === P_AUSTRIA && has_unmoved_piece(P_PRAGMATIC)) gen_action_power(P_PRAGMATIC) else - view.actions.end_movement = 0 + view.actions.end_movement = DEBUG } } else { if (!has_unmoved_piece(game.power)) @@ -4328,7 +4328,7 @@ function goto_retroactive_conquest() { let conq = [] map_for_each(game.retro, function (s, pow) { - if (is_enemy_controlled_fortress(s)) { + if (pow === game.power && is_enemy_controlled_fortress(s)) { if (!is_protected_from_conquest(s)) { set_control_of_fortress(s, pow) conq.push(s) @@ -4336,9 +4336,12 @@ function goto_retroactive_conquest() { } }) - log_conquest(conq) + // TODO: map_filter + for (let i = 0; i < game.retro.length; i += 2) + if (game.retro[i+1] === game.power) + array_remove_pair(game.retro, i) - map_clear(game.retro) + log_conquest(conq) next_sequence_of_play() } |