diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2023-08-31 22:33:16 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 75c6b72df894aca18a6380a5e279bb11587e0143 (patch) | |
tree | 75cc94de964fdb70387d339b452df63aa23f2604 /rules.js | |
parent | 1def1b2bb2b749bbf6e358875b6ebe1f8e7da8fb (diff) | |
download | plantagenet-75c6b72df894aca18a6380a5e279bb11587e0143.tar.gz |
Sail done
full implementation done
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 37 |
1 files changed, 33 insertions, 4 deletions
@@ -3612,8 +3612,8 @@ states.sail = { let here = get_lord_locale(game.command) let ships = count_group_ships() - // CAPABILITY SHIPS x2 - // CAPABILITY MOVE EVERYWHERE WITH SHIPS + // TODO CAPABILITY SHIPS x2 + // TODO CAPABILITY MOVE EVERYWHERE WITH SHIPS let prov = count_group_assets(PROV) let cart = count_group_assets(CART) @@ -3625,8 +3625,37 @@ states.sail = { if (overflow_prov <= 0 && overflow_cart <= 0) { view.prompt = `Sail: Select a destination Seaport.` - var port = data.locales[here] - for (let to of data.seaports) { + let from = 0 + switch(true){ + case data.exile_1.includes(here): + from = data.way_exile_1 + break; + case data.exile_2.includes(here): + from = data.way_exile_2 + break; + case data.exile_3.includes(here): + from = data.way_exile_3 + break; + case data.sea_1.includes(here): + from = data.way_sea_1 + break; + case data.sea_2.includes(here): + from = data.way_sea_2 + break; + case data.sea_3.includes(here): + from = data.way_sea_3 + break; + case data.port_1.includes(here): + from = data.way_port_1 + break; + case data.port_2.includes(here): + from = data.way_port_2 + break; + case data.port_3.includes(here): + from = data.way_port_3 + break; + } + for (let to of from) { if (to === here) continue if (!has_enemy_lord(to)) |