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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user