fix github issue #531 - genderless corpses

Dead monsters that had traits saved with the corpse would revive as
the same gender, but ordinary corpses revived with random gender so
could be different from before they got killed.

Since corpses of monsters lacked gender, those for monsters with
gender-specific names were described by the neuter name.

This is a fairly big change for a fairly minor problem and needs a
lot more testing.

Fixes #531
This commit is contained in:
PatR
2021-06-08 03:43:46 -07:00
parent 14b2330fd6
commit 04a8ddcce1
12 changed files with 121 additions and 66 deletions

View File

@@ -55,10 +55,8 @@ struct obj {
* candy bar wrapper index;
* scroll of mail (normal==0, bones or wishing==1, written==2);
* splash of venom (normal==0, wishing==1);
* historic flag and gender for statues */
#define STATUE_HISTORIC 0x01
#define STATUE_MALE 0x02
#define STATUE_FEMALE 0x04
* gender for corpses and statues (0..3, CORPSTAT_GENDER),
* historic flag (4, CORPSTAT_HISTORIC) for statues */
char oclass; /* object class */
char invlet; /* designation in inventory */
char oartifact; /* artifact array index */