]> granicus.if.org Git - nethack/commitdiff
crop rotation (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 8 Jul 2007 23:51:17 +0000 (23:51 +0000)
committernethack.rankin <nethack.rankin>
Sun, 8 Jul 2007 23:51:17 +0000 (23:51 +0000)
     More tuning to throttle pudding farming (plus endgame Rider farming).
Earlier changes made cloned black puddings less likely to leave corpses,
to cut down on sacrifice fodder a bit, and cloned anything less likely to
drop random items when killed; this one makes killing cloned or revived
monsters be worth less experience as the number killed goes up, to cut
down on final score inflation.  [With several boulders and magic missile
or a polearm, it's possible to kill any of the Riders repeatedly with
virtually no risk of even getting hit, much less of getting killed.  Now
if you kill Pestilence 240 times it will be worth 62720 points instead of
297840 (not including doubling bonus for ascension), with an additional
19 points per kill instead of 1241 after that, requiring a couple orders
more magnitude of abuse--excuse me, superhuman "patience"--to get the
score to reach the overflow threshold.]

     While testing this, I got "The Famine's corpse glows iridescently."
This fixes that too.  Also, previously unused kill count for experience()
had an off by one error; was including ``+ 1'' even though mvitals[].died
has already been incremented by the time that that code uses it.

doc/fixes35.0
src/exper.c
src/hack.c
src/mon.c
src/wizard.c
src/zap.c

index 217b62c6d30d596dbfc3b8687e6f774f948b2282..b1fa18e7b713ac3740616c3893c0b93eb0d37095 100644 (file)
@@ -315,6 +315,7 @@ 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
+cloned and revived monsters become worth fewer points than ordinary ones
 number_pad:3 run-time option to use inverted phone keypad layout for movement
 number_pad:-1 to swap function of y and z keys; z to move NW, y to zap wands
 display spell retention information in the spell menu
index 523a72e370952707479a49603b0b5d0a2a3b80e7..7ed11300d6bc5611b761e37795eda2cf8c6f5e9e 100644 (file)
@@ -66,9 +66,6 @@ int
 experience(mtmp, nk)   /* return # of exp points for mtmp after nk killed */
        register struct monst *mtmp;
        register int    nk;
-#if defined(macintosh) && (defined(__SC__) || defined(__MRC__))
-# pragma unused(nk)
-#endif
 {
        register struct permonst *ptr = mtmp->data;
        int     i, tmp, tmp2;
@@ -119,6 +116,27 @@ experience(mtmp, nk)       /* return # of exp points for mtmp after nk killed */
        if(mtmp->data == &mons[PM_MAIL_DAEMON]) tmp = 1;
 #endif
 
+       if (mtmp->mrevived || mtmp->mcloned) {
+           /*
+            *  Reduce experience awarded for repeated killings of
+            *  "the same monster".  Kill count includes all of this
+            *  monster's type which have been killed--including the
+            *  current monster--regardless of how they were created.
+            *    1.. 20        full experience
+            *   21.. 40        xp / 2
+            *   41.. 80        xp / 4
+            *   81..120        xp / 8
+            *  121..180        xp / 16
+            *  181..240        xp / 32
+            *  241..255+       xp / 64
+            */
+           for (i = 0, tmp2 = 20; nk > tmp2 && tmp > 1; ++i) {
+               tmp = (tmp + 1) / 2;
+               nk -= tmp2;
+               if (i & 1) tmp2 += 20;
+           }
+       }
+
        return(tmp);
 }
 
index 3a7e2d41ee3e9dede235de4c68afc9b97275b604..0976d536d70f993d363dd10e98c67071e38d8abf 100644 (file)
@@ -1446,7 +1446,7 @@ domove()
 
                    u.uconduct.killer++;
                    mndx = monsndx(mtmp->data);
-                   tmp = experience(mtmp, (int)mvitals[mndx].died + 1);
+                   tmp = experience(mtmp, (int)mvitals[mndx].died);
                    more_experienced(tmp, 0);
                    newexplevel();      /* will decide if you go up */
                  }
index 1e3076fd1988942a229f0597c31475d529058194..44f1d871332e71a0c90e4d7bb0d0b7aecdaa3d3d 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -2067,7 +2067,7 @@ cleanup:
        }
 
        /* give experience points */
-       tmp = experience(mtmp, (int)mvitals[mndx].died + 1);
+       tmp = experience(mtmp, (int)mvitals[mndx].died);
        more_experienced(tmp, 0);
        newexplevel();          /* will decide if you go up */
 
index 7b1a26a11b8aabb162cb2de837e425a8a8797aaa..adc199b083649d187d75a7b693391c0ce20614e5 100644 (file)
@@ -486,6 +486,9 @@ resurrect()
            /* make a new Wizard */
            verb = "kill";
            mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT);
+           /* affects experience; he's not coming back from a corpse
+              but is subject to repeated killing like a revived corpse */
+           mtmp->mrevived = 1;
        } else {
            /* look for a migrating Wizard */
            verb = "elude";
index 9b0d334fdcd573db9b41bcc158a724632d080967..c8955864e2fced94539626cc36a70dc837e99c62 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -576,6 +576,7 @@ coord *cc;
                mtmp2->mlstmv = mtmp->mlstmv;
                mtmp2->m_ap_type = mtmp->m_ap_type;
                /* set these ones explicitly */
+               mtmp2->mrevived = 1;
                mtmp2->mavenge = 0;
                mtmp2->meating = 0;
                mtmp2->mleashed = 0;
@@ -755,7 +756,8 @@ boolean by_hero;
            shkp = shop_keeper(*in_rooms(x, y, SHOPBASE));
 
        if (cansee(x, y))
-           pline_The("%s glows iridescently.", cxname(corpse));
+           pline("%s glows iridescently.",
+                 upstart(corpse_xname(corpse, (const char *)0, CXN_PFX_THE)));
        else if (shkp)
            /* need some prior description of the corpse since
               stolen_value() will refer to the object as "it" */