Visibility - caraminden/anathema-roguelike GitHub Wiki

A character's Visibility represents how well Vision can be used to Detect that character.

A character's Visibility is dependent on the following factors

C = The character's Concealment M = The Motion they generated since their last turn L = The Light level of the Location where the character is standing

Visibility = (25 + (L * 0.20)^1.75) - C + M

Visibility Visibility Level
< 25 Imperceptible
26-50 Concealed
51-75 Partially Concealed
76-100 Visible
101+ Exposed

Perceived Visibility

Once a level of Visibility has been determined it is then modified for each enemy attempting to Detect the character.

If a character is Obscured from an enemy, that enemy perceives the character to have one level lower of Visibility.

If a character has Low Light Vision it perceives any enemies in Locations with less than 50% Light as if they had one level higher of Visibility.

If a character is adjacent to an enemy it perceives that enemy as Visible regardless of its Visibility level

If a character is within a distance of 2 from an enemy it perceives that enemy as Visible if its Visibility level is above Concealed

Examples:

A character with 50 Concealment is standing somewhere with a relatively low Light level of 25%, and they Walked on their last turn causing 25 Motion. This character's Visibility is 11.7 (25 + (25 * 0.20)^1.75) - 50 + 25, so they are considered Imperceptible.

A character with 75 Concealment is standing somewhere with a fairly high Light level of 75%, and last turn they Moved into this Location causing 25 Motion, but they are inside a Bush causing them to appear as Obscured in all directions. This character's Visibility is 84.3 (25 + (75 * 0.20)^1.75) - 75 + 25, so they are would be considered Visible, but due to being Obscured by the Bush, they are perceived as Partially Concealed.

A character with 50 Concealment is standing somewhere with a Light level of 60%, and last turn they Attacked an enemy generating 50 Motion. This character's Visibility is 97.3 (25 + (60 * 0.20)^1.75) - 50 + 50, so they are considered Visible, but if they had Waited instead of Attacking, they would have been Concealed.

⚠️ **GitHub.com Fallback** ⚠️