diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 217b62c6d..b1fa18e7b 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 diff --git a/src/exper.c b/src/exper.c index 523a72e37..7ed11300d 100644 --- a/src/exper.c +++ b/src/exper.c @@ -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); } diff --git a/src/hack.c b/src/hack.c index 3a7e2d41e..0976d536d 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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 */ } diff --git a/src/mon.c b/src/mon.c index 1e3076fd1..44f1d8713 100644 --- 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 */ diff --git a/src/wizard.c b/src/wizard.c index 7b1a26a11..adc199b08 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -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"; diff --git a/src/zap.c b/src/zap.c index 9b0d334fd..c8955864e 100644 --- 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" */