partial vampire fix

From a followup comment to a reddit post:  a vampire who has gained
levels loses them when reverting to base form.  This fixes the case
where it grows into a vampire lord; change the base form from plain
vampire to lord when that happens.

It does not fix the case where shapechanging to fog or bat or wolf
and then back to base form yields a new vampire or vampire lord
instead of the one that built itself up.  Mainly affects pet vampires
since wild oees don't tend to grow very much.
This commit is contained in:
PatR
2022-06-25 11:26:05 -07:00
parent 2770223d10
commit 174cac42a6
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -1963,13 +1963,15 @@ grow_up(struct monst *mtmp, struct monst *victim)
an(buf));
}
set_mon_data(mtmp, ptr);
if (mtmp->cham == oldtype && is_shapeshifter(ptr))
mtmp->cham = newtype; /* vampire growing into vampire lord */
newsym(mtmp->mx, mtmp->my); /* color may change */
lev_limit = (int) mtmp->m_lev; /* never undo increment */
mtmp->female = fem; /* gender might be changing */
/* if 'mtmp' is leashed, persistent inventory window needs updating */
if (mtmp->mleashed)
update_inventory(); /* x - leash (attached to a <mon> */
update_inventory(); /* x - leash (attached to a <mon>) */
}
/* sanity checks */