diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-03-10 17:49:37 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-03-10 17:49:37 +0000 |
commit | 3445bae2ed395cbd55e14163946fba54eb997a3e (patch) | |
tree | b2b57c5b0d923d50f9f2f9e6b032da2b97ed139e | |
parent | 30db2dffd21cc8b76944856827fe4ab88c6acf4c (diff) | |
download | 1989-dawn-of-freedom-3445bae2ed395cbd55e14163946fba54eb997a3e.tar.gz |
Add pass banner
-rw-r--r-- | play.js | 8 | ||||
-rw-r--r-- | rules.js | 13 |
2 files changed, 19 insertions, 2 deletions
@@ -1043,6 +1043,10 @@ function on_log(text, ix) { text = text.replace(".S.d", "") p.className = "h2 dem" log_event = 0 + } else if (text.match(/^\.P\.d/)) { + text = "passed" + p.className = "h2 dem" + log_event = 0 } else if (text.match(/^\.O\.c/)) { text = "operations" p.className = "h2 com" @@ -1059,6 +1063,10 @@ function on_log(text, ix) { text = text.replace(".S.c", "") p.className = "h2 com" log_event = 0 + } else if (text.match(/^\.P\.c/)) { + text = "passed" + p.className = "h2 com" + log_event = 0 } else if (text.match(/\.c/)) { text = text.replace(".c", "") p.className = "h2 com" @@ -600,7 +600,7 @@ states.choose_card = { select_card(card) }, pass() { - log("Passed.") + log_pass_banner() game.state = 'end_round' }, } @@ -2210,7 +2210,7 @@ states.stasi_play_card = { } }, pass() { - log('No cards remaining. Passed.') + log_pass_banner() game.state = 'end_round' }, done() { @@ -4232,6 +4232,15 @@ function log_ops_banner() { finish_select_card() } +function log_pass_banner() { + log_br() + if (game.active === DEM) + log('.P.d') + else + log('.P.c') + log_br() +} + function log_event_banner() { log_br() if (game.active === DEM) |