diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-02-03 12:17:52 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:39 +0100 |
commit | 355a8233e1fcdc62d47f9b42bb71301e1bb6eabe (patch) | |
tree | 7fd4ffc3d1386c7851b2f3304b8ab8423c14d91b | |
parent | 7dea27a7ff9d77fa9a32b18526bc262d3651ce81 (diff) | |
download | nevsky-355a8233e1fcdc62d47f9b42bb71301e1bb6eabe.tar.gz |
Tweak March Hindered/Laden/Unladen prompts.
-rw-r--r-- | rules.js | 41 |
1 files changed, 29 insertions, 12 deletions
@@ -4717,38 +4717,49 @@ states.march_laden = { let prov = count_group_assets(PROV) let loot = count_group_assets(LOOT) - view.prompt = `March: Hindered with ${loot} Loot, ${prov} Provender, and ${transport} Transport.` view.group = game.group + if (prov > transport * 2 || (prov > transport && view.actions < 2)) + view.prompt = `March: Hindered with ${loot} Loot, ${prov} Provender, and ${transport} Transport.` + else if (loot > 0 || prov > transport) + view.prompt = `March: Laden with ${loot} Loot, ${prov} Provender, and ${transport} Transport.` + else + view.prompt = `March: Unladen.` + if (prov <= transport * 2) { if (loot > 0 || prov > transport) { if (game.actions >= 2) { - view.prompt += " Laden." view.actions.march = 1 // other button? gen_action_laden_march(to) } else { - view.prompt += " Laden with 1 action left." + view.prompt += " 1 action left." } } else { view.actions.march = 1 gen_action_locale(to) } - } else { - view.prompt += " Too much Provender." } if (loot > 0 || prov > transport) { for (let lord of game.group) { if (loot > 0) { - if (get_lord_assets(lord, LOOT) > 0) + if (get_lord_assets(lord, LOOT) > 0) { + view.prompt += " Discard Loot." gen_action_loot(lord) - if (prov > transport * 2) - if (get_lord_assets(lord, PROV) > 0) + } + if (prov > transport * 2) { + if (get_lord_assets(lord, PROV) > 0) { + view.prompt += " Discard Provender." gen_action_prov(lord) + } + } } else { - if (prov > transport) - if (get_lord_assets(lord, PROV) > 0) + if (prov > transport) { + if (get_lord_assets(lord, PROV) > 0) { + view.prompt += " Discard Provender." gen_action_prov(lord) + } + } } } } @@ -5002,7 +5013,10 @@ states.avoid_battle_laden = { let prov = count_group_assets(PROV) let loot = count_group_assets(LOOT) - view.prompt = `Avoid Battle: Hindered with ${prov} Provender and ${transport} Transport.` + if (loot > 0 || prov > transport) + view.prompt = `Avoid Battle: Hindered with ${prov} Provender and ${transport} Transport.` + else + view.prompt = `Avoid Battle: Unladen.` view.group = game.group if (loot > 0) { @@ -9397,7 +9411,10 @@ states.retreat_laden = { let prov = count_retreat_assets(PROV) let loot = count_retreat_assets(LOOT) - view.prompt = `Retreat: Hindered with ${prov} Provender and ${transport} Transport.` + if (loot > 0 || prov > transport) + view.prompt = `Retreat: Hindered with ${prov} Provender and ${transport} Transport.` + else + view.prompt = `Retreat: Unladen.` view.group = game.battle.retreated if (loot > 0) { |