diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-28 00:02:28 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-28 00:05:18 +0100 |
commit | 7b288ce5da3fcf4d76299d9f0e43c2147a71ad3f (patch) | |
tree | d86b6e59a36315dca1732ae5c1e026be7dca35ad /rules.js | |
parent | 22502ff663939f6e6312910372828ebb11577725 (diff) | |
download | maria-7b288ce5da3fcf4d76299d9f0e43c2147a71ad3f.tar.gz |
More logging.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -7,9 +7,6 @@ TODO: confirm austria/pragmatic stacking cooperation OPTIMIZE: fewer/smarter/smaller lists, smarter power control checks OPTIMIZE: range checks instead of set checks -POLISH: check inactive prompts - -UI: show who controls which power in player list UI: show TC modifiers in banner */ @@ -4141,13 +4138,15 @@ states.political_shift = { let info = event_shift[current_political_effect()] game[info.track] += n if (n < 0) - log("Shift " + TRACK_NAME[info.track] + " " + (-n) + " left.") + log(TRACK_NAME[info.track] + " " + (-n) + " left.") else - log("Shift " + TRACK_NAME[info.track] + " " + (n) + " right.") + log(TRACK_NAME[info.track] + " " + (n) + " right.") next_execute_political_card() }, pass() { push_undo() + let info = event_shift[current_political_effect()] + log("Did not shift " + TRACK_NAME[info.track] + ".") next_execute_political_card() }, } @@ -4178,6 +4177,10 @@ states.political_troop_power = { game.count = info.troops }, pass() { + if (info.tcs > 0) + log("Did not receive TC and troops.") + else + log("Did not receive troops.") next_execute_political_card() }, } @@ -4294,7 +4297,7 @@ states.saxony_shift = { view.actions.pass = 1 }, shift(_) { - log("Saxony marker shifted " + game.count + " right.") + log("Saxony marker " + game.count + " right.") let save_saxony = game.saxony game.saxony = Math.max(1, Math.min(5, game.saxony + game.count)) game.count = 0 @@ -4308,7 +4311,7 @@ states.saxony_shift = { next_combat() }, pass() { - log("Saxony marker not shifted.") + log("Did not shift Saxony marker.") game.count = 0 next_combat() }, @@ -4697,6 +4700,7 @@ states.offer_peace = { view.actions.pass = 1 }, peace() { + log("Prussia wants to annex Silesia.") set_active_to_power(P_AUSTRIA) game.state = "accept_peace" }, @@ -4713,15 +4717,18 @@ states.accept_peace = { view.actions.refuse = 1 }, accept() { + log("Austria accepts peace.") goto_annex_silesia() }, refuse() { + log("Austria refuses peace.") next_sequence_of_play() }, } function goto_annex_silesia() { - log("Silesia Annexed") + log_br() + log("=1 Silesia Annexed") game.flags |= F_SILESIA_ANNEXED game.flags |= F_PRUSSIA_NEUTRAL @@ -4953,7 +4960,11 @@ states.france_reduces_military_objectives = { } } n = (n + 1) >> 1 - log("France set aside " + n + " victory markers.") + + log_br() + log("France reduces military objectives.") + log("Set aside " + n + " victory markers.") + game.vp[SET_ASIDE_FRANCE] = n game.state = "france_reduces_military_objectives_done" }, |