From: cohrs Date: Sun, 11 May 2003 03:18:02 +0000 (+0000) Subject: U455 - attacking disenchanter X-Git-Tag: MOVE2GIT~2002 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f1f8c0b91610da2f99336c7ab762a59b53eb56f;p=nethack U455 - attacking disenchanter 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. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index be3c90e55..049ef0fe0 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/uhitm.c b/src/uhitm.c index 1cff1de09..bb0454c86 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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])); }