summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js12
-rw-r--r--rules.ts12
2 files changed, 15 insertions, 9 deletions
diff --git a/play.js b/play.js
index 9356fbb..e2e8a50 100644
--- a/play.js
+++ b/play.js
@@ -1554,14 +1554,20 @@ function on_update() {
}
ui.turn.style.left = (calendar_xy[view.turn >> 1][0] + 91 - 52) + "px"
ui.turn.style.top = (calendar_xy[view.turn >> 1][1] + 94) + "px"
- ui.end.style.left = (calendar_xy[view.end][0] + 91 - 52) + "px"
- ui.end.style.top = (calendar_xy[view.end][1] + 94) + "px"
+
+ if (view.end < 16) {
+ ui.end.style.display = null
+ ui.end.style.left = (calendar_xy[view.end][0] + 91 - 52) + "px"
+ ui.end.style.top = (calendar_xy[view.end][1] + 94) + "px"
+ } else {
+ ui.end.style.display = "none"
+ }
ui.held_york.textContent = `${view.held_y} Held`
ui.held_lancaster.textContent = `${view.held_l} Held`
if (view.victory_check <= 45) {
- ui.victory_check.style.display = "block"
+ ui.victory_check.style.display = null
ui.victory_check.style.top = (track_xy[view.victory_check][1]) + "px"
ui.victory_check.style.left = (track_xy[view.victory_check][0]) + "px"
} else {
diff --git a/rules.ts b/rules.ts
index 8c123dd..c3e8f33 100644
--- a/rules.ts
+++ b/rules.ts
@@ -8529,7 +8529,7 @@ function check_threshold_victory() {
// === 5.3 SCENARIO END VICTORY ===
function check_scenario_end_victory() {
- if (current_turn() === scenario_last_turn[game.scenario]) {
+ if (current_turn() + 1 === scenario_end_marker[game.scenario]) {
if (game.influence === 0)
goto_game_over("Draw", "The game ended in a draw.")
else if (game.influence > 0)
@@ -8566,12 +8566,12 @@ const scenario_setup = [
setup_III,
]
-const scenario_last_turn = [
- 15,
+const scenario_end_marker = [
+ 16,
2,
8,
- 15,
- 15,
+ 16,
+ 16,
]
function scenario_victory_threshold() {
@@ -11713,7 +11713,7 @@ exports.view = function (state, current) {
log: game.log,
reveal: 0,
- end: scenario_last_turn[game.scenario],
+ end: scenario_end_marker[game.scenario],
turn: game.turn,
victory_check: scenario_victory_threshold(),
influence: game.influence,