diff --git a/src/game/engine/src/modules/victory/victory_manager.gd b/src/game/engine/src/modules/victory/victory_manager.gd index a67c5208..223effb7 100644 --- a/src/game/engine/src/modules/victory/victory_manager.gd +++ b/src/game/engine/src/modules/victory/victory_manager.gd @@ -12,6 +12,13 @@ extends RefCounted const PlayerScript: GDScript = preload("res://engine/src/entities/player.gd") const UnitScript: GDScript = preload("res://engine/src/entities/unit.gd") +## Minimum turn before any victory check fires. Without this, the very first +## skirmish on turn 1 or 2 — when one side founds before the other or one +## founder dies to a scout rush — would declare premature victory. The grace +## period gives both players time to stand up an empire before the game can +## be decided. +const VICTORY_GRACE_TURNS: int = 10 + var _game_over: bool = false @@ -20,6 +27,8 @@ var _game_over: bool = false func check_all(_game_map: RefCounted) -> void: if _game_over: return + if GameState.turn_number < VICTORY_GRACE_TURNS: + return var winner_index: int = _check_domination() if winner_index >= 0: