summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html17
-rw-r--r--play.js4
-rw-r--r--rules.js23
3 files changed, 25 insertions, 19 deletions
diff --git a/play.html b/play.html
index de32069..d1fca1b 100644
--- a/play.html
+++ b/play.html
@@ -27,9 +27,11 @@
}
:root {
+ --suf-25: hsl(273 80% 25%);
--suf-75: hsl(273 39% 75%);
--suf-85: hsl(273 39% 85%);
+ --opp-25: hsl(16 100% 25%);
--opp-75: hsl(16 85% 75%);
--opp-85: hsl(16 85% 85%);
}
@@ -59,10 +61,17 @@ body.Opposition header.your_turn { background-color: var(--opp-75); }
#log .h1 { background-color: silver; }
#log .h2 { background-color: gainsboro; }
-#log .suf { background-color: var(--suf-85); }
-#log .opp { background-color: var(--opp-85); }
-#log .tip { cursor: pointer; text-decoration: underline; }
-#log .tip:hover { text-decoration: underline; font-weight: bold; }
+#log .suf { background-color: var(--suf-85); border-top: 1px solid var(--suf-25); border-bottom: 1px solid var(--suf-25); }
+#log .opp { background-color: var(--opp-85); border-top: 1px solid var(--opp-25); border-bottom: 1px solid var(--opp-25); }
+#log .tip { cursor: pointer; }
+#log .tip.states { font-style: italic; }
+#log .tip.support { font-style: italic; }
+#log .tip.opposition { font-style: italic; }
+#log .tip.strategy { font-style: italic; }
+#log .tip:hover { text-decoration: underline; }
+
+#log .tip.support { color: var(--suf-25); }
+#log .tip.opposition { color: var(--opp-25); }
#log > .p { padding-left: 20px; text-align: right; font-style: italic; opacity: 75%; }
#log > .i { padding-left: 20px; }
diff --git a/play.js b/play.js
index c136495..9d25f31 100644
--- a/play.js
+++ b/play.js
@@ -45,7 +45,7 @@ let ui = {
cubes: [],
green_checks: [],
red_xs: [],
- cards: [ null ],
+ cards: [ null ],
us_states: [ null ],
regions: [ null ],
labels: {},
@@ -492,7 +492,7 @@ function on_click_us_state_tip(x) { // eslint-disable-line no-unused-vars
function sub_card_name(_match, p1, _offset, _string) {
let c = p1 | 0
let n = CARDS[c].name
- return `<span class="tip" onmouseenter="on_focus_card_tip(${c})" onmouseleave="on_blur_card_tip()">${n}</span>`
+ return `<span class="tip ${CARDS[c].type}" onmouseenter="on_focus_card_tip(${c})" onmouseleave="on_blur_card_tip()">${n}</span>`
}
function sub_region_name(_match, p1, _offset, _string) {
diff --git a/rules.js b/rules.js
index 6454ad8..85335e2 100644
--- a/rules.js
+++ b/rules.js
@@ -906,7 +906,6 @@ function goto_operations_phase() {
game.state = "operations_phase"
game.active = SUF
game.round = 1
- begin_player_round()
}
const THE_CIVIL_WAR = find_card("The Civil War")
@@ -1079,21 +1078,24 @@ states.operations_phase = {
},
card_campaigning(c) {
push_undo()
- log_h3(`C${c} - Campaigning`)
+ log_round("Campaigning")
+ log("C" + c)
log_br()
update_card_played(c)
goto_campaigning(c)
},
card_organizing(c) {
push_undo()
- log_h3(`C${c} - Organizing`)
+ log_round("Organizing")
+ log("C" + c)
log_br()
update_card_played(c)
goto_organizing(c)
},
card_lobbying(c) {
push_undo()
- log_h3(`C${c} - Lobbying`)
+ log_round("Lobbying")
+ log("C" + c)
log_br()
update_card_played(c)
goto_lobbying(c)
@@ -1104,17 +1106,14 @@ states.operations_phase = {
}
function play_card_event(c) {
- log_h3(`C${c} - Event`)
+ log_round("Event")
+ log("C" + c)
if (has_extra_event_cost())
decrease_player_buttons(1)
log_br()
goto_event(c)
}
-function begin_player_round() {
- log_round(`Round ${game.round}`)
-}
-
function end_player_round() {
clear_undo()
delete game.has_played_claimed
@@ -1128,10 +1127,8 @@ function end_player_round() {
game.round += 1
} else {
goto_cleanup_phase()
- return
}
}
- begin_player_round()
}
function discard_persistent_card(cards, c) {
@@ -3087,9 +3084,9 @@ function log_h3(msg) {
function log_round(msg) {
log_br()
if (game.active === SUF)
- log(".h3.suf " + msg)
+ log(".h3.suf " + game.round + " \u2013 " + msg)
else
- log(".h3.opp " + msg)
+ log(".h3.opp " + game.round + " \u2013 " + msg)
log_br()
}