Remove gendered mons indices from roles, races
There are no longer distinct gendered versions of monsters, so femalenum is unused (i.e. set to NON_PM) for all roles and races. Take a pass at removing all uses of/references to femalenum, and rename 'malenum' to 'mnum' since it no longer has any particular association with gender or sex.
This commit is contained in:
@@ -622,11 +622,8 @@ enum glyph_offsets {
|
|||||||
/* The hero's glyph when seen as a monster.
|
/* The hero's glyph when seen as a monster.
|
||||||
*/
|
*/
|
||||||
#define hero_glyph \
|
#define hero_glyph \
|
||||||
monnum_to_glyph((Upolyd || !flags.showrace) \
|
monnum_to_glyph((Upolyd || !flags.showrace) ? u.umonnum : g.urace.mnum, \
|
||||||
? u.umonnum \
|
(Ugender))
|
||||||
: (flags.female && g.urace.femalenum != NON_PM) \
|
|
||||||
? g.urace.femalenum \
|
|
||||||
: g.urace.malenum, (Ugender))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change the given glyph into it's given type. Note:
|
* Change the given glyph into it's given type. Note:
|
||||||
|
|||||||
@@ -175,8 +175,7 @@ struct Role {
|
|||||||
const char *intermed; /* quest intermediate goal (from questpgr.c) */
|
const char *intermed; /* quest intermediate goal (from questpgr.c) */
|
||||||
|
|
||||||
/*** Indices of important monsters and objects ***/
|
/*** Indices of important monsters and objects ***/
|
||||||
short malenum, /* index (PM_) as a male (botl.c) */
|
short mnum, /* index (PM_) of role (botl.c) */
|
||||||
femalenum, /* ...or as a female (NON_PM == same) */
|
|
||||||
petnum, /* PM_ of preferred pet (NON_PM == random) */
|
petnum, /* PM_ of preferred pet (NON_PM == random) */
|
||||||
ldrnum, /* PM_ of quest leader (questpgr.c) */
|
ldrnum, /* PM_ of quest leader (questpgr.c) */
|
||||||
guardnum, /* PM_ of quest guardians (questpgr.c) */
|
guardnum, /* PM_ of quest guardians (questpgr.c) */
|
||||||
@@ -230,8 +229,8 @@ struct Role {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern const struct Role roles[]; /* table of available roles */
|
extern const struct Role roles[]; /* table of available roles */
|
||||||
#define Role_if(X) (g.urole.malenum == (X))
|
#define Role_if(X) (g.urole.mnum == (X))
|
||||||
#define Role_switch (g.urole.malenum)
|
#define Role_switch (g.urole.mnum)
|
||||||
|
|
||||||
/* used during initialization for race, gender, and alignment
|
/* used during initialization for race, gender, and alignment
|
||||||
as well as for character class */
|
as well as for character class */
|
||||||
@@ -249,8 +248,7 @@ struct Race {
|
|||||||
struct RoleName individual; /* individual as a noun ("man", "elf") */
|
struct RoleName individual; /* individual as a noun ("man", "elf") */
|
||||||
|
|
||||||
/*** Indices of important monsters and objects ***/
|
/*** Indices of important monsters and objects ***/
|
||||||
short malenum, /* PM_ as a male monster */
|
short mnum, /* PM_ as a monster */
|
||||||
femalenum, /* ...or as a female (NON_PM == same) */
|
|
||||||
mummynum, /* PM_ as a mummy */
|
mummynum, /* PM_ as a mummy */
|
||||||
zombienum; /* PM_ as a zombie */
|
zombienum; /* PM_ as a zombie */
|
||||||
|
|
||||||
@@ -281,8 +279,8 @@ struct Race {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern const struct Race races[]; /* Table of available races */
|
extern const struct Race races[]; /* Table of available races */
|
||||||
#define Race_if(X) (g.urace.malenum == (X))
|
#define Race_if(X) (g.urace.mnum == (X))
|
||||||
#define Race_switch (g.urace.malenum)
|
#define Race_switch (g.urace.mnum)
|
||||||
|
|
||||||
/*** Unified structure specifying gender information ***/
|
/*** Unified structure specifying gender information ***/
|
||||||
struct Gender {
|
struct Gender {
|
||||||
|
|||||||
@@ -929,7 +929,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
setGlyph(monnum_to_glyph(roles[id].malenum));
|
setGlyph(monnum_to_glyph(roles[id].mnum));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -944,7 +944,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
setGlyph(monnum_to_glyph(races[id].malenum));
|
setGlyph(monnum_to_glyph(races[id].mnum));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ Gem_player_selection()
|
|||||||
currch = lowc(roles[i].name.m[0]);
|
currch = lowc(roles[i].name.m[0]);
|
||||||
if (currch == lastch)
|
if (currch == lastch)
|
||||||
currch = highc(currch);
|
currch = highc(currch);
|
||||||
add_menu(win, roles[i].malenum, &any, currch, 0, ATR_NONE,
|
add_menu(win, roles[i].mnum, &any, currch, 0, ATR_NONE,
|
||||||
an(roles[i].name.m), MENU_ITEMFLAGS_NONE);
|
an(roles[i].name.m), MENU_ITEMFLAGS_NONE);
|
||||||
lastch = currch;
|
lastch = currch;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ rank_of(int lev, short monnum, boolean female)
|
|||||||
|
|
||||||
/* Find the role */
|
/* Find the role */
|
||||||
for (role = roles; role->name.m; role++)
|
for (role = roles; role->name.m; role++)
|
||||||
if (monnum == role->malenum || monnum == role->femalenum)
|
if (monnum == role->mnum)
|
||||||
break;
|
break;
|
||||||
if (!role->name.m)
|
if (!role->name.m)
|
||||||
role = &g.urole;
|
role = &g.urole;
|
||||||
@@ -370,7 +370,7 @@ title_to_mon(const char *str, int *rank_indx, int *title_length)
|
|||||||
*rank_indx = j;
|
*rank_indx = j;
|
||||||
if (title_length)
|
if (title_length)
|
||||||
*title_length = strlen(roles[i].rank[j].m);
|
*title_length = strlen(roles[i].rank[j].m);
|
||||||
return roles[i].malenum;
|
return roles[i].mnum;
|
||||||
}
|
}
|
||||||
if (roles[i].rank[j].f
|
if (roles[i].rank[j].f
|
||||||
&& !strncmpi(str, roles[i].rank[j].f,
|
&& !strncmpi(str, roles[i].rank[j].f,
|
||||||
@@ -379,8 +379,7 @@ title_to_mon(const char *str, int *rank_indx, int *title_length)
|
|||||||
*rank_indx = j;
|
*rank_indx = j;
|
||||||
if (title_length)
|
if (title_length)
|
||||||
*title_length = strlen(roles[i].rank[j].f);
|
*title_length = strlen(roles[i].rank[j].f);
|
||||||
return (roles[i].femalenum != NON_PM) ? roles[i].femalenum
|
return roles[i].mnum;
|
||||||
: roles[i].malenum;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ const struct Role urole_init_data = {
|
|||||||
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
|
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
|
||||||
"L", "N", "C",
|
"L", "N", "C",
|
||||||
"Xxx", "home", "locate",
|
"Xxx", "home", "locate",
|
||||||
NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM,
|
NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
/* Str Int Wis Dex Con Cha */
|
/* Str Int Wis Dex Con Cha */
|
||||||
{ 7, 7, 7, 7, 7, 7 },
|
{ 7, 7, 7, 7, 7, 7 },
|
||||||
@@ -178,7 +178,6 @@ const struct Race urace_init_data = {
|
|||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|||||||
11
src/end.c
11
src/end.c
@@ -1404,15 +1404,10 @@ really_done(int how)
|
|||||||
this grave in the current level's features for #overview */
|
this grave in the current level's features for #overview */
|
||||||
if (bones_ok && u.ugrave_arise == NON_PM
|
if (bones_ok && u.ugrave_arise == NON_PM
|
||||||
&& !(g.mvitals[u.umonnum].mvflags & G_NOCORPSE)) {
|
&& !(g.mvitals[u.umonnum].mvflags & G_NOCORPSE)) {
|
||||||
int mnum = u.umonnum;
|
/* Base corpse on race when not poly'd since original u.umonnum
|
||||||
|
is based on role, and all role monsters are human. */
|
||||||
|
int mnum = !Upolyd ? g.urace.mnum : u.umonnum;
|
||||||
|
|
||||||
if (!Upolyd) {
|
|
||||||
/* Base corpse on race when not poly'd since original u.umonnum
|
|
||||||
is based on role, and all role monsters are human. */
|
|
||||||
mnum = (flags.female && g.urace.femalenum != NON_PM)
|
|
||||||
? g.urace.femalenum
|
|
||||||
: g.urace.malenum;
|
|
||||||
}
|
|
||||||
corpse = mk_named_object(CORPSE, &mons[mnum], u.ux, u.uy, g.plname);
|
corpse = mk_named_object(CORPSE, &mons[mnum], u.ux, u.uy, g.plname);
|
||||||
Sprintf(pbuf, "%s, ", g.plname);
|
Sprintf(pbuf, "%s, ", g.plname);
|
||||||
formatkiller(eos(pbuf), sizeof pbuf - strlen(pbuf), how, TRUE);
|
formatkiller(eos(pbuf), sizeof pbuf - strlen(pbuf), how, TRUE);
|
||||||
|
|||||||
@@ -1090,7 +1090,7 @@ mksobj(int otyp, boolean init, boolean artif)
|
|||||||
if (otmp->corpsenm == NON_PM) {
|
if (otmp->corpsenm == NON_PM) {
|
||||||
otmp->corpsenm = undead_to_corpse(rndmonnum());
|
otmp->corpsenm = undead_to_corpse(rndmonnum());
|
||||||
if (g.mvitals[otmp->corpsenm].mvflags & (G_NOCORPSE | G_GONE))
|
if (g.mvitals[otmp->corpsenm].mvflags & (G_NOCORPSE | G_GONE))
|
||||||
otmp->corpsenm = g.urole.malenum;
|
otmp->corpsenm = g.urole.mnum;
|
||||||
}
|
}
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case STATUE:
|
case STATUE:
|
||||||
|
|||||||
@@ -1166,7 +1166,7 @@ const struct permonst *
|
|||||||
raceptr(struct monst* mtmp)
|
raceptr(struct monst* mtmp)
|
||||||
{
|
{
|
||||||
if (mtmp == &g.youmonst && !Upolyd)
|
if (mtmp == &g.youmonst && !Upolyd)
|
||||||
return &mons[g.urace.malenum];
|
return &mons[g.urace.mnum];
|
||||||
else
|
else
|
||||||
return mtmp->data;
|
return mtmp->data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,8 +366,7 @@ mplayer_talk(register struct monst* mtmp)
|
|||||||
if (mtmp->mpeaceful)
|
if (mtmp->mpeaceful)
|
||||||
return; /* will drop to humanoid talk */
|
return; /* will drop to humanoid talk */
|
||||||
|
|
||||||
pline("Talk? -- %s", (mtmp->data == &mons[g.urole.malenum]
|
pline("Talk? -- %s", mtmp->data == &mons[g.urole.mnum]
|
||||||
|| mtmp->data == &mons[g.urole.femalenum])
|
|
||||||
? same_class_msg[rn2(3)]
|
? same_class_msg[rn2(3)]
|
||||||
: other_class_msg[rn2(3)]);
|
: other_class_msg[rn2(3)]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ set_uasmon(void)
|
|||||||
PROPSET(SEE_INVIS, perceives(mdat));
|
PROPSET(SEE_INVIS, perceives(mdat));
|
||||||
PROPSET(TELEPAT, telepathic(mdat));
|
PROPSET(TELEPAT, telepathic(mdat));
|
||||||
/* note that Infravision uses mons[race] rather than usual mons[role] */
|
/* note that Infravision uses mons[race] rather than usual mons[role] */
|
||||||
PROPSET(INFRAVISION, infravision(Upolyd ? mdat : &mons[g.urace.malenum]));
|
PROPSET(INFRAVISION, infravision(Upolyd ? mdat : &mons[g.urace.mnum]));
|
||||||
PROPSET(INVIS, pm_invisible(mdat));
|
PROPSET(INVIS, pm_invisible(mdat));
|
||||||
PROPSET(TELEPORT, can_teleport(mdat));
|
PROPSET(TELEPORT, can_teleport(mdat));
|
||||||
PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
|
PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
|
||||||
@@ -240,32 +240,24 @@ RESTORE_WARNING_FORMAT_NONLITERAL
|
|||||||
void
|
void
|
||||||
change_sex(void)
|
change_sex(void)
|
||||||
{
|
{
|
||||||
/* setting u.umonster for caveman/cavewoman or priest/priestess
|
|
||||||
swap unintentionally makes `Upolyd' appear to be true */
|
|
||||||
boolean already_polyd = (boolean) Upolyd;
|
|
||||||
|
|
||||||
/* Some monsters are always of one sex and their sex can't be changed;
|
/* Some monsters are always of one sex and their sex can't be changed;
|
||||||
* Succubi/incubi can change, but are handled below.
|
* Succubi/incubi can change, but are handled below.
|
||||||
*
|
*
|
||||||
* !already_polyd check necessary because is_male() and is_female()
|
* !Upolyd check necessary because is_male() and is_female()
|
||||||
* are true if the player is a priest/priestess.
|
* may be true for certain roles
|
||||||
*/
|
*/
|
||||||
if (!already_polyd
|
if (!Upolyd
|
||||||
|| (!is_male(g.youmonst.data) && !is_female(g.youmonst.data)
|
|| (!is_male(g.youmonst.data) && !is_female(g.youmonst.data)
|
||||||
&& !is_neuter(g.youmonst.data)))
|
&& !is_neuter(g.youmonst.data)))
|
||||||
flags.female = !flags.female;
|
flags.female = !flags.female;
|
||||||
if (already_polyd) /* poly'd: also change saved sex */
|
if (Upolyd) /* poly'd: also change saved sex */
|
||||||
u.mfemale = !u.mfemale;
|
u.mfemale = !u.mfemale;
|
||||||
max_rank_sz(); /* [this appears to be superfluous] */
|
max_rank_sz(); /* [this appears to be superfluous] */
|
||||||
if ((already_polyd ? u.mfemale : flags.female) && g.urole.name.f)
|
if ((Upolyd ? u.mfemale : flags.female) && g.urole.name.f)
|
||||||
Strcpy(g.pl_character, g.urole.name.f);
|
Strcpy(g.pl_character, g.urole.name.f);
|
||||||
else
|
else
|
||||||
Strcpy(g.pl_character, g.urole.name.m);
|
Strcpy(g.pl_character, g.urole.name.m);
|
||||||
u.umonster = ((already_polyd ? u.mfemale : flags.female)
|
if (!Upolyd) {
|
||||||
&& g.urole.femalenum != NON_PM)
|
|
||||||
? g.urole.femalenum
|
|
||||||
: g.urole.malenum;
|
|
||||||
if (!already_polyd) {
|
|
||||||
u.umonnum = u.umonster;
|
u.umonnum = u.umonster;
|
||||||
} else if (u.umonnum == PM_AMOROUS_DEMON) {
|
} else if (u.umonnum == PM_AMOROUS_DEMON) {
|
||||||
flags.female = !flags.female;
|
flags.female = !flags.female;
|
||||||
@@ -499,8 +491,7 @@ polyself(int psflags)
|
|||||||
&& !(mntmp == PM_HUMAN
|
&& !(mntmp == PM_HUMAN
|
||||||
|| (your_race(&mons[mntmp])
|
|| (your_race(&mons[mntmp])
|
||||||
&& (mons[mntmp].geno & G_UNIQ) == 0)
|
&& (mons[mntmp].geno & G_UNIQ) == 0)
|
||||||
|| mntmp == g.urole.malenum
|
|| mntmp == g.urole.mnum)) {
|
||||||
|| mntmp == g.urole.femalenum)) {
|
|
||||||
const char *pm_name;
|
const char *pm_name;
|
||||||
|
|
||||||
/* mkclass_poly() can pick a !polyok()
|
/* mkclass_poly() can pick a !polyok()
|
||||||
@@ -1983,12 +1974,8 @@ polysense(void)
|
|||||||
boolean
|
boolean
|
||||||
ugenocided(void)
|
ugenocided(void)
|
||||||
{
|
{
|
||||||
return ((g.mvitals[g.urole.malenum].mvflags & G_GENOD)
|
return ((g.mvitals[g.urole.mnum].mvflags & G_GENOD)
|
||||||
|| (g.urole.femalenum != NON_PM
|
|| (g.mvitals[g.urace.mnum].mvflags & G_GENOD));
|
||||||
&& (g.mvitals[g.urole.femalenum].mvflags & G_GENOD))
|
|
||||||
|| (g.mvitals[g.urace.malenum].mvflags & G_GENOD)
|
|
||||||
|| (g.urace.femalenum != NON_PM
|
|
||||||
&& (g.mvitals[g.urace.femalenum].mvflags & G_GENOD)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* how hero feels "inside" after self-genocide of role or race */
|
/* how hero feels "inside" after self-genocide of role or race */
|
||||||
|
|||||||
28
src/read.c
28
src/read.c
@@ -5,12 +5,8 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
#define Your_Own_Role(mndx) \
|
#define Your_Own_Role(mndx) ((mndx) == g.urole.mnum)
|
||||||
((mndx) == g.urole.malenum \
|
#define Your_Own_Race(mndx) ((mndx) == g.urace.mnum)
|
||||||
|| (g.urole.femalenum != NON_PM && (mndx) == g.urole.femalenum))
|
|
||||||
#define Your_Own_Race(mndx) \
|
|
||||||
((mndx) == g.urace.malenum \
|
|
||||||
|| (g.urace.femalenum != NON_PM && (mndx) == g.urace.femalenum))
|
|
||||||
|
|
||||||
static boolean learnscrolltyp(short);
|
static boolean learnscrolltyp(short);
|
||||||
static void cap_spe(struct obj *);
|
static void cap_spe(struct obj *);
|
||||||
@@ -2420,8 +2416,8 @@ do_class_genocide(void)
|
|||||||
goodcnt++;
|
goodcnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!goodcnt && class != mons[g.urole.malenum].mlet
|
if (!goodcnt && class != mons[g.urole.mnum].mlet
|
||||||
&& class != mons[g.urace.malenum].mlet) {
|
&& class != mons[g.urace.mnum].mlet) {
|
||||||
if (gonecnt)
|
if (gonecnt)
|
||||||
pline("All such monsters are already nonexistent.");
|
pline("All such monsters are already nonexistent.");
|
||||||
else if (immunecnt || class == S_invisible)
|
else if (immunecnt || class == S_invisible)
|
||||||
@@ -2481,7 +2477,7 @@ do_class_genocide(void)
|
|||||||
/* Self-genocide if it matches either your race
|
/* Self-genocide if it matches either your race
|
||||||
or role. Assumption: male and female forms
|
or role. Assumption: male and female forms
|
||||||
share same monster class. */
|
share same monster class. */
|
||||||
if (i == g.urole.malenum || i == g.urace.malenum) {
|
if (i == g.urole.mnum || i == g.urace.mnum) {
|
||||||
u.uhp = -1;
|
u.uhp = -1;
|
||||||
if (Upolyd) {
|
if (Upolyd) {
|
||||||
if (!feel_dead++)
|
if (!feel_dead++)
|
||||||
@@ -2642,16 +2638,6 @@ do_genocide(int how)
|
|||||||
(*which != 'a') ? buf : makeplural(buf));
|
(*which != 'a') ? buf : makeplural(buf));
|
||||||
|
|
||||||
if (killplayer) {
|
if (killplayer) {
|
||||||
/* might need to wipe out dual role */
|
|
||||||
if (g.urole.femalenum != NON_PM && mndx == g.urole.malenum)
|
|
||||||
g.mvitals[g.urole.femalenum].mvflags |= (G_GENOD | G_NOCORPSE);
|
|
||||||
if (g.urole.femalenum != NON_PM && mndx == g.urole.femalenum)
|
|
||||||
g.mvitals[g.urole.malenum].mvflags |= (G_GENOD | G_NOCORPSE);
|
|
||||||
if (g.urace.femalenum != NON_PM && mndx == g.urace.malenum)
|
|
||||||
g.mvitals[g.urace.femalenum].mvflags |= (G_GENOD | G_NOCORPSE);
|
|
||||||
if (g.urace.femalenum != NON_PM && mndx == g.urace.femalenum)
|
|
||||||
g.mvitals[g.urace.malenum].mvflags |= (G_GENOD | G_NOCORPSE);
|
|
||||||
|
|
||||||
u.uhp = -1;
|
u.uhp = -1;
|
||||||
if (how & PLAYER) {
|
if (how & PLAYER) {
|
||||||
g.killer.format = KILLED_BY;
|
g.killer.format = KILLED_BY;
|
||||||
@@ -2821,7 +2807,7 @@ create_particular_parse(char* str, struct _create_particular_data* d)
|
|||||||
|
|
||||||
d->quan = 1 + ((g.multi > 0) ? g.multi : 0);
|
d->quan = 1 + ((g.multi > 0) ? g.multi : 0);
|
||||||
d->monclass = MAXMCLASSES;
|
d->monclass = MAXMCLASSES;
|
||||||
d->which = g.urole.malenum; /* an arbitrary index into mons[] */
|
d->which = g.urole.mnum; /* an arbitrary index into mons[] */
|
||||||
d->fem = -1; /* gender not specified */
|
d->fem = -1; /* gender not specified */
|
||||||
d->genderconf = -1; /* no confusion on which gender to assign */
|
d->genderconf = -1; /* no confusion on which gender to assign */
|
||||||
d->randmonst = FALSE;
|
d->randmonst = FALSE;
|
||||||
@@ -2919,7 +2905,7 @@ create_particular_parse(char* str, struct _create_particular_data* d)
|
|||||||
d->monclass = MAXMCLASSES;
|
d->monclass = MAXMCLASSES;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (d->monclass > 0) {
|
} else if (d->monclass > 0) {
|
||||||
d->which = g.urole.malenum; /* reset from NON_PM */
|
d->which = g.urole.mnum; /* reset from NON_PM */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
24
src/role.c
24
src/role.c
@@ -41,7 +41,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Tomb of the Toltec Kings",
|
"the Tomb of the Toltec Kings",
|
||||||
PM_ARCHEOLOGIST,
|
PM_ARCHEOLOGIST,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_LORD_CARNARVON,
|
PM_LORD_CARNARVON,
|
||||||
PM_STUDENT,
|
PM_STUDENT,
|
||||||
PM_MINION_OF_HUHETOTL,
|
PM_MINION_OF_HUHETOTL,
|
||||||
@@ -83,7 +82,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Duali Oasis",
|
"the Duali Oasis",
|
||||||
PM_BARBARIAN,
|
PM_BARBARIAN,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_PELIAS,
|
PM_PELIAS,
|
||||||
PM_CHIEFTAIN,
|
PM_CHIEFTAIN,
|
||||||
PM_THOTH_AMON,
|
PM_THOTH_AMON,
|
||||||
@@ -124,7 +122,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Caves of the Ancestors",
|
"the Caves of the Ancestors",
|
||||||
"the Dragon's Lair",
|
"the Dragon's Lair",
|
||||||
PM_CAVE_DWELLER,
|
PM_CAVE_DWELLER,
|
||||||
NON_PM,
|
|
||||||
PM_LITTLE_DOG,
|
PM_LITTLE_DOG,
|
||||||
PM_SHAMAN_KARNOV,
|
PM_SHAMAN_KARNOV,
|
||||||
PM_NEANDERTHAL,
|
PM_NEANDERTHAL,
|
||||||
@@ -167,7 +164,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Temple of Coeus",
|
"the Temple of Coeus",
|
||||||
PM_HEALER,
|
PM_HEALER,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_HIPPOCRATES,
|
PM_HIPPOCRATES,
|
||||||
PM_ATTENDANT,
|
PM_ATTENDANT,
|
||||||
PM_CYCLOPS,
|
PM_CYCLOPS,
|
||||||
@@ -207,7 +203,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"Camelot Castle",
|
"Camelot Castle",
|
||||||
"the Isle of Glass",
|
"the Isle of Glass",
|
||||||
PM_KNIGHT,
|
PM_KNIGHT,
|
||||||
NON_PM,
|
|
||||||
PM_PONY,
|
PM_PONY,
|
||||||
PM_KING_ARTHUR,
|
PM_KING_ARTHUR,
|
||||||
PM_PAGE,
|
PM_PAGE,
|
||||||
@@ -249,7 +244,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Monastery of the Earth-Lord",
|
"the Monastery of the Earth-Lord",
|
||||||
PM_MONK,
|
PM_MONK,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_GRAND_MASTER,
|
PM_GRAND_MASTER,
|
||||||
PM_ABBOT,
|
PM_ABBOT,
|
||||||
PM_MASTER_KAEN,
|
PM_MASTER_KAEN,
|
||||||
@@ -291,7 +285,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Temple of Nalzok",
|
"the Temple of Nalzok",
|
||||||
PM_CLERIC,
|
PM_CLERIC,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_ARCH_PRIEST,
|
PM_ARCH_PRIEST,
|
||||||
PM_ACOLYTE,
|
PM_ACOLYTE,
|
||||||
PM_NALZOK,
|
PM_NALZOK,
|
||||||
@@ -335,7 +328,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Assassins' Guild Hall",
|
"the Assassins' Guild Hall",
|
||||||
PM_ROGUE,
|
PM_ROGUE,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_MASTER_OF_THIEVES,
|
PM_MASTER_OF_THIEVES,
|
||||||
PM_THUG,
|
PM_THUG,
|
||||||
PM_MASTER_ASSASSIN,
|
PM_MASTER_ASSASSIN,
|
||||||
@@ -389,7 +381,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"Orion's camp",
|
"Orion's camp",
|
||||||
"the cave of the wumpus",
|
"the cave of the wumpus",
|
||||||
PM_RANGER,
|
PM_RANGER,
|
||||||
NON_PM,
|
|
||||||
PM_LITTLE_DOG /* Orion & canis major */,
|
PM_LITTLE_DOG /* Orion & canis major */,
|
||||||
PM_ORION,
|
PM_ORION,
|
||||||
PM_HUNTER,
|
PM_HUNTER,
|
||||||
@@ -431,7 +422,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Castle of the Taro Clan",
|
"the Castle of the Taro Clan",
|
||||||
"the Shogun's Castle",
|
"the Shogun's Castle",
|
||||||
PM_SAMURAI,
|
PM_SAMURAI,
|
||||||
NON_PM,
|
|
||||||
PM_LITTLE_DOG,
|
PM_LITTLE_DOG,
|
||||||
PM_LORD_SATO,
|
PM_LORD_SATO,
|
||||||
PM_ROSHI,
|
PM_ROSHI,
|
||||||
@@ -473,7 +463,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Thieves' Guild Hall",
|
"the Thieves' Guild Hall",
|
||||||
PM_TOURIST,
|
PM_TOURIST,
|
||||||
NON_PM,
|
NON_PM,
|
||||||
NON_PM,
|
|
||||||
PM_TWOFLOWER,
|
PM_TWOFLOWER,
|
||||||
PM_GUIDE,
|
PM_GUIDE,
|
||||||
PM_MASTER_OF_THIEVES,
|
PM_MASTER_OF_THIEVES,
|
||||||
@@ -513,7 +502,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Shrine of Destiny",
|
"the Shrine of Destiny",
|
||||||
"the cave of Surtur",
|
"the cave of Surtur",
|
||||||
PM_VALKYRIE,
|
PM_VALKYRIE,
|
||||||
NON_PM,
|
|
||||||
NON_PM /*PM_WINTER_WOLF_CUB*/,
|
NON_PM /*PM_WINTER_WOLF_CUB*/,
|
||||||
PM_NORN,
|
PM_NORN,
|
||||||
PM_WARRIOR,
|
PM_WARRIOR,
|
||||||
@@ -554,7 +542,6 @@ const struct Role roles[NUM_ROLES+1] = {
|
|||||||
"the Lonely Tower",
|
"the Lonely Tower",
|
||||||
"the Tower of Darkness",
|
"the Tower of Darkness",
|
||||||
PM_WIZARD,
|
PM_WIZARD,
|
||||||
NON_PM,
|
|
||||||
PM_KITTEN,
|
PM_KITTEN,
|
||||||
PM_NEFERET_THE_GREEN,
|
PM_NEFERET_THE_GREEN,
|
||||||
PM_APPRENTICE,
|
PM_APPRENTICE,
|
||||||
@@ -594,7 +581,6 @@ const struct Race races[] = {
|
|||||||
"Hum",
|
"Hum",
|
||||||
{ "man", "woman" },
|
{ "man", "woman" },
|
||||||
PM_HUMAN,
|
PM_HUMAN,
|
||||||
NON_PM,
|
|
||||||
PM_HUMAN_MUMMY,
|
PM_HUMAN_MUMMY,
|
||||||
PM_HUMAN_ZOMBIE,
|
PM_HUMAN_ZOMBIE,
|
||||||
MH_HUMAN | ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL | ROLE_NEUTRAL
|
MH_HUMAN | ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL | ROLE_NEUTRAL
|
||||||
@@ -616,7 +602,6 @@ const struct Race races[] = {
|
|||||||
"Elf",
|
"Elf",
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
PM_ELF,
|
PM_ELF,
|
||||||
NON_PM,
|
|
||||||
PM_ELF_MUMMY,
|
PM_ELF_MUMMY,
|
||||||
PM_ELF_ZOMBIE,
|
PM_ELF_ZOMBIE,
|
||||||
MH_ELF | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
|
MH_ELF | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
|
||||||
@@ -637,7 +622,6 @@ const struct Race races[] = {
|
|||||||
"Dwa",
|
"Dwa",
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
PM_DWARF,
|
PM_DWARF,
|
||||||
NON_PM,
|
|
||||||
PM_DWARF_MUMMY,
|
PM_DWARF_MUMMY,
|
||||||
PM_DWARF_ZOMBIE,
|
PM_DWARF_ZOMBIE,
|
||||||
MH_DWARF | ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL,
|
MH_DWARF | ROLE_MALE | ROLE_FEMALE | ROLE_LAWFUL,
|
||||||
@@ -658,7 +642,6 @@ const struct Race races[] = {
|
|||||||
"Gno",
|
"Gno",
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
PM_GNOME,
|
PM_GNOME,
|
||||||
NON_PM,
|
|
||||||
PM_GNOME_MUMMY,
|
PM_GNOME_MUMMY,
|
||||||
PM_GNOME_ZOMBIE,
|
PM_GNOME_ZOMBIE,
|
||||||
MH_GNOME | ROLE_MALE | ROLE_FEMALE | ROLE_NEUTRAL,
|
MH_GNOME | ROLE_MALE | ROLE_FEMALE | ROLE_NEUTRAL,
|
||||||
@@ -679,7 +662,6 @@ const struct Race races[] = {
|
|||||||
"Orc",
|
"Orc",
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
PM_ORC,
|
PM_ORC,
|
||||||
NON_PM,
|
|
||||||
PM_ORC_MUMMY,
|
PM_ORC_MUMMY,
|
||||||
PM_ORC_ZOMBIE,
|
PM_ORC_ZOMBIE,
|
||||||
MH_ORC | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
|
MH_ORC | ROLE_MALE | ROLE_FEMALE | ROLE_CHAOTIC,
|
||||||
@@ -2034,7 +2016,7 @@ role_init(void)
|
|||||||
* needed--via instrinsic 'Infravision' which set_uasmon() manages.
|
* needed--via instrinsic 'Infravision' which set_uasmon() manages.
|
||||||
*/
|
*/
|
||||||
/* Fix up infravision */
|
/* Fix up infravision */
|
||||||
if (mons[g.urace.malenum].mflags3 & M3_INFRAVISION) {
|
if (mons[g.urace.mnum].mflags3 & M3_INFRAVISION) {
|
||||||
/* although an infravision intrinsic is possible, infravision
|
/* although an infravision intrinsic is possible, infravision
|
||||||
* is purely a property of the physical race. This means that we
|
* is purely a property of the physical race. This means that we
|
||||||
* must put the infravision flag in the player's current race
|
* must put the infravision flag in the player's current race
|
||||||
@@ -2044,9 +2026,7 @@ role_init(void)
|
|||||||
* but since infravision has no effect for NPCs anyway we can
|
* but since infravision has no effect for NPCs anyway we can
|
||||||
* ignore this.
|
* ignore this.
|
||||||
*/
|
*/
|
||||||
mons[g.urole.malenum].mflags3 |= M3_INFRAVISION;
|
mons[g.urole.mnum].mflags3 |= M3_INFRAVISION;
|
||||||
if (g.urole.femalenum != NON_PM)
|
|
||||||
mons[g.urole.femalenum].mflags3 |= M3_INFRAVISION;
|
|
||||||
}
|
}
|
||||||
#endif /*0*/
|
#endif /*0*/
|
||||||
|
|
||||||
|
|||||||
19
src/topten.c
19
src/topten.c
@@ -76,7 +76,7 @@ static char *encode_extended_achievements(void);
|
|||||||
static char *encode_extended_conducts(void);
|
static char *encode_extended_conducts(void);
|
||||||
#endif
|
#endif
|
||||||
static void free_ttlist(struct toptenentry *);
|
static void free_ttlist(struct toptenentry *);
|
||||||
static int classmon(char *, boolean);
|
static int classmon(char *);
|
||||||
static int score_wanted(boolean, int, struct toptenentry *, int,
|
static int score_wanted(boolean, int, struct toptenentry *, int,
|
||||||
const char **, int);
|
const char **, int);
|
||||||
#ifdef NO_SCAN_BRACK
|
#ifdef NO_SCAN_BRACK
|
||||||
@@ -1273,20 +1273,19 @@ prscore(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
classmon(char *plch, boolean fem)
|
classmon(char *plch)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Look for this role in the role table */
|
/* Look for this role in the role table */
|
||||||
for (i = 0; roles[i].name.m; i++)
|
for (i = 0; roles[i].name.m; i++) {
|
||||||
if (!strncmp(plch, roles[i].filecode, ROLESZ)) {
|
if (!strncmp(plch, roles[i].filecode, ROLESZ)) {
|
||||||
if (fem && roles[i].femalenum != NON_PM)
|
if (roles[i].mnum != NON_PM)
|
||||||
return roles[i].femalenum;
|
return roles[i].mnum;
|
||||||
else if (roles[i].malenum != NON_PM)
|
|
||||||
return roles[i].malenum;
|
|
||||||
else
|
else
|
||||||
return PM_HUMAN;
|
return PM_HUMAN;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* this might be from a 3.2.x score for former Elf class */
|
/* this might be from a 3.2.x score for former Elf class */
|
||||||
if (!strcmp(plch, "E"))
|
if (!strcmp(plch, "E"))
|
||||||
return PM_RANGER;
|
return PM_RANGER;
|
||||||
@@ -1351,7 +1350,11 @@ tt_oname(struct obj* otmp)
|
|||||||
if (!tt)
|
if (!tt)
|
||||||
return (struct obj *) 0;
|
return (struct obj *) 0;
|
||||||
|
|
||||||
set_corpsenm(otmp, classmon(tt->plrole, (tt->plgend[0] == 'F')));
|
set_corpsenm(otmp, classmon(tt->plrole));
|
||||||
|
if (tt->plgend[0] == 'F')
|
||||||
|
otmp->spe = CORPSTAT_FEMALE;
|
||||||
|
else if (tt->plgend[0] == 'M')
|
||||||
|
otmp->spe = CORPSTAT_MALE;
|
||||||
otmp = oname(otmp, tt->name);
|
otmp = oname(otmp, tt->name);
|
||||||
|
|
||||||
return otmp;
|
return otmp;
|
||||||
|
|||||||
@@ -654,9 +654,7 @@ u_init(void)
|
|||||||
u.umortality = 0;
|
u.umortality = 0;
|
||||||
u.ugrave_arise = NON_PM;
|
u.ugrave_arise = NON_PM;
|
||||||
|
|
||||||
u.umonnum = u.umonster = (flags.female && g.urole.femalenum != NON_PM)
|
u.umonnum = u.umonster = g.urole.mnum;
|
||||||
? g.urole.femalenum
|
|
||||||
: g.urole.malenum;
|
|
||||||
u.ulycn = NON_PM;
|
u.ulycn = NON_PM;
|
||||||
set_uasmon();
|
set_uasmon();
|
||||||
|
|
||||||
@@ -1080,13 +1078,13 @@ ini_inv(struct trobj *trop)
|
|||||||
g.nocreate4 = otyp;
|
g.nocreate4 = otyp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g.urace.malenum != PM_HUMAN) {
|
if (g.urace.mnum != PM_HUMAN) {
|
||||||
/* substitute race-specific items; this used to be in
|
/* substitute race-specific items; this used to be in
|
||||||
the 'if (otyp != UNDEF_TYP) { }' block above, but then
|
the 'if (otyp != UNDEF_TYP) { }' block above, but then
|
||||||
substitutions didn't occur for randomly generated items
|
substitutions didn't occur for randomly generated items
|
||||||
(particularly food) which have racial substitutes */
|
(particularly food) which have racial substitutes */
|
||||||
for (i = 0; inv_subs[i].race_pm != NON_PM; ++i)
|
for (i = 0; inv_subs[i].race_pm != NON_PM; ++i)
|
||||||
if (inv_subs[i].race_pm == g.urace.malenum
|
if (inv_subs[i].race_pm == g.urace.mnum
|
||||||
&& otyp == inv_subs[i].item_otyp) {
|
&& otyp == inv_subs[i].item_otyp) {
|
||||||
debugpline3("ini_inv: substituting %s for %s%s",
|
debugpline3("ini_inv: substituting %s for %s%s",
|
||||||
OBJ_NAME(objects[inv_subs[i].subs_otyp]),
|
OBJ_NAME(objects[inv_subs[i].subs_otyp]),
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
glyph_info gi;
|
glyph_info gi;
|
||||||
int glyph = monnum_to_glyph(roles[id].malenum, MALE);
|
int glyph = monnum_to_glyph(roles[id].mnum, MALE);
|
||||||
map_glyphinfo(0, 0, glyph, 0, &gi);
|
map_glyphinfo(0, 0, glyph, 0, &gi);
|
||||||
setGlyph(glyph, gi.gm.tileidx);
|
setGlyph(glyph, gi.gm.tileidx);
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ public:
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
glyph_info gi;
|
glyph_info gi;
|
||||||
int glyph = monnum_to_glyph(races[id].malenum, MALE);
|
int glyph = monnum_to_glyph(races[id].mnum, MALE);
|
||||||
map_glyphinfo(0, 0, glyph, 0, &gi);
|
map_glyphinfo(0, 0, glyph, 0, &gi);
|
||||||
setGlyph(glyph, gi.gm.tileidx);
|
setGlyph(glyph, gi.gm.tileidx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user