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:
@@ -957,6 +957,7 @@ if #wizmakemap was used to generate a replacement level while any shopkeeper,
|
|||||||
temple priest, or vault guard from the level was off of it at the
|
temple priest, or vault guard from the level was off of it at the
|
||||||
time, the monster's eshk, epri, or egd data became invalid and would
|
time, the monster's eshk, epri, or egd data became invalid and would
|
||||||
cause trouble if the monster returned to its 'home' level
|
cause trouble if the monster returned to its 'home' level
|
||||||
|
blessed potion of polymorph will prompt user for monster to poly into
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -81,6 +81,15 @@ enum dismount_types {
|
|||||||
DISMOUNT_BYCHOICE = 6
|
DISMOUNT_BYCHOICE = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* polyself flags */
|
||||||
|
enum polyself_flags {
|
||||||
|
POLY_NOFLAGS = 0x00,
|
||||||
|
POLY_CONTROLLED = 0x01,
|
||||||
|
POLY_MONSTER = 0x02,
|
||||||
|
POLY_REVERT = 0x04,
|
||||||
|
POLY_LOW_CTRL = 0x08
|
||||||
|
};
|
||||||
|
|
||||||
/* sellobj_state() states */
|
/* sellobj_state() states */
|
||||||
#define SELL_NORMAL (0)
|
#define SELL_NORMAL (0)
|
||||||
#define SELL_DELIBERATE (1)
|
#define SELL_DELIBERATE (1)
|
||||||
|
|||||||
+1
-1
@@ -292,7 +292,7 @@ moveloop_core(void)
|
|||||||
if (g.multi >= 0) {
|
if (g.multi >= 0) {
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
if (mvl_change == 1)
|
if (mvl_change == 1)
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
else
|
else
|
||||||
you_were();
|
you_were();
|
||||||
mvl_change = 0;
|
mvl_change = 0;
|
||||||
|
|||||||
@@ -1490,7 +1490,7 @@ wiz_panic(void)
|
|||||||
static int
|
static int
|
||||||
wiz_polyself(void)
|
wiz_polyself(void)
|
||||||
{
|
{
|
||||||
polyself(1);
|
polyself(POLY_CONTROLLED);
|
||||||
return ECMD_OK;
|
return ECMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1194,7 +1194,7 @@ cpostfx(int pm)
|
|||||||
You("%s.", (pm == PM_GENETIC_ENGINEER)
|
You("%s.", (pm == PM_GENETIC_ENGINEER)
|
||||||
? "undergo a freakish metamorphosis"
|
? "undergo a freakish metamorphosis"
|
||||||
: "feel a change coming over you");
|
: "feel a change coming over you");
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PM_DISPLACER_BEAST:
|
case PM_DISPLACER_BEAST:
|
||||||
|
|||||||
+1
-1
@@ -632,7 +632,7 @@ drinksink(void)
|
|||||||
pline("This %s contains toxic wastes!", hliquid("water"));
|
pline("This %s contains toxic wastes!", hliquid("water"));
|
||||||
if (!Unchanging) {
|
if (!Unchanging) {
|
||||||
You("undergo a freakish metamorphosis!");
|
You("undergo a freakish metamorphosis!");
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
/* more odd messages --JJB */
|
/* more odd messages --JJB */
|
||||||
|
|||||||
+1
-1
@@ -992,7 +992,7 @@ mon_poly(struct monst *magr, struct monst *mdef, int dmg)
|
|||||||
/* system shock might take place in polyself() */
|
/* system shock might take place in polyself() */
|
||||||
if (u.ulycn == NON_PM) {
|
if (u.ulycn == NON_PM) {
|
||||||
You("are subjected to a freakish metamorphosis.");
|
You("are subjected to a freakish metamorphosis.");
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
} else if (u.umonnum != u.ulycn) {
|
} else if (u.umonnum != u.ulycn) {
|
||||||
You_feel("an unnatural urge coming on.");
|
You_feel("an unnatural urge coming on.");
|
||||||
you_were();
|
you_were();
|
||||||
|
|||||||
+10
-4
@@ -438,9 +438,10 @@ polyself(int psflags)
|
|||||||
{
|
{
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
int old_light, new_light, mntmp, class, tryct, gvariant = NEUTRAL;
|
int old_light, new_light, mntmp, class, tryct, gvariant = NEUTRAL;
|
||||||
boolean forcecontrol = (psflags == 1),
|
boolean forcecontrol = ((psflags & POLY_CONTROLLED) != 0),
|
||||||
monsterpoly = (psflags == 2),
|
low_control = ((psflags & POLY_LOW_CTRL) != 0),
|
||||||
formrevert = (psflags == 3),
|
monsterpoly = ((psflags & POLY_MONSTER) != 0),
|
||||||
|
formrevert = ((psflags & POLY_REVERT) != 0),
|
||||||
draconian = (uarm && Is_dragon_armor(uarm)),
|
draconian = (uarm && Is_dragon_armor(uarm)),
|
||||||
iswere = (u.ulycn >= LOW_PM),
|
iswere = (u.ulycn >= LOW_PM),
|
||||||
isvamp = (is_vampire(g.youmonst.data)
|
isvamp = (is_vampire(g.youmonst.data)
|
||||||
@@ -469,6 +470,11 @@ polyself(int psflags)
|
|||||||
monsterpoly = TRUE;
|
monsterpoly = TRUE;
|
||||||
controllable_poly = FALSE;
|
controllable_poly = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (forcecontrol && low_control
|
||||||
|
&& (draconian || monsterpoly || isvamp || iswere))
|
||||||
|
forcecontrol = FALSE;
|
||||||
|
|
||||||
if (monsterpoly && isvamp)
|
if (monsterpoly && isvamp)
|
||||||
goto do_vampyr;
|
goto do_vampyr;
|
||||||
|
|
||||||
@@ -1681,7 +1687,7 @@ dopoly(void)
|
|||||||
struct permonst *savedat = g.youmonst.data;
|
struct permonst *savedat = g.youmonst.data;
|
||||||
|
|
||||||
if (is_vampire(g.youmonst.data) || is_vampshifter(&g.youmonst)) {
|
if (is_vampire(g.youmonst.data) || is_vampshifter(&g.youmonst)) {
|
||||||
polyself(2);
|
polyself(POLY_MONSTER);
|
||||||
if (savedat != g.youmonst.data) {
|
if (savedat != g.youmonst.data) {
|
||||||
You("transform into %s.",
|
You("transform into %s.",
|
||||||
an(pmname(g.youmonst.data, Ugender)));
|
an(pmname(g.youmonst.data, Ugender)));
|
||||||
|
|||||||
+11
-4
@@ -1295,11 +1295,18 @@ peffect_acid(struct obj *otmp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
peffect_polymorph(struct obj *otmp UNUSED)
|
peffect_polymorph(struct obj *otmp)
|
||||||
{
|
{
|
||||||
You_feel("a little %s.", Hallucination ? "normal" : "strange");
|
You_feel("a little %s.", Hallucination ? "normal" : "strange");
|
||||||
if (!Unchanging)
|
if (!Unchanging) {
|
||||||
polyself(0);
|
if (!otmp->blessed || (u.umonnum != u.umonster))
|
||||||
|
polyself(POLY_NOFLAGS);
|
||||||
|
else {
|
||||||
|
polyself(POLY_CONTROLLED|POLY_LOW_CTRL);
|
||||||
|
if (u.mtimedone && u.umonnum != u.umonster)
|
||||||
|
u.mtimedone = min(u.mtimedone, rn2(15) + 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -1654,7 +1661,7 @@ potionhit(struct monst *mon, struct obj *obj, int how)
|
|||||||
case POT_POLYMORPH:
|
case POT_POLYMORPH:
|
||||||
You_feel("a little %s.", Hallucination ? "normal" : "strange");
|
You_feel("a little %s.", Hallucination ? "normal" : "strange");
|
||||||
if (!Unchanging && !Antimagic)
|
if (!Unchanging && !Antimagic)
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
break;
|
break;
|
||||||
case POT_ACID:
|
case POT_ACID:
|
||||||
if (!Acid_resistance) {
|
if (!Acid_resistance) {
|
||||||
|
|||||||
+2
-2
@@ -2550,7 +2550,7 @@ do_class_genocide(void)
|
|||||||
if (Upolyd && vampshifted(&g.youmonst)
|
if (Upolyd && vampshifted(&g.youmonst)
|
||||||
/* current shifted form or base vampire form */
|
/* current shifted form or base vampire form */
|
||||||
&& (i == u.umonnum || i == g.youmonst.cham))
|
&& (i == u.umonnum || i == g.youmonst.cham))
|
||||||
polyself(3); /* vampshifter back to vampire */
|
polyself(POLY_REVERT); /* vampshifter back to vampire */
|
||||||
if (Upolyd && i == u.umonnum) {
|
if (Upolyd && i == u.umonnum) {
|
||||||
u.mh = -1;
|
u.mh = -1;
|
||||||
if (Unchanging) {
|
if (Unchanging) {
|
||||||
@@ -2673,7 +2673,7 @@ do_genocide(int how)
|
|||||||
/* first revert if current shifted form or base vampire form */
|
/* first revert if current shifted form or base vampire form */
|
||||||
if (Upolyd && vampshifted(&g.youmonst)
|
if (Upolyd && vampshifted(&g.youmonst)
|
||||||
&& (mndx == u.umonnum || mndx == g.youmonst.cham))
|
&& (mndx == u.umonnum || mndx == g.youmonst.cham))
|
||||||
polyself(3); /* vampshifter (bat, &c) back to vampire */
|
polyself(POLY_REVERT); /* vampshifter (bat, &c) back to vampire */
|
||||||
/* Although "genus" is Latin for race, the hero benefits
|
/* Although "genus" is Latin for race, the hero benefits
|
||||||
* from both race and role; thus genocide affects either.
|
* from both race and role; thus genocide affects either.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -2162,7 +2162,7 @@ trapeffect_poly_trap(
|
|||||||
deltrap(trap); /* delete trap before polymorph */
|
deltrap(trap); /* delete trap before polymorph */
|
||||||
newsym(u.ux, u.uy); /* get rid of trap symbol */
|
newsym(u.ux, u.uy); /* get rid of trap symbol */
|
||||||
You_feel("a change coming over you.");
|
You_feel("a change coming over you.");
|
||||||
polyself(0);
|
polyself(POLY_NOFLAGS);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
|
boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
|
||||||
|
|||||||
Reference in New Issue
Block a user