From ce1f4788cdbccaba1533bec1e478c0cc9bd550cf Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 8 Apr 2023 18:22:14 +0300 Subject: [PATCH] Angering monsters hit by items from exploding bag of holding --- src/mthrowu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mthrowu.c b/src/mthrowu.c index 695503445..010e345b0 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -313,7 +313,9 @@ monshoot(struct monst* mtmp, struct obj* otmp, struct obj* mwep) } /* an object launched by someone/thing other than player attacks a monster; - return 1 if the object has stopped moving (hit or its range used up) */ + return 1 if the object has stopped moving (hit or its range used up) + can anger the monster, if this happened due to hero (eg. exploding + bag of holding throwing the items) */ int ohitmon( struct monst *mtmp, /* accidental target, located at */ @@ -485,6 +487,9 @@ ohitmon( mtmp->mblinded = tmp; } + if (!DEADMONSTER(mtmp) && !gc.context.mon_moving) + setmangry(mtmp, TRUE); + objgone = drop_throw(otmp, 1, gb.bhitpos.x, gb.bhitpos.y); if (!objgone && range == -1) { /* special case */ obj_extract_self(otmp); /* free it for motion again */