diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 40 |
1 files changed, 35 insertions, 5 deletions
@@ -343,6 +343,37 @@ function sub_card_name(match, p1, offset, string) { function sub_space_name(match, p1, offset, string) { let c = p1 | 0 let n = space_names[c] + if (true) { + if (c <= 2) + return '<span class="institutional">' + n + "</span>" + if (c <= 5) + return '<span class="public_opinion">' + n + "</span>" + if (c <= 8) + return '<span class="forts">' + n + "</span>" + if (c <= 11) + return '<span class="paris">' + n + "</span>" + } + + if (true) { + if (c <= 2) + return '<img class="s" src="space_institutional.svg">' + n + if (c <= 5) + return '<img class="s" src="space_public_opinion.svg">' + n + if (c <= 8) + return '<img class="s" src="space_forts.svg">' + n + if (c <= 11) + return '<img class="s" src="space_paris.svg">' + n + } + if (true) { + if (c <= 2) + return '<span class="institutional"><img class="s" src="space_institutional.svg">' + n + "</span>" + if (c <= 5) + return '<span class="public_opinion"><img class="s" src="space_public_opinion.svg">' + n + "</span>" + if (c <= 8) + return '<span class="forts"><img class="s" src="space_forts.svg">' + n + "</span>" + if (c <= 11) + return '<span class="paris"><img class="s" src="space_paris.svg">' + n + "</span>" + } return n } @@ -352,6 +383,8 @@ const IMG_RD = '<img class="d" src="pieces/red_disc.svg">' const IMG_BD = '<img class="d" src="pieces/blue_disc.svg">' const IMG_RM = '<img class="m" src="pieces/red_cylinder.svg">' const IMG_BM = '<img class="m" src="pieces/blue_cylinder.svg">' +const IMG_MV = '<img class="m" src="pieces/purple_cylinder.svg">' +const IMG_PV = '<img class="m" src="pieces/orange_cylinder.svg">' function on_log(text) { let p = document.createElement("div") @@ -373,6 +406,8 @@ function on_log(text) { text = text.replace(/\bBD\b/g, IMG_BD) text = text.replace(/\bRM\b/g, IMG_RM) text = text.replace(/\bBM\b/g, IMG_BM) + // text = text.replace(/\bMilitary VP\b/g, IMG_MV) + // text = text.replace(/\bPolitical VP\b/g, IMG_PV) if (text.match(/^\.h1/)) { text = text.substring(4) @@ -394,11 +429,6 @@ function on_log(text) { p.className = 'h3' } - if (text.match(/^\.h4/)) { - text = text.substring(4) - p.className = 'h4' - } - if (text.match(/^.hr$/)) { p.className = "hr"; text = ""; |