Blessed potion of polymorph asks user for monster to poly into

... unless there's some other form that would override the choice,
such as a worn dragon armor, lycanthropy, or vampirism.

The polymorph will be in effect for 10-24 turns.
This commit is contained in:
Pasi Kallinen
2022-07-14 14:04:24 +03:00
parent 67ec92165e
commit 486ed29077
12 changed files with 40 additions and 17 deletions

View File

@@ -438,9 +438,10 @@ polyself(int psflags)
{
char buf[BUFSZ];
int old_light, new_light, mntmp, class, tryct, gvariant = NEUTRAL;
boolean forcecontrol = (psflags == 1),
monsterpoly = (psflags == 2),
formrevert = (psflags == 3),
boolean forcecontrol = ((psflags & POLY_CONTROLLED) != 0),
low_control = ((psflags & POLY_LOW_CTRL) != 0),
monsterpoly = ((psflags & POLY_MONSTER) != 0),
formrevert = ((psflags & POLY_REVERT) != 0),
draconian = (uarm && Is_dragon_armor(uarm)),
iswere = (u.ulycn >= LOW_PM),
isvamp = (is_vampire(g.youmonst.data)
@@ -469,6 +470,11 @@ polyself(int psflags)
monsterpoly = TRUE;
controllable_poly = FALSE;
}
if (forcecontrol && low_control
&& (draconian || monsterpoly || isvamp || iswere))
forcecontrol = FALSE;
if (monsterpoly && isvamp)
goto do_vampyr;
@@ -1681,7 +1687,7 @@ dopoly(void)
struct permonst *savedat = g.youmonst.data;
if (is_vampire(g.youmonst.data) || is_vampshifter(&g.youmonst)) {
polyself(2);
polyself(POLY_MONSTER);
if (savedat != g.youmonst.data) {
You("transform into %s.",
an(pmname(g.youmonst.data, Ugender)));