diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2023-09-10 14:43:16 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 263502dd2cc34df0e327bd29d261138359a9fc8b (patch) | |
tree | 30743fbe2d4ccb59e3357e584afb46e26f602b6a | |
parent | df7bfe79dfe506ca4197d4647c7bd269edaac5ab (diff) | |
download | plantagenet-263502dd2cc34df0e327bd29d261138359a9fc8b.tar.gz |
march path
-rw-r--r-- | rules.js | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -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) } |