disclosure after sink fall

From the newsgroup:  if you die from the fall when losing
levitation while moving over a sink, the final attributes still
said you were levitating.
This commit is contained in:
nethack.rankin
2002-09-14 13:24:22 +00:00
parent ba8d740500
commit b789a08f94
2 changed files with 11 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)hack.c 3.4 2002/07/27 */
/* SCCS Id: @(#)hack.c 3.4 2002/09/14 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -453,6 +453,13 @@ dosinkfall()
if (is_floater(youmonst.data) || (HLevitation & FROMOUTSIDE)) {
You("wobble unsteadily for a moment.");
} else {
long save_ELev = ELevitation, save_HLev = HLevitation;
/* fake removal of levitation in advance so that final
disclosure will be right in case this turns out to
be fatal; fortunately the fact that rings and boots
are really still worn has no effect on bones data */
ELevitation = HLevitation = 0L;
You("crash to the floor!");
losehp(rn1(8, 25 - (int)ACURR(A_CON)),
fell_on_sink, NO_KILLER_PREFIX);
@@ -464,6 +471,8 @@ dosinkfall()
losehp(rnd(3), fell_on_sink, NO_KILLER_PREFIX);
exercise(A_CON, FALSE);
}
ELevitation = save_ELev;
HLevitation = save_HLev;
}
ELevitation &= ~W_ARTI;