diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-01-26 11:50:55 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:39 +0100 |
commit | aaf41d556eabcaff13d571ab1fd9a6d919864949 (patch) | |
tree | a6bcc7bc5b6db3faa687cd04b191501a0353b056 | |
parent | e11808c223256dbc05dd9ccaed464211534afca6 (diff) | |
download | nevsky-aaf41d556eabcaff13d571ab1fd9a6d919864949.tar.gz |
Tempest + hidden mats.
-rw-r--r-- | rules.js | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -2162,15 +2162,27 @@ states.tempest = { inactive: "Tempest", prompt() { view.prompt = "Tempest: Remove all Ships from a Teutonic Lord (half if he has Cogs)." - for (let lord = first_enemy_lord; lord <= last_enemy_lord; ++lord) - if (get_lord_assets(lord, SHIP) > 0) - gen_action_ship(lord) + for (let lord = first_enemy_lord; lord <= last_enemy_lord; ++lord) { + if (game.hidden) { + gen_action_lord(lord) + } else { + if (get_lord_assets(lord, SHIP) > 0) + gen_action_ship(lord) + } + } + }, + lord(lord) { + this.ship(lord) }, ship(lord) { - log(`Removed Ships from L${lord}.`) let n = 0 - if (lord_has_capability(lord, AOW_TEUTONIC_COGS)) + if (lord_has_capability(lord, AOW_TEUTONIC_COGS)) { + logcap(AOW_TEUTONIC_COGS) + log(`Removed half Ships from L${lord}.`) n = get_lord_assets(lord, SHIP) >> 1 + } else { + log(`Removed all Ships from L${lord}.`) + } set_lord_assets(lord, SHIP, n) end_immediate_event() }, |