]> granicus.if.org Git - nethack/commit
"your" artifacts
authorcohrs <cohrs>
Thu, 18 Sep 2003 02:52:40 +0000 (02:52 +0000)
committercohrs <cohrs>
Thu, 18 Sep 2003 02:52:40 +0000 (02:52 +0000)
commit5e443536d851b008752699fcdc635a5f9dedc74b
tree5a6536368fce8ca689f2736559e62b84874dad10
parent9402d6dc54cd8f128bc28d6d67dd8c4798bd0ad6
"your" artifacts
This patch introduces a change to yname() and Yname2() that avoids the
possessive "your" for the hero's normal, fully identified artifacts.
Quest artifacts still get the possessive, as do all other objects and all
objects not in the hero's possession.  shk_your()/Shk_Your() are used in
many places with a specific, generalized name for the object, so I didn't
introduce the artifact behavior there, although I did change them to append
a space, which simplified some other code.  Through added use of yname(),
there may be some places that used to just say "corpse" that will now be more
descriptive via yname()'s use of cxname().  I'm sure <Someone> will point
out any such places that are too onerous, although nothing obviously is.

I took the opportunity to inspect many uses of "your" and even Your().  Two
new functions are also introduced, yobjnam() and Yobjnam2(), which work
like aobjnam() and yname() combined, because I found that many uses of
aobjnam() were preceeded by "your" and I couldn't generally provide the
desired behavior for artifacts (or future artifacts) without a combined
function.  In some cases, this change allowed better sharing of code.

rust_dmg() still takes a string as input which is sometimes initialized
from xname() and often prepends "your" to it.  Currently, this isn't a
problem since there currently are no normal, armor artifacts.  If/when any
are introduced, rust_dmg() will need to be addressed.

The patch is for the trunk only.  A lot of research was required and I
didn't feel the upside was there for repeating it in the 3.4.3 branch.
28 files changed:
include/extern.h
src/apply.c
src/ball.c
src/dig.c
src/do.c
src/dothrow.c
src/eat.c
src/engrave.c
src/lock.c
src/mhitm.c
src/mhitu.c
src/mon.c
src/muse.c
src/objnam.c
src/pickup.c
src/polyself.c
src/potion.c
src/pray.c
src/read.c
src/shk.c
src/sit.c
src/steal.c
src/timeout.c
src/trap.c
src/uhitm.c
src/weapon.c
src/wield.c
src/zap.c