Revert "Moved sex_change_ok to instance_globals."
This reverts commit ee22210a68.
This commit is contained in:
@@ -464,11 +464,6 @@ struct instance_globals {
|
|||||||
/* pickup.c */
|
/* pickup.c */
|
||||||
int oldcap; /* last encumberance */
|
int oldcap; /* last encumberance */
|
||||||
|
|
||||||
/* polyself.c */
|
|
||||||
int sex_change_ok; /* controls whether taking on new form or becoming new
|
|
||||||
man can also change sex (ought to be an arg to
|
|
||||||
polymon() and newman() instead) */
|
|
||||||
|
|
||||||
/* potion.c */
|
/* potion.c */
|
||||||
boolean notonhead; /* for long worms */
|
boolean notonhead; /* for long worms */
|
||||||
int potion_nothing;
|
int potion_nothing;
|
||||||
|
|||||||
@@ -348,9 +348,6 @@ const struct instance_globals g_init = {
|
|||||||
/* pickup.c */
|
/* pickup.c */
|
||||||
0, /* oldcap */
|
0, /* oldcap */
|
||||||
|
|
||||||
/* polyself.c */
|
|
||||||
0, /* sex_change_ok */
|
|
||||||
|
|
||||||
/* potion.c */
|
/* potion.c */
|
||||||
FALSE, /* notonhead */
|
FALSE, /* notonhead */
|
||||||
UNDEFINED_VALUE, /* potion_nothing */
|
UNDEFINED_VALUE, /* potion_nothing */
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ STATIC_DCL void NDECL(polysense);
|
|||||||
STATIC_VAR const char no_longer_petrify_resistant[] =
|
STATIC_VAR const char no_longer_petrify_resistant[] =
|
||||||
"No longer petrify-resistant, you";
|
"No longer petrify-resistant, you";
|
||||||
|
|
||||||
|
/* controls whether taking on new form or becoming new man can also
|
||||||
|
change sex (ought to be an arg to polymon() and newman() instead) */
|
||||||
|
STATIC_VAR int sex_change_ok = 0;
|
||||||
|
|
||||||
/* update the youmonst.data structure pointer and intrinsics */
|
/* update the youmonst.data structure pointer and intrinsics */
|
||||||
void
|
void
|
||||||
set_uasmon()
|
set_uasmon()
|
||||||
@@ -292,7 +296,7 @@ newman()
|
|||||||
u.ulevelmax = newlvl;
|
u.ulevelmax = newlvl;
|
||||||
u.ulevel = newlvl;
|
u.ulevel = newlvl;
|
||||||
|
|
||||||
if (g.sex_change_ok && !rn2(10))
|
if (sex_change_ok && !rn2(10))
|
||||||
change_sex();
|
change_sex();
|
||||||
|
|
||||||
adjabil(oldlvl, (int) u.ulevel);
|
adjabil(oldlvl, (int) u.ulevel);
|
||||||
@@ -569,14 +573,14 @@ int psflags;
|
|||||||
/* The below polyok() fails either if everything is genocided, or if
|
/* The below polyok() fails either if everything is genocided, or if
|
||||||
* we deliberately chose something illegal to force newman().
|
* we deliberately chose something illegal to force newman().
|
||||||
*/
|
*/
|
||||||
g.sex_change_ok++;
|
sex_change_ok++;
|
||||||
if (!polyok(&mons[mntmp]) || (!forcecontrol && !rn2(5))
|
if (!polyok(&mons[mntmp]) || (!forcecontrol && !rn2(5))
|
||||||
|| your_race(&mons[mntmp])) {
|
|| your_race(&mons[mntmp])) {
|
||||||
newman();
|
newman();
|
||||||
} else {
|
} else {
|
||||||
(void) polymon(mntmp);
|
(void) polymon(mntmp);
|
||||||
}
|
}
|
||||||
g.sex_change_ok--; /* reset */
|
sex_change_ok--; /* reset */
|
||||||
|
|
||||||
made_change:
|
made_change:
|
||||||
new_light = emits_light(youmonst.data);
|
new_light = emits_light(youmonst.data);
|
||||||
@@ -646,7 +650,7 @@ int mntmp;
|
|||||||
if (!flags.female)
|
if (!flags.female)
|
||||||
dochange = TRUE;
|
dochange = TRUE;
|
||||||
} else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
|
} else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
|
||||||
if (g.sex_change_ok && !rn2(10))
|
if (sex_change_ok && !rn2(10))
|
||||||
dochange = TRUE;
|
dochange = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user