From 97e393aa058aba2571e665e5e7028d9d7eacf514 Mon Sep 17 00:00:00 2001 From: arromdee Date: Wed, 17 Apr 2002 00:12:02 +0000 Subject: [PATCH] naga hatchlings growing up This was reported on the newsgroup. --- doc/fixes34.1 | 1 + src/makemon.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 4ffd67951..cf8da3bf5 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -81,6 +81,7 @@ update swallowed display immediately if an engulfing monster polymorphs undo xname FAKE_AMULET_OF_YENDOR AD_DRIN check, the_unique_obj checks this case axes should chop trees; picks shouldn't chance to aim grappling hook when skilled or better +level limit of monsters like naga hatchlings should be high enough to grow up Platform- and/or Interface-Specific Fixes diff --git a/src/makemon.c b/src/makemon.c index 8039a1096..b6276399e 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1346,6 +1346,12 @@ struct monst *mtmp, *victim; if (mtmp->mhp <= 0) return ((struct permonst *)0); + /* note: none of the monsters with special hit point calculations + have both little and big forms */ + oldtype = monsndx(ptr); + newtype = little_to_big(oldtype); + if (newtype == PM_PRIEST && mtmp->female) newtype = PM_PRIESTESS; + /* growth limits differ depending on method of advancement */ if (victim) { /* killed a monster */ /* @@ -1362,6 +1368,9 @@ struct monst *mtmp, *victim; else if (is_home_elemental(ptr)) hp_threshold *= 3; lev_limit = 3 * (int)ptr->mlevel / 2; /* same as adj_lev() */ + /* If they can grow up, be sure the level is high enough for that */ + if (oldtype != newtype && mons[newtype].mlevel > lev_limit) + lev_limit = (int)mons[newtype].mlevel; /* number of hit points to gain; unlike for the player, we put the limit at the bottom of the next level rather than the top */ max_increase = rnd((int)victim->m_lev + 1); @@ -1386,11 +1395,6 @@ struct monst *mtmp, *victim; else if (lev_limit < 5) lev_limit = 5; /* arbitrary */ else if (lev_limit > 49) lev_limit = (ptr->mlevel > 49 ? 50 : 49); - /* note: none of the monsters with special hit point calculations - have both little and big forms */ - oldtype = monsndx(ptr); - newtype = little_to_big(oldtype); - if (newtype == PM_PRIEST && mtmp->female) newtype = PM_PRIESTESS; if ((int)++mtmp->m_lev >= mons[newtype].mlevel && newtype != oldtype) { ptr = &mons[newtype]; if (mvitals[newtype].mvflags & G_GENOD) { /* allow G_EXTINCT */