From 73fe5cc50fdd6600f6f28f57723002750f7d0eeb Mon Sep 17 00:00:00 2001 From: Vincent Duchauffour Date: Tue, 30 Apr 2024 16:38:24 +0200 Subject: [PATCH] Fix shuffle calling --- Assets/Python/components/Plague.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Python/components/Plague.py b/Assets/Python/components/Plague.py index 5f2327474..892e2c086 100644 --- a/Assets/Python/components/Plague.py +++ b/Assets/Python/components/Plague.py @@ -561,13 +561,14 @@ def processPlague(self, iPlayer): else: iMaxNumInfections = 1 iInfections = 0 - for city in ( + _cities = ( cities() .owner(iPlayer) .filter(lambda c: not c.hasBuilding(PlagueType.PLAGUE.value)) - .shuffle() .entities() - ): + ) + random.shuffle(_cities) + for city in _cities: if percentage_chance(20, strict=True): self.infectCity(city) iInfections += 1