lava, slime, bones

From a bug report:  entering lava cures sliming,
but if you got [re-]afflicted by green slime after becoming stuck in lava,
#sit failed to cure it.  Fix that, and have sinking farther into lava cure
it too (although not necessarily right away).

     Also, suppress leaving the corpse in a bones file for death caused by
being dissolved in lava.  Lastly, suppress the "you rise from the dead as
a <monster>" message during bones creation when the game ends due to being
turned into green slime since you transformed rather than died (and sliming
timeout gives "you have become green slime" just prior to that).
This commit is contained in:
nethack.rankin
2006-12-01 07:38:18 +00:00
parent 58a9bcf893
commit 5a9b766e74
5 changed files with 23 additions and 7 deletions

View File

@@ -326,8 +326,11 @@ struct obj *corpse;
}
mtmp = christen_monst(mtmp, plname);
newsym(u.ux, u.uy);
Your("body rises from the dead as %s...",
an(mons[u.ugrave_arise].mname));
/* 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);
drop_upon_death(mtmp, (struct obj *)0);
m_dowear(mtmp, TRUE);

View File

@@ -668,17 +668,16 @@ die:
bones_ok = (how < GENOCIDED) && can_make_bones();
if (how == TURNED_SLIME)
u.ugrave_arise = PM_GREEN_SLIME;
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)
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)) {
int mnum = u.umonnum;

View File

@@ -95,6 +95,7 @@ dosit()
} else if (u.utraptype == TT_LAVA) {
/* Must have fire resistance or they'd be dead already */
You("sit in the lava!");
if (Slimed) burn_away_slime();
u.utrap += rnd(4);
losehp(d(2,10), "sitting in lava", KILLED_BY); /* lava damage */
} else if (u.utraptype == TT_INFLOOR ||

View File

@@ -4660,6 +4660,8 @@ burn_stuff:
void
sink_into_lava()
{
static const char sink_deeper[] = "You sink deeper into the lava.";
if (!u.utrap || u.utraptype != TT_LAVA) {
; /* do nothing; this shouldn't happen */
} else if (!is_lava(u.ux, u.uy)) {
@@ -4670,9 +4672,17 @@ sink_into_lava()
killer.format = KILLED_BY;
Strcpy(killer.name, "molten lava");
You("sink below the surface and die.");
burn_away_slime(); /* add insult to injury? */
done(DISSOLVED);
} else if (!u.umoved) {
Norep("You sink deeper into the lava.");
/* can't fully turn into slime while in lava, but might not
have it be burned away until you've come awfully close */
if (Slimed && rnd(10 - 1) >= (int)(Slimed & TIMEOUT)) {
pline(sink_deeper);
burn_away_slime();
} else {
Norep(sink_deeper);
}
u.utrap += rnd(4);
}
}