]> granicus.if.org Git - nethack/commitdiff
U455 - attacking disenchanter
authorcohrs <cohrs>
Sun, 11 May 2003 03:18:02 +0000 (03:18 +0000)
committercohrs <cohrs>
Sun, 11 May 2003 03:18:02 +0000 (03:18 +0000)
When polymorphed, only attacks involving hands/feet/weapons should result
in damage to object.  Theoretically, hug and butt attacks should affect
objects too, but no forms with such attacks currently allow wearing armor.

doc/fixes34.2
src/uhitm.c

index be3c90e55f0e28dc358f47f4a00b1673471710da..049ef0fe081fcca852b2a220e988e0f04864aeb7 100644 (file)
@@ -55,6 +55,8 @@ prevent several QBUFSZ sized buffers from overflowing and triggering fatal
 make sure that leashed monsters are released prior to shopkeeper inheriting
        dead character's inventory
 attaching long named candle to long named candelabrum caused buffer overflow
+when polymorhed, only hand/weapon attack on disenchanter should result in
+       damage to weapon, gloves, etc.
 
 
 Platform- and/or Interface-Specific Fixes
index 1cff1de097719af33b9ffa139c6ed096cff3b002..bb0454c862b1cc16792212526b5cab7fbe78bdf9 100644 (file)
@@ -2236,6 +2236,9 @@ uchar aatyp;
                if (aatyp == AT_KICK) {
                    obj = uarmf;
                    if (!obj) break;
+               } else if (aatyp == AT_BITE || aatyp == AT_BUTT ||
+                          (aatyp >= AT_STNG && aatyp < AT_WEAP)) {
+                   break;              /* no object involved */
                }
                passive_obj(mon, obj, &(ptr->mattk[i]));
            }