Another fix for #K4317 - monster grudge

Undead monsters created by the level creation routine do not grudge
other (zombifiable) monsters created during the level creation.

This of course doesn't prevent the grudge happening with monsters
created during gameplay.

Invalidates saves and bones.
This commit is contained in:
Pasi Kallinen
2026-04-01 19:24:40 +03:00
parent d911e4c4d3
commit 542d1db5f4
4 changed files with 6 additions and 2 deletions

View File

@@ -1295,6 +1295,7 @@ makemon(
place_monster(mtmp, x, y);
mtmp->mcansee = mtmp->mcanmove = TRUE;
mtmp->mgenmklev = gi.in_mklev;
mtmp->seen_resistance = M_SEEN_NOTHING;
mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr);
if ((mmflags & MM_MINVIS) != 0) /* for ^G */

View File

@@ -2391,6 +2391,8 @@ mm_2way_aggression(struct monst *magr, struct monst *mdef)
them waking up early (e.g. because a zombie decided to attack the
Wizard of Yendor). */
if (zombie_maker(magr) && zombie_form(mdef->data) != NON_PM) {
if (magr->mgenmklev && mdef->mgenmklev)
return 0L;
if (!Is_stronghold(&u.uz)
&& !unique_corpstat(magr->data) && !unique_corpstat(mdef->data))
return (ALLOW_M | ALLOW_TM);