corpse gender
Reported by entrez. Don't make 50% of neuter monsters be flagged as female. It doesn't matter for live monsters but gets inherited by their corpses, where female and non-female corpses stack separately.
This commit is contained in:
@@ -1158,6 +1158,8 @@ the change for repeat after prefix+command would result in a crash if repeat
|
|||||||
was attempted after an unassigned key
|
was attempted after an unassigned key
|
||||||
items obtained via wishing while blind were erroneously being marked as 'seen
|
items obtained via wishing while blind were erroneously being marked as 'seen
|
||||||
up close' so behaving differently from items picked up off the floor
|
up close' so behaving differently from items picked up off the floor
|
||||||
|
corpses of neuter monsters had random chance to be flagged as female so would
|
||||||
|
only stack with others that made the same random choice
|
||||||
|
|
||||||
curses: 'msg_window' option wasn't functional for curses unless the binary
|
curses: 'msg_window' option wasn't functional for curses unless the binary
|
||||||
also included tty support
|
also included tty support
|
||||||
|
|||||||
+14
-6
@@ -1127,7 +1127,8 @@ makemon(
|
|||||||
struct monst fakemon;
|
struct monst fakemon;
|
||||||
coord cc;
|
coord cc;
|
||||||
int mndx, mcham, ct, mitem;
|
int mndx, mcham, ct, mitem;
|
||||||
boolean anymon = !ptr,
|
boolean femaleok, maleok,
|
||||||
|
anymon = !ptr,
|
||||||
byyou = u_at(x, y),
|
byyou = u_at(x, y),
|
||||||
allow_minvent = ((mmflags & NO_MINVENT) == 0),
|
allow_minvent = ((mmflags & NO_MINVENT) == 0),
|
||||||
countbirth = ((mmflags & MM_NOCOUNTBIRTH) == 0),
|
countbirth = ((mmflags & MM_NOCOUNTBIRTH) == 0),
|
||||||
@@ -1230,10 +1231,13 @@ makemon(
|
|||||||
/* set up level and hit points */
|
/* set up level and hit points */
|
||||||
newmonhp(mtmp, mndx);
|
newmonhp(mtmp, mndx);
|
||||||
|
|
||||||
if (is_female(ptr) || ((mmflags & MM_FEMALE) && !is_male(ptr)))
|
femaleok = (!is_male(ptr) && !is_neuter(ptr));
|
||||||
mtmp->female = TRUE;
|
maleok = (!is_female(ptr) && !is_neuter(ptr));
|
||||||
else if (is_male(ptr) || ((mmflags & MM_MALE) && !is_female(ptr)))
|
if (is_female(ptr) || ((mmflags & MM_FEMALE) != 0 && femaleok))
|
||||||
mtmp->female = FALSE;
|
mtmp->female = 1;
|
||||||
|
else if (is_male(ptr) || ((mmflags & MM_MALE) != 0 && maleok))
|
||||||
|
mtmp->female = 0;
|
||||||
|
|
||||||
/* leader and nemesis gender is usually hardcoded in mons[],
|
/* leader and nemesis gender is usually hardcoded in mons[],
|
||||||
but for ones which can be random, it has already been chosen
|
but for ones which can be random, it has already been chosen
|
||||||
(in role_init(), for possible use by the quest pager code) */
|
(in role_init(), for possible use by the quest pager code) */
|
||||||
@@ -1241,8 +1245,12 @@ makemon(
|
|||||||
mtmp->female = g.quest_status.ldrgend;
|
mtmp->female = g.quest_status.ldrgend;
|
||||||
else if (ptr->msound == MS_NEMESIS && quest_info(MS_NEMESIS) == mndx)
|
else if (ptr->msound == MS_NEMESIS && quest_info(MS_NEMESIS) == mndx)
|
||||||
mtmp->female = g.quest_status.nemgend;
|
mtmp->female = g.quest_status.nemgend;
|
||||||
|
|
||||||
|
/* female used to be set randomly here even for neuters on the
|
||||||
|
grounds that it was ignored, but after corpses were changed to
|
||||||
|
retain gender it matters because it affects stacking of corpses */
|
||||||
else
|
else
|
||||||
mtmp->female = rn2(2); /* ignored for neuters */
|
mtmp->female = femaleok ? rn2(2) : 0;
|
||||||
|
|
||||||
if (In_sokoban(&u.uz) && !mindless(ptr)) /* know about traps here */
|
if (In_sokoban(&u.uz) && !mindless(ptr)) /* know about traps here */
|
||||||
mtmp->mtrapseen = (1L << (PIT - 1)) | (1L << (HOLE - 1));
|
mtmp->mtrapseen = (1L << (PIT - 1)) | (1L << (HOLE - 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user