diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-28 17:01:49 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-30 21:59:25 +0200 |
commit | 152d54adff2b3986f26db275dc6fbd6c562716b4 (patch) | |
tree | cf6ef55fe9e92f7c01ad9ed250bd497d8a0604af /play.js | |
parent | 2ed77a094d9cfca0ea6ea73d4a516a478d344446 (diff) | |
download | friedrich-152d54adff2b3986f26db275dc6fbd6c562716b4.tar.gz |
fix card suit colorization for reserve cards
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -4,11 +4,6 @@ /* globals data, view, action_button, action_button_with_argument, confirm_action_button, send_action */ -// TODO: sort selected generals above deselected generals when detaching? -// TODO: show battle icon overlay (instead of roads) -// TODO: remove roads and path highlighting code -// TODO: tooltips - function toggle_pieces() { document.getElementById("pieces").classList.toggle("hide") } @@ -1129,11 +1124,6 @@ function sub_space(match, p1) { } function sub_tc(match, p1) { - let x = p1 | 0 - let suit = to_suit(x) - let value = to_value(x) - if (suit === RESERVE) - return suit_text[suit] return value + suit_text[suit] } @@ -1155,8 +1145,8 @@ function on_log(text) { text = text.replace(/>/g, ">") text = text.replace(/S(\d+)/g, sub_space) - text = text.replace(/C(\d+)/g, sub_tc) text = text.replace(/P(\d+)/g, sub_piece) + text = colorize(text) if (text.match(/^\$(\d+)/)) { let fx = parseInt(text.substring(1)) |