yet another pass at 'A' bugs
I think this finally quashes the "cursed without otmp" issue. Various ways of destroying wielded weapon used setnotworn() rather than unwield(), so the previous change to have unwield() clear the pending W_WEP bit from takeoff.mask wasn't sufficient to prevent 'A' moving on from another item (blindfold--it's the only thing processed before primary weapon) to weapon which wasn't there any more. Also, if weapon was already set in takeoff.what to be processed on the next move, clearing W_WEP from takeoff.mask wasn't sufficient either. Move the previous unwield() 'fix' to setworn() and setnotworn() and extend it to include cancel_don() if the item being replaced or removed is in progress or scheduled for next. (Most of the time, remove_worn_item() has already done that before setworn() or setnotworn() is called.)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1496860756 2017/06/07 18:39:16 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.590 $ */
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1496959470 2017/06/08 22:04:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.591 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -436,6 +436,7 @@ E void FDECL(off_msg, (struct obj *));
|
||||
E void FDECL(set_wear, (struct obj *));
|
||||
E boolean FDECL(donning, (struct obj *));
|
||||
E boolean FDECL(doffing, (struct obj *));
|
||||
E void FDECL(cancel_doff, (struct obj *, long));
|
||||
E void NDECL(cancel_don);
|
||||
E int FDECL(stop_donning, (struct obj *));
|
||||
E int NDECL(Armor_off);
|
||||
|
||||
Reference in New Issue
Block a user