summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/play.js b/play.js
index e2de08e..4f46fbb 100644
--- a/play.js
+++ b/play.js
@@ -142,16 +142,26 @@ function has_eased_victory(power) {
return false
}
+function is_war_in_the_west() {
+ return !roles["Elisabeth"] && !roles["Maria Theresa"]
+}
+
+function is_4p_scenario() {
+ return !!roles["Frederick"] && !!roles["Elisabeth"] && !!roles["Maria Theresa"]
+}
+
function count_total_objectives(pow) {
let n = objective1[pow].length
if (!has_eased_victory(pow))
n += objective2[pow].length
- if (pow === P_PRUSSIA) {
+ if (pow === P_PRUSSIA && is_4p_scenario()) {
if (view.oo === 0)
n = 0
if (view.oo < 0 && set_has(view.fate, FC_POEMS) && set_has(view.fate, FC_LORD_BUTE))
n = 0
}
+ if (pow === P_PRUSSIA && is_war_in_the_west())
+ n = 0
if (pow === P_AUSTRIA && view.oo)
n -= 4
return n
@@ -1141,6 +1151,11 @@ function on_log(text) {
p.className = "i"
}
+ if (text.match(/^!/)) {
+ text = "Combat"
+ p.className = "combat"
+ }
+
text = text.replace(/&/g, "&amp;")
text = text.replace(/</g, "&lt;")
text = text.replace(/>/g, "&gt;")