Unseen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xgp
    Rookie
    • Apr 2020
    • 22

    Unseen

    I have a question regarding checking whether the player is seen. This is an excerpt of the source code:

    Code:
    (Sil)
           // check if player is unseen
            if ((r_ptr->light > 0) && strchr("@G", r_ptr->d_char) && (cave_light[p_ptr->py][p_ptr->px] <= 0)) unseen = TRUE;
    
    (Sil-Q)
            // check if player is unseen
            if ((r_ptr->light > 0) && strchr("@G", r_ptr->d_char)
                && (cave_light[p_ptr->py][p_ptr->px] <= 0))
                unseen = TRUE;
    ​
    It seems to mean that a light-bearing @ or G cannot see the player staying in the darkness, which is somewhat unusual as the reverse appears to make more sense. Do I miss something?
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9630

    #2
    I think that's right - the monster carrying the light has their eyes adjusted to the light, and so can't see the player in the dark.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎