From df7fd27b9470cc3eb8cf3aefe15d1341b8162e8f Mon Sep 17 00:00:00 2001 From: Oskar Niesen Date: Sun, 30 Jul 2023 09:37:36 -0500 Subject: [PATCH] Spectator can now see all invisible units including submarines without fog of war. (#9852) --- core/src/com/unciv/logic/map/mapunit/MapUnit.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt index 68cbba2fe0..f7b9e36bbf 100644 --- a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt +++ b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt @@ -383,9 +383,9 @@ class MapUnit : IsPartOfGameInfoSerialization { } fun isInvisible(to: Civilization): Boolean { - if (hasUnique(UniqueType.Invisible)) + if (hasUnique(UniqueType.Invisible) && !to.isSpectator()) return true - if (hasUnique(UniqueType.InvisibleToNonAdjacent)) + if (hasUnique(UniqueType.InvisibleToNonAdjacent) && !to.isSpectator()) return getTile().getTilesInDistance(1).none { it.getUnits().any { unit -> unit.owner == to.civName } }