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 | |
parent | a25b93cf1fd61c44c6608d97630b6c0e6b106372 (diff) | |
download | vijayanagara-dbad03467fce3103ae0e05b345434a61860a9db8.tar.gz |
More icons.
-rw-r--r-- | events.txt | 2 | ||||
-rw-r--r-- | icons/Cavalry.png | bin | 0 -> 2019 bytes | |||
-rw-r--r-- | icons/Flags_BK.png | bin | 0 -> 2182 bytes | |||
-rw-r--r-- | icons/Flags_DS.png | bin | 0 -> 1717 bytes | |||
-rw-r--r-- | icons/Flags_MI.png | bin | 0 -> 1398 bytes | |||
-rw-r--r-- | icons/Flags_VE.png | bin | 0 -> 2165 bytes | |||
-rw-r--r-- | icons/Influence_BK.png | bin | 0 -> 1119 bytes | |||
-rw-r--r-- | icons/Influence_VE.png | bin | 0 -> 1417 bytes | |||
-rw-r--r-- | icons/Resources.png | bin | 0 -> 2164 bytes | |||
-rw-r--r-- | images/Flags_MI.png | bin | 10278 -> 5375 bytes | |||
-rw-r--r-- | play.css | 6 | ||||
-rw-r--r-- | play.js | 17 | ||||
-rw-r--r-- | rules.js | 65 | ||||
-rw-r--r-- | tools/gencode.js | 1 | ||||
-rw-r--r-- | tools/log_icons/Cavalry.png | bin | 0 -> 9800 bytes | |||
-rw-r--r-- | tools/log_icons/Flags_BK.png | bin | 0 -> 7582 bytes | |||
-rw-r--r-- | tools/log_icons/Flags_DS.png | bin | 0 -> 7673 bytes | |||
-rw-r--r-- | tools/log_icons/Flags_MI.png | bin | 0 -> 5375 bytes | |||
-rw-r--r-- | tools/log_icons/Flags_VE.png | bin | 0 -> 8995 bytes | |||
-rw-r--r-- | tools/log_icons/Influence_BK.png | bin | 0 -> 4618 bytes | |||
-rw-r--r-- | tools/log_icons/Influence_VE.png | bin | 0 -> 6109 bytes | |||
-rw-r--r-- | tools/log_icons/Resources.png | bin | 0 -> 7044 bytes |
22 files changed, 49 insertions, 42 deletions
@@ -799,7 +799,7 @@ SHADED 36 SUCC 0 force_current DS - loge "Power struggle in Delhi." + log_succ DS "Power struggle in Delhi." flip_dynasty log_succ DS "The Sultanate reimposes its dominance." campaign diff --git a/icons/Cavalry.png b/icons/Cavalry.png Binary files differnew file mode 100644 index 0000000..cf891d7 --- /dev/null +++ b/icons/Cavalry.png diff --git a/icons/Flags_BK.png b/icons/Flags_BK.png Binary files differnew file mode 100644 index 0000000..16f5c55 --- /dev/null +++ b/icons/Flags_BK.png diff --git a/icons/Flags_DS.png b/icons/Flags_DS.png Binary files differnew file mode 100644 index 0000000..561dadb --- /dev/null +++ b/icons/Flags_DS.png diff --git a/icons/Flags_MI.png b/icons/Flags_MI.png Binary files differnew file mode 100644 index 0000000..259b2bb --- /dev/null +++ b/icons/Flags_MI.png diff --git a/icons/Flags_VE.png b/icons/Flags_VE.png Binary files differnew file mode 100644 index 0000000..43a4c07 --- /dev/null +++ b/icons/Flags_VE.png diff --git a/icons/Influence_BK.png b/icons/Influence_BK.png Binary files differnew file mode 100644 index 0000000..88c2d52 --- /dev/null +++ b/icons/Influence_BK.png diff --git a/icons/Influence_VE.png b/icons/Influence_VE.png Binary files differnew file mode 100644 index 0000000..dfd6369 --- /dev/null +++ b/icons/Influence_VE.png diff --git a/icons/Resources.png b/icons/Resources.png Binary files differnew file mode 100644 index 0000000..7d9f0ae --- /dev/null +++ b/icons/Resources.png diff --git a/images/Flags_MI.png b/images/Flags_MI.png Binary files differindex f9d2eb0..89e66f1 100644 --- a/images/Flags_MI.png +++ b/images/Flags_MI.png @@ -183,9 +183,11 @@ img.f { #log img.d { height: 15px; vertical-align: -4px; margin: 0px 1px; } #log img.c { height: 15px; vertical-align: -3px; margin: 0px 1px;} -#log img.f { height: 16px; vertical-align: -2px; } #log img.h { height: 17px; vertical-align: -2px; margin: -1px 2px; } -#log img.i { height: 34px; vertical-align: -3px; margin: -10px; } + +#log img.f { height: 16px; vertical-align: -3px; } +#log img.i { height: 14px; vertical-align: -3px; } +#log img.m { height: 16px; vertical-align: -3px; } #log .adice { font-size: 14px; @@ -1387,12 +1387,15 @@ const ICONS = { CDS: '<img class="c" src="pieces/ds_troop.svg">', CMI: '<img class="c" src="pieces/mongol_invader.svg">', - FDS: '<img class="f" src="images/Flags_DS.png">', - FBK: '<img class="f" src="images/Flags_BK.png">', - FVE: '<img class="f" src="images/Flags_VE.png">', - FMI: '<img class="f" src="images/Flags_MI.png">', - IBK: '<img class="i" src="images/Influence_BK.png">', - IVE: '<img class="i" src="images/Influence_VE.png">', + FDS: '<img class="f" src="icons/Flags_DS.png">', + FBK: '<img class="f" src="icons/Flags_BK.png">', + FVE: '<img class="f" src="icons/Flags_VE.png">', + FMI: '<img class="f" src="icons/Flags_MI.png">', + IBK: '<img class="i" src="icons/Influence_BK.png">', + IVE: '<img class="i" src="icons/Influence_VE.png">', + + CAV: '<img class="m" src="icons/Cavalry.png">', + RES: '<img class="i" src="icons/Resources.png">', A1: '<span class="adice">\u2776</span>', A2: '<span class="adice">\u2777</span>', @@ -1447,6 +1450,8 @@ function on_log(text) { text = text.replace(/\bFMI\b/g, sub_icon) text = text.replace(/\bIBK\b/g, sub_icon) text = text.replace(/\bIVE\b/g, sub_icon) + text = text.replace(/\bCAV\b/g, sub_icon) + text = text.replace(/\bRES\b/g, sub_icon) text = text.replace(/\b[AD][1-6]\b/g, sub_icon) @@ -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 ], ] diff --git a/tools/gencode.js b/tools/gencode.js index 70ef3c2..427fec6 100644 --- a/tools/gencode.js +++ b/tools/gencode.js @@ -143,7 +143,6 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) { break case "log": - case "loge": case "prompt": emit([ line[0], line.slice(1).join(" ") ]) break diff --git a/tools/log_icons/Cavalry.png b/tools/log_icons/Cavalry.png Binary files differnew file mode 100644 index 0000000..83ab64c --- /dev/null +++ b/tools/log_icons/Cavalry.png diff --git a/tools/log_icons/Flags_BK.png b/tools/log_icons/Flags_BK.png Binary files differnew file mode 100644 index 0000000..e1132c8 --- /dev/null +++ b/tools/log_icons/Flags_BK.png diff --git a/tools/log_icons/Flags_DS.png b/tools/log_icons/Flags_DS.png Binary files differnew file mode 100644 index 0000000..4d1173d --- /dev/null +++ b/tools/log_icons/Flags_DS.png diff --git a/tools/log_icons/Flags_MI.png b/tools/log_icons/Flags_MI.png Binary files differnew file mode 100644 index 0000000..89e66f1 --- /dev/null +++ b/tools/log_icons/Flags_MI.png diff --git a/tools/log_icons/Flags_VE.png b/tools/log_icons/Flags_VE.png Binary files differnew file mode 100644 index 0000000..e94ec29 --- /dev/null +++ b/tools/log_icons/Flags_VE.png diff --git a/tools/log_icons/Influence_BK.png b/tools/log_icons/Influence_BK.png Binary files differnew file mode 100644 index 0000000..679e9c0 --- /dev/null +++ b/tools/log_icons/Influence_BK.png diff --git a/tools/log_icons/Influence_VE.png b/tools/log_icons/Influence_VE.png Binary files differnew file mode 100644 index 0000000..3a11212 --- /dev/null +++ b/tools/log_icons/Influence_VE.png diff --git a/tools/log_icons/Resources.png b/tools/log_icons/Resources.png Binary files differnew file mode 100644 index 0000000..2a0393a --- /dev/null +++ b/tools/log_icons/Resources.png |