diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-04-12 14:39:15 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-04-12 15:23:10 +0200 |
commit | dbad03467fce3103ae0e05b345434a61860a9db8 (patch) | |
tree | 734ad7ee60f7bdf8249f5d1bf2fed4f402eddc7e /rules.js | |
parent | a25b93cf1fd61c44c6608d97630b6c0e6b106372 (diff) | |
download | vijayanagara-dbad03467fce3103ae0e05b345434a61860a9db8.tar.gz |
More icons.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 65 |
1 files changed, 33 insertions, 32 deletions
@@ -522,7 +522,7 @@ function goto_cavalry(n, next) { } push_summary() game.state = "cavalry" - // Removing automatic cavalry tokens attribution + // Removing automatic cavalry attribution // while (game.cav.n > 0 && n_available_cavalry() > 0) { // let c = find_cavalry(AVAILABLE) // log_summary_cavalry(c) @@ -753,7 +753,7 @@ states.main_phase = { } states.cavalry = { - inactive: "Gain Cavalry tokens", + inactive: "Gain Cavalry", prompt() { if (game.cav.n > 0) { view.prompt = `Gain Cavalry: Take ${game.cav.n} Cavalry token${game.cav.n > 1 ? "s" : ""}.` @@ -761,7 +761,7 @@ states.cavalry = { if (can_take) view.prompt = `Gain Cavalry: Take ${game.cav.n} Cavalry token${game.cav.n > 1 ? "s" : ""}.` else { - view.prompt = "Gain Cavalry: No more Cavalry tokens available." + view.prompt = "Gain Cavalry: No more Cavalry available." view.actions.end_cavalry = 1 } } else { @@ -783,7 +783,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." + view.prompt = "Compromising Gifts: Reduce your Influence by one to gain two Resources and two Cavalry." gen_action_influence(game.current) view.actions.end_gifts = 1 @@ -1403,12 +1403,12 @@ function goto_attack_cavalry(curr) { ) if (d_hit !== -1) { - log(`${faction_flags[curr]} used Cavalry.`) + log(`${faction_flags[curr]} used CAV`) attack_use_cavalry(d_hit + (curr === game.cmd.attacker ? 0 : 4), MI) } else { let d_hit2 = dices.findIndex(d => d === 2) if (d_hit2 !== -1 && curr === game.cmd.attacker) { - log(`${faction_flags[curr]} used Cavalry.`) + log(`${faction_flags[curr]} used CAV`) attack_use_cavalry(d_hit2 + (curr === game.cmd.attacker ? 0 : 4), MI) } } @@ -1437,7 +1437,7 @@ states.attack_cavalry = { push_undo() if (!game.cmd.cavalry) { log_br() - log(`${faction_flags[game.current]} used Cavalry.`) + log(`${faction_flags[game.current]} used CAV`) game.cmd.cavalry = true } attack_use_cavalry(d, game.current) @@ -3719,7 +3719,7 @@ function action_ask_cavalry() { states.ask_cavalry = { disable_negotiation: true, prompt() { - view.prompt = "Negotiate: Ask another faction for Cavalry tokens?" + view.prompt = "Negotiate: Ask another faction for Cavalry?" if (!is_player_ds() && n_cavalry(DS) > 0) { gen_action_faction_cavalry(DS) gen_action_faction(DS) @@ -3745,10 +3745,10 @@ states.ask_cavalry = { } states.give_cavalry = { - inactive: "Transfer Cavalry tokens", + inactive: "Transfer Cavalry", disable_negotiation: true, prompt() { - view.prompt = `Negotiate: ${faction_name[game.transfer.current]} asked for Cavalry tokens.` + view.prompt = `Negotiate: ${faction_name[game.transfer.current]} asked for Cavalry.` if (n_cavalry(game.current) >= 1) gen_action_faction_cavalry(game.current) if (game.transfer.count > 0) { @@ -3788,7 +3788,7 @@ function action_transfer_cavalry() { states.transfer_cavalry = { disable_negotiation: true, prompt() { - view.prompt = "Transfer Cavalry tokens to another faction." + view.prompt = "Transfer Cavalry to another faction." if (n_cavalry(game.current) >= 1) { if (!is_player_ds()) gen_action_faction(DS) @@ -3911,16 +3911,16 @@ function log_action(msg) { function log_transfer(msg) { log_br() - log(".n " + msg) + log(".i " + msg) log_br() } function log_transfer_resources(from, to, n) { - log_transfer(`${faction_short[from]} gave ${n} Resources to ${faction_short[to]}.`) + log_transfer(`${faction_short[from]} gave ${n} RES to ${faction_short[to]}.`) } function log_transfer_cavalry(from, to, n) { - log_transfer(`${faction_short[from]} gave ${n} Cavalry tokens to ${faction_short[to]}.`) + log_transfer(`${faction_short[from]} gave ${n} CAV to ${faction_short[to]}.`) } function log_space(s, action) { @@ -4006,27 +4006,27 @@ function log_summary_remove_from(p) { function log_summary_cavalry(c) { let from = game.cavalry[c] if (from !== AVAILABLE) - log_summary(faction_flags[game.current] + " +% Cavalry from " + faction_flags[from] + ".") + log_summary(faction_flags[game.current] + " +% CAV from " + faction_flags[from] + ".") else - log_summary(faction_flags[game.current] + " +% Cavalry from supply.") + log_summary(faction_flags[game.current] + " +% CAV from supply.") } function log_summary_resources(faction) { - log_summary(faction_flags[faction] + " +% Resources.") + log_summary(faction_flags[faction] + " +% RES") } function logi_resources(faction, n) { if (n > 0) - logi(faction_flags[faction] + " +" + n + " Resources.") + logi(faction_flags[faction] + " +" + n + " RES") else - logi(faction_flags[faction] + " " + n + " Resources." ) + logi(faction_flags[faction] + " " + n + " RES" ) } function log_resources(faction, n) { if (n > 0) - log(faction_flags[faction] + " +" + n + " Resources.") + log(faction_flags[faction] + " +" + n + " RES") else - log(faction_flags[faction] + " " + n + " Resources.") + log(faction_flags[faction] + " " + n + " RES") } function format_unit_count(faction, type, n) { @@ -4676,6 +4676,7 @@ function vm_log_br() { function vm_log_succ() { log_h2(faction_short[vm_operand(1)]) log(".i " + vm_operand(2)) + log_br() vm_next() } @@ -5150,7 +5151,7 @@ function vm_spend_cavalry() { for (let i = 0; i < n; ++i) { game.cavalry[find_cavalry(game.current)] = AVAILABLE } - log(`${faction_flags[game.current]} spent ${n} Cavalry token.`) + log(`${faction_flags[game.current]} spent ${n} CAV`) vm_next() } @@ -5230,7 +5231,7 @@ states.vm_steal = { let n = Math.min(vm_operand(3), game.resources[f]) add_resources(game.current, n) add_resources(f, -n) - log(`${faction_flags[game.current]} stole ${n} Resources from ${faction_flags[f]}.`) + log(`${faction_flags[game.current]} stole ${n} RES from ${faction_flags[f]}.`) vm_next() }, skip() { @@ -5250,7 +5251,7 @@ function vm_cav_resources() { states.vm_cav_resources = { prompt() { if (game.vm.count === 0) { - event_prompt("No Cavalry token nor Resource to gain.") + event_prompt("No Cavalry nor Resources to gain.") view.actions.skip = 1 } else { event_prompt(`Gain ${game.vm.count} Resource${game.vm.count > 1 ? "s": ""} or Cavalry token${game.vm.count > 1 ? "s": ""}.`) @@ -5294,7 +5295,7 @@ states.vm_steal_cavalry = { let f2 = vm_operand(2) let n = Math.min(vm_operand(3), n_cavalry(f2)) if (n == 0) { - event_prompt(`${faction_name[f2]} has no Cavalry tokens.`) + event_prompt(`${faction_name[f2]} has no Cavalry.`) view.actions.skip = 1 } else { event_prompt(`Steal ${n} Cavalry token from ${faction_name[f2]}.`) @@ -5308,7 +5309,7 @@ states.vm_steal_cavalry = { c = find_cavalry(f2) set_cavalry_faction(c, game.current) } - log(`${faction_flags[game.current]} stole ${n} Cavalry token from ${faction_flags[f2]}.`) + log(`${faction_flags[game.current]} stole ${n} CAV from ${faction_flags[f2]}.`) vm_next() }, skip() { @@ -5491,7 +5492,7 @@ states.vm_flip_dynasty = { }, dynasty_card() { game.succ += 1 - log("Dawn of the Tughlaq Dynasty, Rebel Commands are now available.") + log("Rebel Commands are now available.") vm_next() } } @@ -5779,7 +5780,7 @@ states.shaded_6_2 = { let n = Math.min(game.resources[f], 3) add_resources(f, -n) add_resources(DS, n) - log(`${faction_flags[game.current]} stole ${n} Resources from ${faction_flags[f]}.`) + log(`${faction_flags[game.current]} stole ${n} RES from ${faction_flags[f]}.`) vm_next() } } @@ -5863,7 +5864,7 @@ states.shaded_29 = { }, next() { if (game.cmd.count < 3) { - log(`${faction_flags[game.current]} spent ${3-game.cmd.count} Resources.`) + log(`${faction_flags[game.current]} spent ${3-game.cmd.count} RES`) upop_summary() } else { game.summary = null @@ -6937,17 +6938,17 @@ CODE[36 * 2 + 1] = [ // SUCC 0 CODE[0 * 2 + 74] = [ [ vm_force_current, DS ], - [ vm_log, ".i Power struggle in Delhi." ], + [ vm_log_succ, DS, "Power struggle in Delhi." ], [ vm_flip_dynasty ], [ vm_log_succ, DS, "The Sultanate reimposes its dominance." ], [ vm_campaign ], [ vm_force_current, BK ], - [ vm_prompt, "Gain Cavalry tokens equal to Influence and Forts." ], + [ vm_prompt, "Gain Cavalry equal to Influence and Forts." ], [ vm_log_succ, BK, "Military labor market thrives." ], [ vm_gain_cavalry, ()=>(game.inf[BK] + count_pieces_on_map(BK, DISC)) ], [ vm_force_current, VE ], [ vm_prompt, "Gain resources equal to Influence and Temples." ], - [ vm_log_succ, VE, "Temple towns emerge anew" ], + [ vm_log_succ, VE, "Temple towns emerge anew." ], [ vm_resources, false, VE, ()=>(game.inf[VE] + count_pieces_on_map(VE, DISC)) ], [ vm_return ], ] |