mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +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 {
|
fun isInvisible(to: Civilization): Boolean {
|
||||||
if (hasUnique(UniqueType.Invisible))
|
if (hasUnique(UniqueType.Invisible) && !to.isSpectator())
|
||||||
return true
|
return true
|
||||||
if (hasUnique(UniqueType.InvisibleToNonAdjacent))
|
if (hasUnique(UniqueType.InvisibleToNonAdjacent) && !to.isSpectator())
|
||||||
return getTile().getTilesInDistance(1).none {
|
return getTile().getTilesInDistance(1).none {
|
||||||
it.getUnits().any { unit -> unit.owner == to.civName }
|
it.getUnits().any { unit -> unit.owner == to.civName }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user