Twilight Glasses

The ultimate in adventuring eyewear, these glasses let you see through walls.

Skills Granted
distanceTo : Returns the distance in meters to the  unit from the center of the hero.

findByType : Return an array of all the units with the given  that the hero can see, even non-combatants. Optional: pass a second argument as an array of units to filter by type.

findEnemies : Returns an array of all living enemies within eyesight ( m and line-of-sight).

findEnemyMissiles : Returns an array of all enemy missiles (example types: 'arrow', 'shell', 'beam', 'spear', 'energy-ball'). Limited to missiles within eyesight ( m and line-of-sight).

findFriendlyMissiles : Returns an array of all friendly missiles (example types: 'arrow', 'shell', 'beam', 'spear', 'energy-ball'). Limited to missiles within eyesight ( m and line-of-sight).

findFriends : Returns an array of all living friends within eyesight ( m).

findHazards : Returns the hazards (traps, pits, etc.) in the level.

findItems : Returns an array of all items (example types 'coin', 'gem', 'health-potion') within eyesight ( m and line-of-sight).

findNearest : Returns the closest unit out of an array of units, or null if the array is empty.

findNearestEnemy : Returns the closest living enemy within eyesight ( m and line-of-sight), or null if there aren't any.

findNearestItem : Returns the closest item within eyesight ( m and line-of-sight), or  if there aren't any.

isPathClear : Returns whether there are any obstacles (walls, cliffs, etc.) or hazards (traps, pits, etc.) in the straight line between  and   positions.