diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-12-13 15:46:54 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-12-13 15:46:54 +0100 |
commit | 219d37c6dbddd2fc0ad59088e00b8be464263a04 (patch) | |
tree | 63a795c0985817a6947c29c6fe21d7dcf1984eda | |
parent | 567d674893d1d5935e93ab87338dab41ae1fb415 (diff) | |
download | maria-219d37c6dbddd2fc0ad59088e00b8be464263a04.tar.gz |
Fix prompt for austria/pragmatic movement deal validation.
-rw-r--r-- | rules.js | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -6933,15 +6933,21 @@ function resume_validate_movement() { resume_validate_promise("validate_movement", end_movement) } +function find_movement_deal_partner() { + if (should_validate_promise(P_PRAGMATIC, game.power, V_MOVEMENT)) + return P_PRAGMATIC + if (should_validate_promise(P_AUSTRIA, game.power, V_MOVEMENT)) + return P_AUSTRIA + return game.restart.power +} + states.validate_movement = { dont_snap: true, inactive: "confirm that promises were kept", prompt() { let other = game.restart.power - if (other === P_PRAGMATIC && game.power === P_PRAGMATIC) - other = P_AUSTRIA - else if (other === P_AUSTRIA && game.power === P_AUSTRIA) - other = P_PRAGMATIC + if (other === P_PRAGMATIC || other === P_AUSTRIA) + other = find_movement_deal_partner() prompt("Did " + power_name[other] + " keep their movement promise?") view.actions.keep = 1 view.actions.break = 1 |