mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Spectator can now see all invisible units including submarines without fog of war. (#9852)
This commit is contained in:
parent
283edd0875
commit
df7fd27b94
@ -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 }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user