summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css14
-rw-r--r--play.js12
-rw-r--r--rules.js10
3 files changed, 31 insertions, 5 deletions
diff --git a/play.css b/play.css
index 0ad71f5..59f65f2 100644
--- a/play.css
+++ b/play.css
@@ -89,6 +89,20 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); }
#log .dem_nc { background-image: url(images/USd_blank.gif);}
#log .dem_c {background-image: url(images/favicon_dem.svg);}
+#log .number {
+ display: inline-block;
+ margin: 0;
+ text-indent: 0;
+ text-align: center;
+ width: 12px;
+ height: 12px;
+ line-height: 12px;
+ border: 1px solid #444;
+}
+
+#log .number.d_tst { background-color: hsl(206, 85%, 80%); }
+#log .number.c_tst { background-color: hsl(355, 70%, 80%); }
+
/* MAP */
#mapwrap {
diff --git a/play.js b/play.js
index a68ee3c..b74fb1f 100644
--- a/play.js
+++ b/play.js
@@ -874,6 +874,16 @@ const ICONS = {
'£CU': '<span class="icon com_nc"></span>',
'£DC': '<span class="icon dem_c"></span>',
'£DU': '<span class="icon dem_nc"></span>',
+ '.dT5': '<span class="number d_tst">5</span>',
+ '.dT6': '<span class="number d_tst">6</span>',
+ '.dT7': '<span class="number d_tst">7</span>',
+ '.dT8': '<span class="number d_tst">8</span>',
+ '.dT9': '<span class="number d_tst">9</span>',
+ '.dT10': '<span class="number d_tst">10</span>',
+ '.cT5': '<span class="number c_tst">5</span>',
+ '.cT6': '<span class="number c_tst">6</span>',
+ '.cT7': '<span class="number c_tst">7</span>',
+ '.cT8': '<span class="number c_tst">8</span>'
}
const die = {
@@ -910,6 +920,8 @@ function on_log(text, ix) {
text = text.replace(/%(\d+)/g, sub_space_name)
text = text.replace(/D[1-6]/g, sub_die)
text = text.replace(/£[CD][CU]\b/g, sub_icon)
+ text = text.replace(/\.cT(\d+)/g, sub_icon)
+ text = text.replace(/\.dT(\d+)/g, sub_icon)
text = text.replace(/.to/g, sub_arrow)
if (text.match(/^\.h1/)) {
diff --git a/rules.js b/rules.js
index 3235a31..7768459 100644
--- a/rules.js
+++ b/rules.js
@@ -2838,7 +2838,7 @@ function do_tst_attempt() {
if (game.active === DEM) {
game.dem_tst_attempted_this_turn = 1
if (roll >= dem_tst_req[game.dem_tst_position]) {
- log(`Success: ${roll} >= ${dem_tst_req[game.dem_tst_position]}`)
+ log(`Success: ${roll} >= .dT${dem_tst_req[game.dem_tst_position]}`)
game.dem_tst_position++
game.dem_tst_attempted = 0
@@ -2866,14 +2866,14 @@ function do_tst_attempt() {
}
game.state = 'tiananmen_square_attempt_success'
} else {
- log(`Fail: ${roll} < ${dem_tst_req[game.dem_tst_position]}`)
+ log(`Fail: ${roll} < .dT${dem_tst_req[game.dem_tst_position]}`)
game.dem_tst_attempted = 1
game.state = 'tiananmen_square_attempt_fail'
}
} else {
game.com_tst_attempted_this_turn = 1
if (roll >= com_tst_req[game.com_tst_position]) {
- log(`Success: ${roll} >= ${com_tst_req[game.com_tst_position]}`)
+ log(`Success: ${roll} >= .cT${com_tst_req[game.com_tst_position]}`)
game.com_tst_position++
game.com_tst_attempted = 0
@@ -2905,7 +2905,7 @@ function do_tst_attempt() {
}
game.state = 'tiananmen_square_attempt_success'
} else {
- log(`Fail: ${roll} < ${com_tst_req[game.com_tst_position]}`)
+ log(`Fail: ${roll} < .cT${com_tst_req[game.com_tst_position]}`)
game.com_tst_attempted = 1
game.state = 'tiananmen_square_attempt_fail'
}
@@ -5013,7 +5013,7 @@ function vm_do_remove_x_infl(space) {
}
}
}
- let end = check_control(space)
+ let end_control = check_control(space)
logi(`${game.vm_available_ops} from %${space}${get_icons(starting_control, end_control)}`)
check_tyrant()
game.vm_available_ops = 0