Spy randomness is different for different spies in same city

This commit is contained in:
yairm210 2025-01-28 14:40:17 +02:00
parent e8d40de61a
commit b2f890599d

View File

@ -419,5 +419,5 @@ class Spy private constructor() : IsPartOfGameInfoSerialization {
/** Anti-save-scum: Deterministic random from city and turn
* @throws NullPointerException for spies in the hideout */
private fun randomSeed() = (getCity().run { location.x * location.y } + 123f * civInfo.gameInfo.turns).toInt()
private fun randomSeed() = (getCity().run { location.x * location.y } + 123f * civInfo.gameInfo.turns).toInt() + name.hashCode()
}