introduce support for negation of role, race, align, gender values to eliminate
them from random selection and the pick list of startup choices
some intelligent pets will avoid cannibalism
+keep track of which monsters were cloned from other monsters
Platform- and/or Interface-Specific New Features
-/* SCCS Id: @(#)monst.h 3.5 2004/06/12 */
+/* SCCS Id: @(#)monst.h 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
* but not mimic (that is, snake, spider,
* trapper, piercer, eel)
*/
+ Bitfield(mcansee,1); /* cansee 1, temp.blinded 0, blind 0 */
Bitfield(mspeed,2); /* current speed */
Bitfield(permspeed,2); /* intrinsic mspeed value */
Bitfield(mrevived,1); /* has been revived from the dead */
+ Bitfield(mcloned,1); /* has been cloned from another */
Bitfield(mavenge,1); /* did something to deserve retaliation */
Bitfield(mflee,1); /* fleeing */
- Bitfield(mcansee,1); /* cansee 1, temp.blinded 0, blind 0 */
Bitfield(mfleetim,7); /* timeout for mflee */
Bitfield(msleeping,1); /* asleep until woken */
-/* SCCS Id: @(#)patchlevel.h 3.5 2005/03/12 */
+/* SCCS Id: @(#)patchlevel.h 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
-#define EDITLEVEL 21
+#define EDITLEVEL 22
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2005"
-/* SCCS Id: @(#)makemon.c 3.5 2005/06/13 */
+/* SCCS Id: @(#)makemon.c 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
m2->mx = mm.x;
m2->my = mm.y;
+ m2->mcloned = 1;
m2->minvent = (struct obj *) 0; /* objects don't clone */
m2->mleashed = FALSE;
#ifndef GOLDOBJ
-/* SCCS Id: @(#)mhitu.c 3.5 2005/06/21 */
+/* SCCS Id: @(#)mhitu.c 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (u.mh <= 1) return(struct monst *)0;
if (mvitals[mndx].mvflags & G_EXTINCT) return(struct monst *)0;
mon = makemon(youmonst.data, u.ux, u.uy, NO_MINVENT|MM_EDOG);
+ mon->mcloned = 1;
mon = christen_monst(mon, plname);
initedog(mon);
mon->m_lev = youmonst.data->mlevel;
-/* SCCS Id: @(#)mon.c 3.5 2005/06/22 */
+/* SCCS Id: @(#)mon.c 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (LEVEL_SPECIFIC_NOCORPSE(mdat))
return FALSE;
- if (bigmonst(mdat) || mdat == &mons[PM_LIZARD]
- || is_golem(mdat)
- || is_mplayer(mdat)
- || is_rider(mdat))
+ if (((bigmonst(mdat) || mdat == &mons[PM_LIZARD]) && !mon->mcloned) ||
+ is_golem(mdat) || is_mplayer(mdat) || is_rider(mdat))
return TRUE;
- return (boolean) (!rn2((int)
- (2 + ((int)(mdat->geno & G_FREQ)<2) + verysmall(mdat))));
+ tmp = 2 + ((mdat->geno & G_FREQ) < 2) + verysmall(mdat);
+ if (mon->mcloned) tmp += mvitals[monsndx(mdat)].died / 25;
+ return (boolean) !rn2(tmp);
}
/* drop (perhaps) a cadaver and remove monster */
if(wasinside) spoteffects(TRUE);
} else if(x != u.ux || y != u.uy) {
/* might be here after swallowed */
- if (!rn2(6) && !(mvitals[mndx].mvflags & G_NOCORPSE)
+ if (!rn2(6) && !(mvitals[mndx].mvflags & G_NOCORPSE) &&
#ifdef KOPS
- && mdat->mlet != S_KOP
+ mdat->mlet != S_KOP &&
#endif
- ) {
+ (!mtmp->mcloned || !rn2(mvitals[mndx].died / 5 + 1))) {
int typ;
otmp = mkobj_at(RANDOM_CLASS, x, y, TRUE);
-/* SCCS Id: @(#)worm.c 3.5 1995/01/28 */
+/* SCCS Id: @(#)worm.c 3.5 2005/07/13 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
remove_monster(x, y); /* clone_mon puts new head here */
new_worm = clone_mon(worm, x, y);
new_worm->wormno = new_wnum; /* affix new worm number */
+ new_worm->mcloned = 0; /* treat second worm as a normal monster */
/* Devalue the monster level of both halves of the worm. */
worm->m_lev = ((unsigned)worm->m_lev <= 3) ?