diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-05 23:12:25 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-05 23:12:54 +0200 |
commit | eddf155524f44b5437a7028cbf33695a0d449f2c (patch) | |
tree | 9632c698ea652ef506f21cf8f818bf000d22bfa0 | |
parent | f8c4a98ab031abda04b3b089d9a7d490da2ff9ae (diff) | |
download | friedrich-eddf155524f44b5437a7028cbf33695a0d449f2c.tar.gz |
shorten combat prompts to fit mobile
-rw-r--r-- | play.css | 1 | ||||
-rw-r--r-- | play.js | 2 | ||||
-rw-r--r-- | rules.js | 3 |
3 files changed, 4 insertions, 2 deletions
@@ -11,6 +11,7 @@ #prompt { font-family: "Suit Symbols", var(--font-widget); font-variant-numeric: tabular-nums; + white-space: wrap; } #log { @@ -1453,6 +1453,8 @@ function on_log(text) { text = text.replace(/</g, "<") text = text.replace(/>/g, ">") + text = text.replaceAll(" 1 troops", " 1 troop") + text = colorize(text) text = text.replace(/S(\d+)/g, sub_space) text = text.replace(/P(\d+)/g, sub_piece) @@ -2300,9 +2300,8 @@ function format_combat(value) { let a = format_combat_stack(game.attacker) let d = format_combat_stack(game.defender) let s = signed_number(value) - let city = data.cities.name[game.attacker] let p = POWER_NAME[game.power] - return `${p} at ${s} in combat (${a} vs ${d} at ${city}).` + return `${a} vs ${d}. ${p} is at ${s}.` } function inactive_attack() { |