summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-09-10 14:43:16 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit263502dd2cc34df0e327bd29d261138359a9fc8b (patch)
tree30743fbe2d4ccb59e3357e584afb46e26f602b6a
parentdf7bfe79dfe506ca4197d4647c7bd269edaac5ab (diff)
downloadplantagenet-263502dd2cc34df0e327bd29d261138359a9fc8b.tar.gz
march path
-rw-r--r--rules.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index f32e08c..f041364 100644
--- a/rules.js
+++ b/rules.js
@@ -1055,6 +1055,10 @@ function is_seaport(loc) {
return set_has(data.seaports, loc)
}
+function is_exile(loc) {
+ return data.locales[loc].type === "exile"
+}
+
function is_city(loc) {
return data.locales[loc].type === "city"
}
@@ -2549,7 +2553,6 @@ states.command = {
view.actions.tax = 1
if (can_action_sail())
view.actions.sail = 1
- // PARLEY ACTION
},
pass() {
@@ -2563,6 +2566,7 @@ states.command = {
end_command()
},
+
forage: goto_forage,
supply: goto_supply,
tax: goto_tax,
@@ -2635,10 +2639,17 @@ function format_group_move() {
return ""
}
function prompt_march() {
- let from = get_lord_locale(game.command);
-
+ let from = get_lord_locale(game.command);
+ if (is_first_action())
+ for (let to of data.locales[from].adjacent_by_path) {
+ gen_action_locale(to);
+ }
+
if (game.actions > 0) {
- for (let to of data.locales[from].adjacent) {
+ for (let to of data.locales[from].adjacent_by_road) {
+ gen_action_locale(to);
+ }
+ for (let to of data.locales[from].adjacent_by_highway) {
gen_action_locale(to);
}
}
@@ -2647,8 +2658,6 @@ function prompt_march() {
gen_action_locale(to);
}
}
-
- //TODO MARCH PATH
}
@@ -2742,6 +2751,8 @@ function march_with_group_2() {
set_lord_moved(lord, 1)
}
+ // TODO : Intercept
+
if (has_unbesieged_enemy_lord(to)) {
goto_confirm_approach()
} else {
@@ -6250,10 +6261,6 @@ function gen_action_locale(locale) {
gen_action("locale", locale)
}
-function gen_action_laden_march(locale) {
- gen_action("laden_march", locale)
-}
-
function gen_action_lord(lord) {
gen_action("lord", lord)
}