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.
This commit is contained in:
Alex Smith
2016-10-17 18:15:57 +01:00
parent 5c12362a98
commit ee5b488514
17 changed files with 55 additions and 45 deletions

View File

@@ -433,7 +433,7 @@ int expltype;
monkilled(mtmp, "", (int) adtyp);
} else if (!context.mon_moving) {
/* all affected monsters, even if mdef is set */
setmangry(mtmp);
setmangry(mtmp, TRUE);
}
}