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:
PatR
2021-06-17 16:03:45 -07:00
parent 0aaafd19be
commit 0b5a112b0c
5 changed files with 76 additions and 15 deletions

View File

@@ -1055,6 +1055,14 @@ mksobj(int otyp, boolean init, boolean artif)
case FIGURINE:
if (otmp->corpsenm == NON_PM)
otmp->corpsenm = rndmonnum();
if (otmp->corpsenm != NON_PM) {
struct permonst *ptr = &mons[otmp->corpsenm];
otmp->spe = (is_neuter(ptr) ? CORPSTAT_NEUTER
: is_female(ptr) ? CORPSTAT_FEMALE
: is_male(ptr) ? CORPSTAT_MALE
: rn2(2) ? CORPSTAT_FEMALE : CORPSTAT_MALE);
}
/*FALLTHRU*/
case EGG:
/* case TIN: */