summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-04 21:04:48 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commitb032ccd20677a8da17f061f4ded3b7dcae1c85ed (patch)
tree941accd9ae6de144f9529dc390827e40f2a94605
parent4dd7cdbe88a123574e9aa5636159d66c3ee942aa (diff)
downloadnevsky-b032ccd20677a8da17f061f4ded3b7dcae1c85ed.tar.gz
Fix Grand Prince.
-rw-r--r--rules.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index f069b9b..35f6a2e 100644
--- a/rules.js
+++ b/rules.js
@@ -2351,10 +2351,13 @@ function goto_teutonic_event_grand_prince() {
states.grand_prince = {
prompt() {
view.prompt = "Grand Prince: On Calendar, shift Aleksandr or Andrey or furthest right service of either 2 boxes."
- if (is_lord_on_calendar(LORD_ALEKSANDR))
+
+ if (is_lord_on_calendar(LORD_ALEKSANDR) && game.who !== LORD_ALEKSANDR)
gen_action_lord(LORD_ALEKSANDR)
- if (is_lord_on_calendar(LORD_ANDREY))
+
+ if (is_lord_on_calendar(LORD_ANDREY) && game.who !== LORD_ANDREY)
gen_action_lord(LORD_ANDREY)
+
if (is_lord_on_map(LORD_ALEKSANDR) && is_lord_on_map(LORD_ANDREY)) {
let aleksandr = get_lord_service(LORD_ALEKSANDR)
let andrey = get_lord_service(LORD_ANDREY)
@@ -2362,7 +2365,12 @@ states.grand_prince = {
gen_action_service(LORD_ALEKSANDR)
if (andrey >= aleksandr)
gen_action_service(LORD_ANDREY)
+ } else if (is_lord_on_map(LORD_ALEKSANDR)) {
+ gen_action_service(LORD_ALEKSANDR)
+ } else if (is_lord_on_map(LORD_ANDREY)) {
+ gen_action_service(LORD_ANDREY)
}
+
if (game.who !== NOBODY) {
gen_action_calendar(get_lord_calendar(game.who) - 2)
gen_action_calendar(get_lord_calendar(game.who) + 2)