diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-08 11:43:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-08 11:43:01 +0200 |
commit | 3b5d93cf0152bcc103f7260519d540cf0997867d (patch) | |
tree | 90dabd02914f1987528f9402d5043971406d24cf /rules.js | |
parent | 9d68a413f9d51ca63b45d56a0fb6d5a3e8393989 (diff) | |
download | time-of-crisis-3b5d93cf0152bcc103f7260519d540cf0997867d.tar.gz |
Create Army in Province or Capital.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -2170,7 +2170,7 @@ states.take_actions = { } if (game.selected_general >= 0) { if (get_general_location(game.selected_general) === AVAILABLE) - create_army(where) + create_army(where, false) else move_army_to(game.selected_general, where) } @@ -2178,7 +2178,9 @@ states.take_actions = { capital(where) { push_undo() - if (get_general_location(game.selected_general) !== where) + if (get_general_location(game.selected_general) === AVAILABLE) + create_army(where, true) + else if (get_general_location(game.selected_general) !== where) move_army_to(game.selected_general, where) enter_capital() resume_take_actions() @@ -2741,16 +2743,19 @@ states.becoming_populace_emperor = { function gen_create_army() { for (let i = 0; i < 6; ++i) { let where = get_governor_location(game.current * 6 + i) - if (is_province(where)) + if (is_province(where)) { gen_action_region(where) + if (can_enter_capital(where)) + gen_action_capital(where) + } } } -function create_army(where) { +function create_army(where, capital) { spend_military(1) log("Create Army in %" + where + ".") set_general_location(game.selected_general, where) - if (can_enter_capital(where)) + if (can_enter_capital(where) && capital) set_general_inside_capital(game.selected_general) set_legion_location(find_unused_legion(), ARMY + game.selected_general) } @@ -4431,7 +4436,6 @@ function goto_post_combat() { else if (game.combat.type === "general" && game.emperor === ARMY + game.combat.target) roll_military_emperor_check(game.combat.dtaken) - goto_free_increase_support_level() } @@ -4818,7 +4822,6 @@ function goto_buy_trash() { if (used_card_event(CARD_S2X)) game.pp += Math.min(2, game.sip) - game.mip = game.sip = game.pip = 0 for (let i = 0; i < 3; ++i) if (game.killed & (1 << i)) |