(void) obj_attach_mid(corpse, mtmp->m_id);
} else {
/* give your possessions to the monster you become */
- in_mklev = TRUE;
- mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy, NO_MM_FLAGS);
+ in_mklev = TRUE; /* use <u.ux,u.uy> as-is */
+ mtmp = makemon(&mons[u.ugrave_arise], u.ux, u.uy, NO_MINVENT);
in_mklev = FALSE;
if (!mtmp) {
drop_upon_death((struct monst *)0, (struct obj *)0,
u.ux, u.uy);
+ u.ugrave_arise = NON_PM; /* in case caller cares */
return;
}
+ /* give mummy-from-hero a wrapping unless hero already
+ carries one; don't bother forcing it to become worn */
+ if (mtmp->data->mlet == S_MUMMY && !carrying(MUMMY_WRAPPING))
+ (void)mongets(mtmp, MUMMY_WRAPPING);
mtmp = christen_monst(mtmp, plname);
newsym(u.ux, u.uy);
- /* turning into slime isn't rising from the dead
- and has already given its own message */
- if (u.ugrave_arise != PM_GREEN_SLIME)
- Your("body rises from the dead as %s...",
- an(mons[u.ugrave_arise].mname));
- display_nhwindow(WIN_MESSAGE, FALSE);
+ /* ["Your body rises from the dead as an <mname>..." used
+ to be given here, but it has been moved to done() so that
+ it gets delivered even when savebones() isn't called] */
drop_upon_death(mtmp, (struct obj *)0, u.ux, u.uy);
m_dowear(mtmp, TRUE);
}
u.ugrave_arise = PM_VAMPIRE;
else if (mptr == &mons[PM_GHOUL])
u.ugrave_arise = PM_GHOUL;
+ /* this could happen if a high-end vampire kills the hero
+ when ordinary vampires are genocided; ditto for wraiths */
if (u.ugrave_arise >= LOW_PM &&
(mvitals[u.ugrave_arise].mvflags & G_GENOD))
u.ugrave_arise = NON_PM;
if (bones_ok && launch_in_progress()) force_launch_placement();
- if (bones_ok && u.ugrave_arise < LOW_PM) {
- /* corpse gets burnt up too */
- if (how == BURNING || how == DISSOLVED)
- u.ugrave_arise = (NON_PM - 2); /* leave no corpse */
- else if (how == STONING)
- u.ugrave_arise = (NON_PM - 1); /* statue instead of corpse */
- else if (how == TURNED_SLIME)
- u.ugrave_arise = PM_GREEN_SLIME;
- else if (u.ugrave_arise == NON_PM &&
- !(mvitals[u.umonnum].mvflags & G_NOCORPSE)) {
+ /* maintain ugrave_arise even for !bones_ok */
+ if (how == BURNING || how == DISSOLVED) /* corpse gets burnt up too */
+ u.ugrave_arise = (NON_PM - 2); /* leave no corpse */
+ else if (how == STONING)
+ u.ugrave_arise = (NON_PM - 1); /* statue instead of corpse */
+ else if (how == TURNED_SLIME)
+ u.ugrave_arise = PM_GREEN_SLIME;
+
+ if (bones_ok && u.ugrave_arise == NON_PM &&
+ !(mvitals[u.umonnum].mvflags & G_NOCORPSE)) {
int mnum = u.umonnum;
if (!Upolyd) {
killer.format == KILLED_BY_AN ? an(killer.name) :
killer.name);
make_grave(u.ux, u.uy, pbuf);
- }
}
/* if pets will contribute to score, populate mydogs list now
(bones creation isn't a factor, but pline() messaging is) */
}
}
+ if (u.ugrave_arise >= LOW_PM && u.ugrave_arise != PM_GREEN_SLIME) {
+ /* give this feedback even if bones aren't going to be created,
+ so that its presence or absence doesn't tip off the player to
+ new bones or their lack; it might be a lie if makemon fails */
+ Your("body rises from the dead as %s...",
+ an(mons[u.ugrave_arise].mname));
+ display_nhwindow(WIN_MESSAGE, FALSE);
+ }
+
if (bones_ok) {
#ifdef WIZARD
if (!wizard || yn("Save bones?") == 'y')