From 152d54adff2b3986f26db275dc6fbd6c562716b4 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 28 May 2024 17:01:49 +0200 Subject: fix card suit colorization for reserve cards --- play.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 5436ba4..6f368c5 100644 --- a/play.js +++ b/play.js @@ -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)) -- cgit v1.2.3