summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-03-18 15:56:39 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-03-18 15:56:39 -0400
commit50446af454b1c2f86174bdddf0a90cdccf0a0c7f (patch)
tree9661cba84392af8d8cd6cd94ef4014f42fa567bf
parentbc7486013da17071c180181085f64393964624d2 (diff)
downloadvijayanagara-50446af454b1c2f86174bdddf0a90cdccf0a0c7f.tar.gz
Inactive statuses
-rw-r--r--rules.js31
1 files changed, 29 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 306c717..fac3f06 100644
--- a/rules.js
+++ b/rules.js
@@ -498,13 +498,13 @@ function end_cavalry() {
upop_summary()
vm_next()
} else if (game.cav.next) {
- pop_summary()
+ upop_summary()
if (typeof game.cav.next === "function")
game.cav.next()
else
game.state = game.cav.next
} else {
- pop_summary()
+ upop_summary()
goto_eligible()
}
}
@@ -691,6 +691,7 @@ states.main_phase = {
}
states.cavalry = {
+ inactive: "Gain Cavalry tokens",
prompt() {
if (game.cav.n > 0) {
view.prompt = `Gain Cavalry: Take ${game.cav.n} calvary tokens.`
@@ -709,6 +710,7 @@ states.cavalry = {
}
states.compromising_gifts = {
+ inactive: "Compromising gifts",
prompt() {
view.prompt = "Compromising gifts: Reduce your influence by one to gain two Resources and two Cavalry tokens."
gen_action_influence(game.current)
@@ -734,6 +736,7 @@ states.compromising_gifts = {
}
states.demand = {
+ inactive: "Demand Obedience",
prompt() {
view.prompt = "Demand Obedience: Select a Controlled province with a Governor."
@@ -765,6 +768,7 @@ function demand_obedience_in_space(s) {
}
states.march = {
+ inactive: "March",
prompt() {
view.prompt = "March: Select a space to move into."
@@ -786,6 +790,7 @@ states.march = {
}
states.march_space = {
+ inactive: "March",
prompt() {
view.prompt = "March: Move pieces from adjacent spaces."
view.where = game.cmd.where
@@ -813,6 +818,7 @@ states.march_space = {
}
states.rebel = {
+ inactive: "Rebel",
prompt() {
view.prompt = "Rebel: Select a Province where you are in majority."
@@ -836,6 +842,7 @@ states.rebel = {
}
states.strategic_assistance = {
+ inactive: "Strategic Assistance",
prompt() {
let n_command = (game.cmd.free === 2) ? "two" : "one"
view.prompt = `Strategic Assistance: ${faction_name[game.current]} must execute ${n_command} Mongol Invaders Commands`
@@ -848,6 +855,7 @@ states.strategic_assistance = {
}
states.tax = {
+ inactive: "Tax",
prompt() {
view.prompt = `Tax: Collect ${tax_count()} from Controlled Prosperity and Temples.`
if (game.decree.count > 0)
@@ -1137,6 +1145,7 @@ function screen_die(d) {
}
states.attack = {
+ inactive: "Attack",
prompt() {
if (can_select_cmd_space(1) && can_attack()) {
if (game.current === DS)
@@ -1164,6 +1173,7 @@ states.attack = {
}
states.attack_select = {
+ inactive: "Attack",
prompt() {
view.prompt = "Attack: Choose a Faction to attack."
for (let [f, t] of game.cmd.target.entries())
@@ -1212,6 +1222,7 @@ function goto_attack_space() {
}
states.attack_adjacent_support = {
+ inactive: "Attack",
prompt() {
view.who = game.cmd.selected
@@ -1323,6 +1334,7 @@ function goto_attack_cavalry(curr) {
}
states.attack_cavalry = {
+ inactive: "Attack",
prompt() {
let curr_die = [0, 1, 2, 3, 4, 5]
view.prompt = "Attack: Use cavalry to Charge your dice or Screen your opponent's dice."
@@ -1389,6 +1401,7 @@ function remove_mi_casualties(s) {
}
states.attack_casualties = {
+ inactive: "Attack",
prompt() {
if (
game.cmd.count > 0 &&
@@ -1682,6 +1695,7 @@ function goto_migrate() {
}
states.migrate = {
+ inactive: "Migrate",
prompt() {
view.prompt = "Migrate: Select a Province as the Migrate destination."
@@ -1708,6 +1722,7 @@ function goto_migrate_space() {
}
states.migrate_space = {
+ inactive: "Migrate",
prompt() {
view.prompt = `Migrate: Move in up to three ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}s.`
view.where = game.cmd.where
@@ -1760,6 +1775,7 @@ states.migrate_space = {
}
states.migrate_shift_influence = {
+ inactive: "Migrate",
prompt() {
view.prompt = "Migrate: Pay one resource to Shift Influence."
@@ -2033,6 +2049,7 @@ function is_n_from_warangal(n, s) {
}
states.campaign = {
+ inactive: "Campaign",
prompt() {
view.actions.campaign_spaces = [...game.decree.campaign].sort((a, b) => a - b)
@@ -2084,6 +2101,7 @@ states.campaign = {
}
states.campaign_moves = {
+ inactive: "Campaign",
prompt() {
view.prompt = "Campaign: Move units along the campaign trail."
view.actions.campaign_spaces = [...game.decree.campaign].sort((a, b) => a - b)
@@ -2163,6 +2181,7 @@ function goto_build() {
}
states.build = {
+ inactive: "Build",
prompt() {
if (game.current === BK)
view.prompt = "Build: Select a Province with an Amir."
@@ -2215,6 +2234,7 @@ function goto_compel() {
}
states.compel = {
+ inactive: "Compel",
prompt() {
view.prompt = "Compel: Select Province with or adjacent to your presence."
@@ -2236,6 +2256,7 @@ function goto_compel_space() {
}
states.compel_space = {
+ inactive: "Compel",
prompt() {
if (game.decree.count > 0) {
view.prompt = "Compel: Move in or add up to two Rajas."
@@ -2274,6 +2295,7 @@ states.compel_space = {
}
states.compel_space_influencial = {
+ inactive: "Compel",
prompt() {
view.prompt = "Compel: Remove one enemy unit in the selected Province."
@@ -2322,6 +2344,7 @@ function goto_conspire() {
}
states.conspire = {
+ inactive: "Conspire",
prompt() {
if ((!has_piece(AVAILABLE, BK, ELITE))) {
view.prompt = "Conspire: No Available Amir."
@@ -2380,6 +2403,7 @@ function conspire_piece(p) {
}
states.conspire_space = {
+ inactive: "Conspire",
prompt () {
if (game.inf[BK] < 2) {
view.prompt = "Conspire: Select a Governor to convert to an Amir."
@@ -2413,6 +2437,7 @@ function goto_trade() {
}
states.trade = {
+ inactive: "Trade",
prompt() {
view.prompt = `Trade: Collect ${trade_count()} from Provinces with your presence.`
if (game.decree.count === 1)
@@ -2444,6 +2469,7 @@ function can_advance() {
}
states.advance = {
+ inactive: "Advance",
prompt() {
view.prompt = "Advance: Select the Advance destination"
@@ -2461,6 +2487,7 @@ states.advance = {
}
states.advance_space = {
+ inactive: "Advance",
prompt() {
view.prompt = "Advance: Move any number of Mongol Invaders into destination"