diff --git a/doc/fixes35.0 b/doc/fixes35.0 index f2a1c41b1..41c949c29 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -135,6 +135,7 @@ plname is stored in the save file on all platforms now 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 diff --git a/include/monst.h b/include/monst.h index dcc9b21f0..b575d7e50 100644 --- a/include/monst.h +++ b/include/monst.h @@ -1,4 +1,4 @@ -/* 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. */ @@ -76,13 +76,14 @@ struct monst { * 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 */ diff --git a/include/patchlevel.h b/include/patchlevel.h index af645b65e..28349708b 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* 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. */ @@ -13,7 +13,7 @@ * 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" diff --git a/src/makemon.c b/src/makemon.c index 01471a241..23177d7e0 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,4 @@ -/* 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. */ @@ -692,6 +692,7 @@ xchar x, y; /* clone's preferred location or 0 (near mon) */ 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 diff --git a/src/mhitu.c b/src/mhitu.c index 2409935d2..df1cc4fa1 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* 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. */ @@ -2605,6 +2605,7 @@ cloneu() 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; diff --git a/src/mon.c b/src/mon.c index fca5a0d0a..bcdc8be06 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* 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. */ @@ -1614,13 +1614,12 @@ boolean was_swallowed; /* digestion */ 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 */ @@ -1892,11 +1891,11 @@ xkilled(mtmp, dest) 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); diff --git a/src/worm.c b/src/worm.c index 7e05acb75..d896165ee 100644 --- a/src/worm.c +++ b/src/worm.c @@ -1,4 +1,4 @@ -/* 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. */ @@ -380,6 +380,7 @@ cutworm(worm, x, y, weap) 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) ?