diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-14 18:21:45 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-14 18:21:45 -0400 |
commit | b3f85795d1e72d0ee68da99f4976c734b63f0485 (patch) | |
tree | b5fd72456ee8d791c7d3dc1fa50203ecf3b81f54 | |
parent | 1a7e3137d462e1b62ac467c91548521ef8e59359 (diff) | |
download | vijayanagara-b3f85795d1e72d0ee68da99f4976c734b63f0485.tar.gz |
Clean govern
-rw-r--r-- | events.txt | 2 | ||||
-rw-r--r-- | rules.js | 12 |
2 files changed, 10 insertions, 4 deletions
@@ -171,7 +171,7 @@ SHADED 8 current DS prompt `In each Province, free Govern and then add a Troop.` space_opt all (is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) - free_govern + govern_in_space place_opt 1 DS TROOPS endspace @@ -1514,6 +1514,7 @@ function goto_conscript_space() { } states.conscript = { + inactive: "Conscript", prompt() { view.prompt = "Conscript: Select Tributaries, Qasbah or Delhi to place troops." @@ -1535,6 +1536,7 @@ states.conscript = { } states.conscript_space = { + inactive: "Conscript", prompt() { view.prompt = `Conscript: Place up to ${conscript_count()} Troops.` view.where = game.cmd.where @@ -1575,7 +1577,7 @@ function can_govern_in_space(s) { if (has_piece(AVAILABLE, DS, ELITE)) return true - if (has_piece(s, DS, ELITE) && has_piece(AVAILABLE, DS, DISC)) + if (has_piece(s, DS, ELITE) && has_piece(AVAILABLE, DS, DISC) && !has_piece(s, DS, DISC)) return true return false @@ -1601,6 +1603,7 @@ function goto_govern_space() { } states.govern = { + inactive: "Govern", prompt() { if (game.vm && game.vm.fp === 9) view.prompt = "Govern: Ignore Locations requirements." @@ -1617,12 +1620,14 @@ states.govern = { space(s) { push_undo() select_cmd_space(s, 1) + log_space(game.cmd.where, "Govern") goto_govern_space() }, end_govern: end_command, } states.govern_space = { + inactive: "Govern", prompt() { view.prompt = "Govern: Place a Governor or place a Qasbah and remove two Obedient Units." view.where = game.cmd.where @@ -1663,7 +1668,6 @@ states.govern_space = { } function end_govern_space() { - log_space(game.cmd.where, "Govern") pop_summary() game.state = "govern" } @@ -1851,6 +1855,7 @@ function end_rally_space() { } states.rally = { + inactive: "Rally", prompt() { if (game.current === BK) view.prompt = "Rally: Select Maharashtra or a Province with your presence" @@ -1875,6 +1880,7 @@ states.rally = { } states.rally_space = { + inactive: "Rally", prompt() { view.prompt = `Rally: Place up to ${rally_count()} ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}` view.where = game.cmd.where @@ -5408,7 +5414,7 @@ CODE[8 * 2 + 1] = [ [ vm_current, DS ], [ vm_prompt, ()=>`In each Province, free Govern and then add a Troop.` ], [ vm_space, true, 0, 999, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) ], - [ vm_free_govern ], + [ vm_govern_in_space ], [ vm_place, false, 1, 1, DS, TROOPS ], [ vm_endspace ], [ vm_return ], |