riding a steed into water kills the steed if it cannot swim, with penalties
gaze attacks now stop occupation
proper death message when killed by "plain" high priest
+blessed full healing can't recover levels lost when polymorphing into new man
+blessed full healing can reciver at most half of other lost levels
+golden glow when praying will recover lost level if blessed full healing could
+gaining a level while polymorphed increases current monst hit points as well
+ as latent human (or whatever) hit points
Platform- and/or Interface-Specific Fixes
-/* SCCS Id: @(#)exper.c 3.3 2000/07/23 */
+/* SCCS Id: @(#)exper.c 3.3 2002/01/15 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
num = newhp();
u.uhpmax += num;
u.uhp += num;
+ if (Upolyd) {
+ num = rnd(8);
+ u.mhmax += num;
+ u.mh += num;
+ }
if (u.ulevel < urole.xlev)
num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.lornd + urace.enadv.lornd,
- urole.enadv.lofix + urace.enadv.lofix);
+ urole.enadv.lofix + urace.enadv.lofix);
else
num = rn1((int)ACURR(A_WIS)/2 + urole.enadv.hirnd + urace.enadv.hirnd,
- urole.enadv.hifix + urace.enadv.hifix);
+ urole.enadv.hifix + urace.enadv.hifix);
num = enermod(num); /* M. Stephenson */
u.uenmax += num;
u.uen += num;
-/* SCCS Id: @(#)polyself.c 3.3 2001/03/22 */
+/* SCCS Id: @(#)polyself.c 3.3 2002/01/15 */
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
STATIC_OVL void
newman()
{
- int tmp, tmp2;
+ int tmp, oldlvl;
tmp = u.uhpmax;
- tmp2 = u.ulevel;
+ oldlvl = u.ulevel;
u.ulevel = u.ulevel + rn1(5, -2);
if (u.ulevel > 127 || u.ulevel < 1) { /* level went below 0? */
- u.ulevel = tmp2; /* restore old level in case they lifesave */
+ u.ulevel = oldlvl; /* restore old level in case they lifesave */
goto dead;
}
if (u.ulevel > MAXULEV) u.ulevel = MAXULEV;
+ /* If your level goes down, your peak level goes down by
+ the same amount so that you can't simply use blessed
+ full healing to undo the decrease. But if your level
+ goes up, your peak level does *not* undergo the same
+ adjustment; you might end up losing out on the chance
+ to regain some levels previously lost to other causes. */
+ if (u.ulevel < oldlvl) u.ulevelmax -= (oldlvl - u.ulevel);
if (u.ulevelmax < u.ulevel) u.ulevelmax = u.ulevel;
if (!rn2(10)) change_sex();
- adjabil(tmp2, (int)u.ulevel);
+ adjabil(oldlvl, (int)u.ulevel);
reset_rndmonst(NON_PM); /* new monster generation criteria */
/* random experience points for the new experience level */
u.uexp = rndexp();
- /* u.uhpmax * u.ulevel / tmp2: proportionate hit points to new level
+ /* u.uhpmax * u.ulevel / oldlvl: proportionate hit points to new level
* -10 and +10: don't apply proportionate HP to 10 of a starting
* character's hit points (since a starting character's hit points
* are not on the same scale with hit points obtained through level
* 9 - rn2(19): random change of -9 to +9 hit points
*/
#ifndef LINT
- u.uhpmax = ((u.uhpmax - 10) * (long)u.ulevel / tmp2 + 10) +
+ u.uhpmax = ((u.uhpmax - 10) * (long)u.ulevel / oldlvl + 10) +
(9 - rn2(19));
#endif
tmp = u.uenmax;
#ifndef LINT
- u.uenmax = u.uenmax * (long)u.ulevel / tmp2 + 9 - rn2(19);
+ u.uenmax = u.uenmax * (long)u.ulevel / oldlvl + 9 - rn2(19);
#endif
if (u.uenmax < 0) u.uenmax = 0;
#ifndef LINT
-/* SCCS Id: @(#)potion.c 3.3 2001/12/07 */
+/* SCCS Id: @(#)potion.c 3.3 2002/01/15 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
You_feel("completely healed.");
healup(400, 4+4*bcsign(otmp), !otmp->cursed, TRUE);
/* Restore one lost level if blessed */
- if (otmp->blessed && (u.ulevel < u.ulevelmax))
- pluslvl(FALSE);
+ if (otmp->blessed && u.ulevel < u.ulevelmax) {
+ /* when multiple levels have been lost, drinking
+ multiple potions will only get half of them back */
+ u.ulevelmax -= 1;
+ pluslvl(FALSE);
+ }
make_hallucinated(0L,TRUE,0L);
exercise(A_STR, TRUE);
exercise(A_CON, TRUE);
-/* SCCS Id: @(#)pray.c 3.3 2001/11/29 */
+/* SCCS Id: @(#)pray.c 3.3 2002/01/15 */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
/* Otherwise, falls into next case */
case 2:
if (!Blind)
- You("are surrounded by %s glow.",
- an(hcolor(golden)));
- if (Upolyd) u.mh = u.mhmax += 5;
- u.uhp = u.uhpmax += 5;
+ You("are surrounded by %s glow.", an(hcolor(golden)));
+ /* if any levels have been lost (and not yet regained),
+ treat this effect like blessed full healing */
+ if (u.ulevel < u.ulevelmax) {
+ u.ulevelmax -= 1; /* see potion.c */
+ pluslvl(FALSE);
+ } else {
+ u.uhpmax += 5;
+ if (Upolyd) u.mhmax += 5;
+ }
+ u.uhp = u.uhpmax;
+ if (Upolyd) u.mh = u.mhmax;
ABASE(A_STR) = AMAX(A_STR);
if (u.uhunger < 900) init_uhunger();
if (u.uluck < 0) u.uluck = 0;