]> granicus.if.org Git - nethack/commit
armor & busy hands
authornethack.rankin <nethack.rankin>
Mon, 5 Aug 2002 09:54:07 +0000 (09:54 +0000)
committernethack.rankin <nethack.rankin>
Mon, 5 Aug 2002 09:54:07 +0000 (09:54 +0000)
commit855ddbc5501cf3d1aacd6f1cf5d8e3bd9a099d92
tree5f51d97c3f3b3c076c3e16c3a119800766f5da6a
parent4bdcf771b26a2ba73c753880119d302c28eb77e2
armor & busy hands

     Fix some inconsistencies in armor handling.  The 'T' command
wouldn't let you take off a suit or shirt if you were wielding a
cursed two-handed weapon, which makes sense; however, the 'A'
command neglected to impose the same restriction.  Also, the 'W'
command had some code intended to prevent you from donning a suit
or shirt while wielding such a cursed weapon, but it didn't work.

     This patch fixes the 'A' command's checks for whether an
item can be removed and it makes the 'T' and 'R' commands use the
same code as 'A' instead of maintaining multiple sets of checks.
It also fixes the trivial 'W' problem and attempts to prevent the
sequence of 1) get interrupted while removing a set of equipment
including suit and/or shirt; 2) wield a cursed two-handed weapon
or have already wielded one become cursed; 3) resume removing
armor via 'A' but I haven't tried to trigger that situation to
confirm the bug or this fix.
doc/fixes34.1
src/do_wear.c
src/mkobj.c
src/wield.c