From 219d37c6dbddd2fc0ad59088e00b8be464263a04 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 13 Dec 2024 15:46:54 +0100 Subject: Fix prompt for austria/pragmatic movement deal validation. --- rules.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 1b3821e..defa95e 100644 --- a/rules.js +++ b/rules.js @@ -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 -- cgit v1.2.3