diff --git a/src/game/engine/tests/integration/test_happiness_turn.gd b/src/game/engine/tests/integration/test_happiness_turn.gd index e78bfffa..752328ab 100644 --- a/src/game/engine/tests/integration/test_happiness_turn.gd +++ b/src/game/engine/tests/integration/test_happiness_turn.gd @@ -40,6 +40,10 @@ func _make_player(growth_tier: String = "balanced") -> RefCounted: func _make_city(population: int, buildings: Array[String]) -> RefCounted: var city: RefCounted = CityScript.new("test_city_%d" % randi(), [] as Array[String]) + # owner drives _pi (the parallel-city-slot player row); without it _pi stays + # -1 and found()/set_population address an invalid row, so population never + # leaves the default 1 — which silently broke every happiness assertion. + city.owner = 0 city.found("Testhold", 5, 5, true, 1) city.set_population(population) for bld: String in buildings: