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.)
102 KiB
102 KiB