diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-19 21:34:34 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-19 21:34:34 +0200 |
commit | 0aa6ea882347009b497fd8a13648225a3440b9cd (patch) | |
tree | 77d69a557490ff6181edb8035b0eb59603d70c49 /rules.ts | |
parent | f3545326524b5df6ba7ea418d34f34e2cc89b934 (diff) | |
download | plantagenet-0aa6ea882347009b497fd8a13648225a3440b9cd.tar.gz |
Fix commission of array.
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -3176,9 +3176,12 @@ function can_add_troops(locale: Locale) { } function can_add_troops_coa(lord: Lord, locale: Locale) { - for (let next of data.locales[locale].adjacent) { - if (is_friendly_locale(next) && lord_has_capability(lord, AOW_LANCASTER_COMMISION_OF_ARRAY) && (!has_exhausted_marker(locale) && !is_exile(locale))) - return true + if (lord_has_capability(lord, AOW_LANCASTER_COMMISION_OF_ARRAY)) { + for (let next of data.locales[locale].adjacent) { + if (is_friendly_locale(next) && !has_enemy_lord(next)) + if (can_add_troops(next)) + return true + } } return false } @@ -9490,7 +9493,7 @@ states.soldiers_of_fortune = { // Done if (done) { view.prompt = "Soldiers of fortune: Done." - view.actions.end_sof = 1 + view.actions.done = 1 } }, coin(lord) { @@ -9540,7 +9543,7 @@ states.soldiers_of_fortune = { add_lord_forces(game.command, MERCENARIES, merc) set_lord_unfed(game.command, 0) }, - end_sof() { + done() { end_soldiers_of_fortune() }, } @@ -9568,7 +9571,7 @@ states.commission_of_array = { // Done if (done) { view.prompt = "Commission of Array: Done." - view.actions.end_coa = 1 + view.actions.done = 1 } }, locale(loc) { @@ -9608,6 +9611,9 @@ states.commission_of_array = { } end_commission_of_array() }, + done() { + end_commission_of_array() + }, } function end_commission_of_array() { |