gender for figurines
Use (obj->spe & CORPSTAT_GENDER) for figurines as well as for
statues and corpses.
Support wishing for
"{female,male,neuter} {corpse,statue,figurine} [of <monster>]".
and
"{female,male,neuter} <monster> {corpse,statue,figurine}".
Also
"{corpse,statue,figurine} of {female,male,neuter} <monster>"
where the qualifier might be in the middle instead of a prefix.
This commit is contained in:
13
src/dog.c
13
src/dog.c
@@ -71,9 +71,11 @@ make_familiar(struct obj *otmp, xchar x, xchar y, boolean quietly)
|
||||
int chance, trycnt = 100;
|
||||
|
||||
do {
|
||||
if (otmp) { /* figurine; otherwise spell */
|
||||
int mndx = otmp->corpsenm;
|
||||
long mmflags;
|
||||
int cgend, mndx;
|
||||
|
||||
if (otmp) { /* figurine; otherwise spell */
|
||||
mndx = otmp->corpsenm;
|
||||
pm = &mons[mndx];
|
||||
/* activating a figurine provides one way to exceed the
|
||||
maximum number of the target critter created--unless
|
||||
@@ -97,7 +99,12 @@ make_familiar(struct obj *otmp, xchar x, xchar y, boolean quietly)
|
||||
}
|
||||
}
|
||||
|
||||
mtmp = makemon(pm, x, y, MM_EDOG | MM_IGNOREWATER | NO_MINVENT);
|
||||
mmflags = MM_EDOG | MM_IGNOREWATER | NO_MINVENT;
|
||||
cgend = otmp ? (otmp->spe & CORPSTAT_GENDER) : 0;
|
||||
mmflags |= ((cgend == CORPSTAT_FEMALE) ? MM_FEMALE
|
||||
: (cgend == CORPSTAT_MALE) ? MM_MALE : 0L);
|
||||
|
||||
mtmp = makemon(pm, x, y, mmflags);
|
||||
if (otmp && !mtmp) { /* monster was genocided or square occupied */
|
||||
if (!quietly)
|
||||
pline_The("figurine writhes and then shatters into pieces!");
|
||||
|
||||
Reference in New Issue
Block a user