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

@@ -163,7 +163,8 @@ struct monst {
Bitfield(mspotted, 1); /* mon is currently seen by hero */ Bitfield(mspotted, 1); /* mon is currently seen by hero */
Bitfield(mwandexp, 1); /* mon has experience with wands */ Bitfield(mwandexp, 1); /* mon has experience with wands */
/* 6 spare bits */ Bitfield(mgenmklev, 1); /* made by the level generation */
/* 5 spare bits */
unsigned long mstrategy; /* for monsters with mflag3: current strategy */ unsigned long mstrategy; /* for monsters with mflag3: current strategy */
#ifdef NHSTDC #ifdef NHSTDC

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones * Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files. * and save files.
*/ */
#define EDITLEVEL 134 #define EDITLEVEL 135
/* /*
* Development status possibilities. * Development status possibilities.

View File

@@ -1295,6 +1295,7 @@ makemon(
place_monster(mtmp, x, y); place_monster(mtmp, x, y);
mtmp->mcansee = mtmp->mcanmove = TRUE; mtmp->mcansee = mtmp->mcanmove = TRUE;
mtmp->mgenmklev = gi.in_mklev;
mtmp->seen_resistance = M_SEEN_NOTHING; mtmp->seen_resistance = M_SEEN_NOTHING;
mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr); mtmp->mpeaceful = (mmflags & MM_ANGRY) ? FALSE : peace_minded(ptr);
if ((mmflags & MM_MINVIS) != 0) /* for ^G */ 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 them waking up early (e.g. because a zombie decided to attack the
Wizard of Yendor). */ Wizard of Yendor). */
if (zombie_maker(magr) && zombie_form(mdef->data) != NON_PM) { if (zombie_maker(magr) && zombie_form(mdef->data) != NON_PM) {
if (magr->mgenmklev && mdef->mgenmklev)
return 0L;
if (!Is_stronghold(&u.uz) if (!Is_stronghold(&u.uz)
&& !unique_corpstat(magr->data) && !unique_corpstat(mdef->data)) && !unique_corpstat(magr->data) && !unique_corpstat(mdef->data))
return (ALLOW_M | ALLOW_TM); return (ALLOW_M | ALLOW_TM);