Skip to content

Commit

Permalink
Fix shuffle calling
Browse files Browse the repository at this point in the history
  • Loading branch information
VDuchauffour committed Apr 30, 2024
1 parent 34f7c08 commit 73fe5cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/Python/components/Plague.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73fe5cc

Please sign in to comment.