cancelled nurses shouldn't say "Relax, this won't hurt a bit"
check for hero location in digactualhole() before clearing u.utrap
clear any pits that the hero digs in the vault guard's temporary corridor
+shattering a monster's weapon didn't work as intended for stack of N>1
Platform- and/or Interface-Specific Fixes
E boolean FDECL(linedup, (XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P));
E boolean FDECL(lined_up, (struct monst *));
E struct obj *FDECL(m_carrying, (struct monst *,int));
+E void FDECL(m_useupall, (struct monst *,struct obj *));
E void FDECL(m_useup, (struct monst *,struct obj *));
E void FDECL(m_throw, (struct monst *,int,int,int,int,int,struct obj *));
E boolean FDECL(hits_bars, (struct obj **,int,int,int,int));
-/* SCCS Id: @(#)mthrowu.c 3.5 2005/06/21 */
+/* SCCS Id: @(#)mthrowu.c 3.5 2006/03/29 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
}
-/* Remove an item from the monster's inventory and destroy it. */
+/* remove an entire item from a monster's inventory; destroy that item */
+void
+m_useupall(mon, obj)
+struct monst *mon;
+struct obj *obj;
+{
+ obj_extract_self(obj);
+ possibly_unwield(mon, FALSE);
+ if (obj->owornmask) {
+ mon->misc_worn_check &= ~obj->owornmask;
+ update_mon_intrinsics(mon, obj, FALSE, FALSE);
+ }
+ obfree(obj, (struct obj*) 0);
+}
+
+/* remove one instance of an item from a monster's inventory */
void
m_useup(mon, obj)
struct monst *mon;
struct obj *obj;
{
if (obj->quan > 1L) {
- obj->quan--;
- obj->owt = weight(obj);
+ obj->quan--;
+ obj->owt = weight(obj);
} else {
- obj_extract_self(obj);
- possibly_unwield(mon, FALSE);
- if (obj->owornmask) {
- mon->misc_worn_check &= ~obj->owornmask;
- update_mon_intrinsics(mon, obj, FALSE, FALSE);
- }
- obfree(obj, (struct obj*) 0);
+ m_useupall(mon, obj);
}
}
-/* SCCS Id: @(#)uhitm.c 3.5 2005/11/30 */
+/* SCCS Id: @(#)uhitm.c 3.5 2006/03/29 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
mon->weapon_check = NEED_WEAPON;
pline("%s from the force of your blow!",
Yobjnam2(monwep, "shatter"));
- m_useup(mon, monwep);
+ m_useupall(mon, monwep);
/* If someone just shattered MY weapon, I'd flee! */
if (rn2(4)) {
monflee(mon, d(2,3), TRUE, TRUE);