]> granicus.if.org Git - nethack/commitdiff
farmed pudding (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 17 Jul 2005 05:00:25 +0000 (05:00 +0000)
committernethack.rankin <nethack.rankin>
Sun, 17 Jul 2005 05:00:25 +0000 (05:00 +0000)
     I've gotten tired of seeing newsgroup claims along the lines of
"since devteam is aware of this and has chosen not to eliminate it, they
must endorse it", so weaken the tactic of "pudding farming".  It is still
possible to gain unlimited experience (past level 15 or so there's not
much point), but will be less effective for gaining items and for providing
sacrifice fodder.  Keep track of which monsters have been created via
cloning (mostly puddings; gremlins and blue jellies are affected too but
nobody's likely to care much about them) so that they can receive special
handling.  Make cloned monsters progressively less likely to leave corpses
as the number killed for a particular type goes up, and also much less
likely to drop random items at death.  This is sure to need some tuning
once hard core farmers point out how they can still abuse it.  For the
absurdly extreme case, see

http://scavenger.homeip.net/farmbot/HomePage

FYI, farmbot/PuddingFarmingHOWTO includes an impressive screen shot of a
dungeon level where rampant farming is taking place.

doc/fixes35.0
include/monst.h
include/patchlevel.h
src/makemon.c
src/mhitu.c
src/mon.c
src/worm.c

index f2a1c41b12b9cc52a9b80791f425d4ae79c8e488..41c949c295f24674a021910569d2d04877fe19b5 100644 (file)
@@ -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
index dcc9b21f0c2a366a389abe36b0bfad0ce057d8ca..b575d7e506fcbd0d7d59afc84d6b8f96704e17e6 100644 (file)
@@ -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 */
index af645b65e27320f503c7c0aa0c453f617e769624..28349708bad170ee4c7f1375071c2e2038297a3c 100644 (file)
@@ -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"
index 01471a241a85a579b9a82e5b8d773f47f9533a6b..23177d7e0826015096bdf32377f69983dd2122d2 100644 (file)
@@ -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
index 2409935d2dead0a1f8bccd07ffc0232029b00f1e..df1cc4fa1de89e53e90a23a40211f0ca7fe8f679 100644 (file)
@@ -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;
index fca5a0d0a905721694b87a9beb664dd62537c4ba..bcdc8be067c5c01718119fe54c0c0462794bcfc7 100644 (file)
--- 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);
index 7e05acb75fb4197a7059627bf4fa295eaad49114..d896165eece6377e4b1bf9783d657005d6c87a44 100644 (file)
@@ -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) ?