From f49833646dd2298c448191a3cc90ec1b9ac4b30a Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 1 Sep 2022 00:39:06 -0700 Subject: [PATCH] Don't advance the clock between turn 0 and turn 1. Turn 0 isn't a real thing, it's just a game play affordance that allows players to set up their initial conditions. --- game/game.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/game/game.py b/game/game.py index a56c7d21..c030279f 100644 --- a/game/game.py +++ b/game/game.py @@ -271,7 +271,10 @@ class Game: events.update_front_line(front_line) cp.base.affect_strength(+PLAYER_BASE_STRENGTH_RECOVERY) - self.conditions = self.generate_conditions() + # We don't actually advance time or change the conditions between turn 0 and + # turn 1. + if self.turn > 1: + self.conditions = self.generate_conditions() def begin_turn_0(self) -> None: """Initialization for the first turn of the game.""" @@ -424,7 +427,12 @@ class Game: @property def current_turn_time_of_day(self) -> TimeOfDay: - return list(TimeOfDay)[self.turn % 4] + # We don't actually advance time between turn 0 and turn 1. Clamp the turn value + # to 1 so we get the same answer for 0 and 1. We clamp to 1 rather than 0 + # because historically we've started campaigns in day rather than in dawn. We + # can either start at 1, or we could re-order the enum. + tod_turn = max(1, self.turn) + return list(TimeOfDay)[tod_turn % 4] @property def current_day(self) -> date: