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.
78 KiB
78 KiB