Differentiate between monster anger from attacks and from other causes
authorAlex Smith <ais523@nethack4.org>
Mon, 17 Oct 2016 17:15:57 +0000 (18:15 +0100)
committerAlex Smith <ais523@nethack4.org>
Mon, 17 Oct 2016 17:19:22 +0000 (18:19 +0100)
commitee5b4885148d08d390b075a2a11cd4fe8cdcb131
treeb7cffe726668784d3e9263dee79775e715166518
parent5c12362a98f458d75a372dc7bc658598b8dca76b
Differentiate between monster anger from attacks and from other causes

setmangry() and wakeup() were being used for multiple purposes. Add an
extra parameter to track which. This fixes several minor bugs (e.g.
whether monsters with no eyes were angered by (useless) gaze attacks
against them previously depended on the state of a UI option, and
the Minetown guards would be annoyed if you used a cursed scroll of
tame monster on a shopkeeper). It's also a prerequisite for the
Elbereth changes I'm working on.
17 files changed:
include/extern.h
src/apply.c
src/dig.c
src/dokick.c
src/dothrow.c
src/explode.c
src/mon.c
src/music.c
src/polyself.c
src/potion.c
src/priest.c
src/read.c
src/region.c
src/trap.c
src/uhitm.c
src/vault.c
src/zap.c