@@ -230,19 +230,13 @@ struct monst *mtmp;
230
230
/* Return TRUE if this monster is capable of converting other monsters into
231
231
* zombies. */
232
232
boolean
233
- zombie_maker (pm )
234
- struct permonst * pm ;
233
+ zombie_maker (mon )
234
+ struct monst * mon ;
235
235
{
236
- switch (pm -> mlet ) {
237
- case S_ZOMBIE :
238
- /* Z-class monsters that aren't actually zombies go here */
239
- return is_zombie (pm );
240
- }
241
-
242
- if (!Upolyd && Race_if (PM_DRAUGR ))
243
- return TRUE;
244
-
245
- return FALSE;
236
+ /* NB: right now, this is literally just a wrapper around racial_zombie,
237
+ * but maybe in the future there will be more complicated rules or
238
+ * exceptions about when zombies will be created -- esp. by the hero */
239
+ return racial_zombie (mon );
246
240
}
247
241
248
242
/* From xNetHack: return the monster index of the zombie monster which this monster could be
@@ -761,12 +755,12 @@ unsigned corpseflags;
761
755
return (struct obj * ) 0 ;
762
756
} else {
763
757
corpstatflags |= CORPSTAT_INIT ;
764
- if racial_zombie (mtmp )
758
+ if ( racial_zombie (mtmp ) )
765
759
corpstatflags |= CORPSTAT_ZOMBIE ;
766
760
/* preserve the unique traits of some creatures */
767
761
obj = mkcorpstat (CORPSE , KEEPTRAITS (mtmp ) ? mtmp : 0 ,
768
762
mdat , x , y , corpstatflags );
769
- if racial_zombie (mtmp )
763
+ if ( racial_zombie (mtmp ) )
770
764
obj -> age -= 100 ;
771
765
if (burythem ) {
772
766
boolean dealloc ;
@@ -4001,9 +3995,9 @@ int how;
4001
3995
disintegested = (how == AD_DGST || how == - AD_RBRE
4002
3996
|| how == AD_WTHR || how == AD_DISN );
4003
3997
if (disintegested )
4004
- xkilled (mdef , XKILL_NOCORPSE );
3998
+ xkilled (mdef , XKILL_NOMSG | XKILL_NOCORPSE | XKILL_INDIRECT );
4005
3999
else
4006
- xkilled (mdef , XKILL_NOMSG );
4000
+ xkilled (mdef , XKILL_NOMSG | XKILL_INDIRECT );
4007
4001
4008
4002
if (be_sad && DEADMONSTER (mdef ))
4009
4003
You ("have a sad feeling for a moment, then it passes." );
@@ -4051,7 +4045,9 @@ struct monst *mtmp;
4051
4045
void
4052
4046
xkilled (mtmp , xkill_flags )
4053
4047
struct monst * mtmp ;
4054
- int xkill_flags ; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
4048
+ int xkill_flags ; /* XKILL_GIVEMSG, XKILL_NOMSG, XKILL_NOCORPSE,
4049
+ * XKILL_NOCONDUCT (maintain pacificst),
4050
+ * or XKILL_INDIRECT (mtmp killed by summoned sphere) */
4055
4051
{
4056
4052
int tmp , mndx , x = mtmp -> mx , y = mtmp -> my ;
4057
4053
struct monst museum = zeromonst ;
@@ -4062,7 +4058,8 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
4062
4058
burycorpse = FALSE,
4063
4059
nomsg = (xkill_flags & XKILL_NOMSG ) != 0 ,
4064
4060
nocorpse = (xkill_flags & XKILL_NOCORPSE ) != 0 ,
4065
- noconduct = (xkill_flags & XKILL_NOCONDUCT ) != 0 ;
4061
+ noconduct = (xkill_flags & XKILL_NOCONDUCT ) != 0 ,
4062
+ indirect = (xkill_flags & XKILL_INDIRECT ) != 0 ;
4066
4063
4067
4064
mtmp -> mhp = 0 ; /* caller will usually have already done this */
4068
4065
if (!noconduct ) /* KMH, conduct */
@@ -4179,9 +4176,16 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
4179
4176
}
4180
4177
/* corpse--none if hero was inside the monster */
4181
4178
if (!wasinside && corpse_chance (mtmp , (struct monst * ) 0 , FALSE)) {
4182
- zombify = (!thrownobj && !stoned && !uwep
4183
- && zombie_maker (youmonst .data )
4184
- && zombie_form (r_data (mtmp )) != NON_PM );
4179
+ /* for kills by monsters credited to the hero (e.g. summoned
4180
+ * exploding spheres), zombify will have been set already in
4181
+ * mhitm.c where the information about the particular attacking
4182
+ * monster, etc, was available; for actual kills by the hero we
4183
+ * can figure it out here */
4184
+ if (!indirect ) {
4185
+ zombify = (!thrownobj && !stoned && !uwep
4186
+ && zombie_maker (& youmonst )
4187
+ && zombie_form (r_data (mtmp )) != NON_PM );
4188
+ }
4185
4189
cadaver = make_corpse (mtmp , burycorpse ? CORPSTAT_BURIED
4186
4190
: CORPSTAT_NONE );
4187
4191
zombify = FALSE; /* reset */
0 commit comments