From 72dbd302c072864cc49df371d9f233323f4c2989 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 25 Jul 2002 23:34:47 +0000 Subject: [PATCH] do_look at self Suggested by : when examining an `@' monster, only include "or you" in the description if you might reasonably expect to be seen as something else. So if you're playing as a human or an elf, or if you're polymorphed regardless of race, the ordinary description of "human or elf" doesn't need to add "or you". And the setting of the `showrace' option only matters if the `@' comes from prompting the user instead of picking a symbol from the map. --- src/pager.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pager.c b/src/pager.c index 9d1f6b8a2..c730d70d4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)pager.c 3.4 2002/01/17 */ +/* SCCS Id: @(#)pager.c 3.4 2002/07/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -545,11 +545,14 @@ do_look(quick) } } } - /* handle '@' as a special case; firstmatch is guaranteed - to already be set in that case */ - if (!from_screen ? (sym == def_monsyms[S_HUMAN]) : - (cc.x == u.ux && cc.y == u.uy && sym == monsyms[S_HUMAN])) - found += append_str(out_str, "you"); /* tack on "or you" */ + /* handle '@' as a special case if it refers to you and you're + playing a character which isn't normally displayed by that + symbol; firstmatch is assumed to already be set for '@' */ + if ((from_screen ? + (sym == monsyms[S_HUMAN] && cc.x == u.ux && cc.y == u.uy) : + (sym == def_monsyms[S_HUMAN] && !iflags.showrace)) && + !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd) + found += append_str(out_str, "you"); /* tack on "or you" */ /* * Special case: if identifying from the screen, and we're swallowed,