chameleon behaviour

- restore intended behaviour of kill_genocided_monsters().
  It has been incorrect since  the chameleon overhaul in June 2004.
- eliminate CHAM_ORDINARY and use NON_PM instead.
This commit is contained in:
nethack.allison
2006-03-12 04:43:28 +00:00
parent e1ef0f1042
commit 0b88609133
15 changed files with 48 additions and 51 deletions

View File

@@ -43,7 +43,6 @@ struct monst {
unsigned m_id;
short mnum; /* permanent monster index number */
short cham; /* if shapeshifter, orig mons[] idx goes here */
#define CHAM_ORDINARY 0 /* not a shapechanger */
short movement; /* movement points (derived from permonst definition and added effects */
uchar m_lev; /* adjusted difficulty level of monster */
aligntyp malign; /* alignment of this monster, relative to the

View File

@@ -210,8 +210,7 @@ struct obj {
#define MAX_EGG_HATCH_TIME 200 /* longest an egg can remain unhatched */
#define stale_egg(egg) ((monstermoves - (egg)->age) > (2*MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
#define polyfodder(obj) (ofood(obj) && \
pm_to_cham((obj)->corpsenm) != CHAM_ORDINARY)
#define polyfodder(obj) (ofood(obj) && pm_to_cham((obj)->corpsenm) != NON_PM)
#define mlevelgain(obj) (ofood(obj) && (obj)->corpsenm == PM_WRAITH)
#define mhealup(obj) (ofood(obj) && (obj)->corpsenm == PM_NURSE)