fix #H6422 - hmonas against shades
I did much of this quite some time ago, as prequisite for a different bug report about monsters vs shades, then set it aside. It ended up being more complicated than I anticipated. When deciding whether various non-weapon attacks might hit a shade, hmonas() was not checking for blessed or silver armor that should have been applicable. It did check boots when kicking, but not gloves or rings (when no gloves) when touching, or outermost of cloak/suit/shirt when hugging, or helmet when head-butting. (The last one is actually moot because nothing with a head-butt attack is able to wear a helm.) The problem was more general than just whether attacks might hit and hurt shades. Various undead and/or demons are also affected by blessed and/or silver attack but weren't for non-weapon attacks by poly'd hero. At least two unrelated bugs are fixed: a rope golem's AT_HUGS attack gives feedback about choking but was fully effective against monsters which fail the can_be_strangled() test. And it was possible to hug a long worm's tail, rendering the entire worm immobile. The report also suggested that all artifacts be able to hit shades for full effect, but by the time shades are encountered everyone has an artifact so that would nullify a shade's most interesting ability. TODO: monster against hero and monster against other monster need to have similar changes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mondata.h $NHDT-Date: 1547086248 2019/01/10 02:10:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */
|
||||
/* NetHack 3.6 mondata.h $NHDT-Date: 1548209737 2019/01/23 02:15:37 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.36 $ */
|
||||
/* Copyright (c) 1989 Mike Threepoint */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#define slithy(ptr) (((ptr)->mflags1 & M1_SLITHY) != 0L)
|
||||
#define is_wooden(ptr) ((ptr) == &mons[PM_WOOD_GOLEM])
|
||||
#define thick_skinned(ptr) (((ptr)->mflags1 & M1_THICK_HIDE) != 0L)
|
||||
#define hug_throttles(ptr) ((ptr) == &mons[PM_ROPE_GOLEM])
|
||||
#define slimeproof(ptr) \
|
||||
((ptr) == &mons[PM_GREEN_SLIME] || flaming(ptr) || noncorporeal(ptr))
|
||||
#define lays_eggs(ptr) (((ptr)->mflags1 & M1_OVIPAROUS) != 0L)
|
||||
|
||||
Reference in New Issue
Block a user