enlightenment/status feedback about wielded weapons (trunk only)

I noticed "you were wielding two weapons at once" in end of game
disclosure from a newsgroup ascension post for the Spork variant and
thought we ought to show that too.  Well we already do.  This moves it
from an attribute entry for magical enlightenment to a status entry for
^X display since it's something the hero and the player should already
always know.  In the process I added feedback for being weaponless and
then went further and added some feedback about what weapon is wielded.
This is stuff that could/would be shown on the status line if there were
room, and fits with the post-3.4.3 ^X expansion of cryptic status stuff.

     The "new ^X output" entry in the new features section of fixes35.0
covers this too.
This commit is contained in:
nethack.rankin
2011-02-11 02:25:59 +00:00
parent fa61c02151
commit 38cea51d15
2 changed files with 26 additions and 4 deletions

View File

@@ -1571,6 +1571,28 @@ int final;
/* last resort entry, guarantees Status section is non-empty */
you_are("unencumbered", "");
}
/* report being weaponless; distinguish whether gloves are worn */
if (!uwep) you_are(uarmg ? "empty handed" : /* gloves imply hands */
/* no weapon and no gloves */
humanoid(youmonst.data) ? "bare handed" :
/* alternate phrasing for paws or lack of hands */
"not wielding anything", "");
/* two-weaponing implies a weapon (not other odd stuff) in each hand */
else if (u.twoweap) you_are("wielding two weapons at once", "");
/* report most weapons by their skill class (so a katana will be
described as a long sword, for instance; mattock and hook are
exceptions), or wielded non-weapon item by its object class */
else {
const char *what = weapon_descr(uwep);
if (!strcmpi(what, "armor") || !strcmpi(what, "food") ||
!strcmpi(what, "venom"))
Sprintf(buf, "wielding some %s", what);
else
Sprintf(buf, "wielding %s",
(uwep->quan == 1L) ? an(what) : makeplural(what));
you_are(buf, "");
}
}
/* attributes: intrinsics and the like, other non-obvious capabilities */
@@ -1787,7 +1809,6 @@ int final;
if (Fixed_abil) you_have("fixed abilities",from_what(FIXED_ABIL));
if (Lifesaved)
enl_msg("Your life ", "will be", "would have been", " saved","");
if (u.twoweap) you_are("wielding two weapons at once","");
/*** Miscellany ***/
if (Luck) {