pyrolisk feedback

From a report 9 years ago, a pet pyrolisk was repeatedly gazing at a
grey-elf and nothing happened.  It turned out that the elf was wearing
an elven cloak which was negating damage some of the time (most of the
time back then) but with no indication that that's what was happening.

This makes many types of damage that are negated by MC say so.
Probably other types of damage should do likewise.
This commit is contained in:
PatR
2023-02-17 14:40:26 -08:00
parent d1fda1773a
commit 5fd6c02170
3 changed files with 95 additions and 54 deletions

View File

@@ -967,7 +967,8 @@ mdamagem(struct monst *magr, struct monst *mdef,
if (!mhm.damage)
return mhm.hitflags;
if ((mdef->mhp -= mhm.damage) < 1) {
mdef->mhp -= mhm.damage;
if (mdef->mhp < 1) {
if (m_at(mdef->mx, mdef->my) == magr) { /* see gulpmm() */
remove_monster(mdef->mx, mdef->my);
mdef->mhp = 1; /* otherwise place_monster will complain */