wizard mode un-polymorph

When already polymorphed, polymorphing into 'human' (or character's
species) to revert to normal when at low level has the infuriating
tendency to yield "your new form isn't healthy enough to survive".
Allow specifying your own role as a way to rehumanize() instead of
going through newman() and level/sex/characteristics randomization
which that performs.
This commit is contained in:
PatR
2020-01-21 18:29:23 -08:00
parent 3e18804371
commit 424750867a

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 polyself.c $NHDT-Date: 1579649789 2020/01/21 23:36:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.148 $ */
/* NetHack 3.6 polyself.c $NHDT-Date: 1579660157 2020/01/22 02:29:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.149 $ */
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
@@ -462,14 +462,19 @@ int psflags;
pline("I've never heard of such monsters.");
else
You_cant("polymorph into any of those.");
} else if (wizard && Upolyd && mntmp == u.umonster) {
/* in wizard mode, picking own role while poly'd reverts to
normal without newman()'s chance of level or sex change */
rehumanize();
goto made_change;
} else if (iswere && (were_beastie(mntmp) == u.ulycn
|| mntmp == counter_were(u.ulycn)
|| (Upolyd && mntmp == PM_HUMAN))) {
goto do_shift;
/* Note: humans are illegal as monsters, but an
* illegal monster forces newman(), which is what we
* want if they specified a human.... */
} else if (!polyok(&mons[mntmp])
/* Note: humans are illegal as monsters, but an
illegal monster forces newman(), which is what
we want if they specified a human.... */
&& !(mntmp == PM_HUMAN || your_race(&mons[mntmp])
|| mntmp == g.urole.malenum
|| mntmp == g.urole.femalenum)) {