Add a macro to provide universal consistency around the check

for what sort of creatures tend to revive.
This commit is contained in:
nethack.allison
2002-01-26 15:05:00 +00:00
parent 5482d1ab74
commit 69ce21fe0b
3 changed files with 5 additions and 5 deletions

View File

@@ -129,6 +129,9 @@
(ptr) == &mons[PM_GIANT] || \
(ptr) == &mons[PM_ELF] || \
(ptr) == &mons[PM_HUMAN])
/* return TRUE if the monster tends to revive */
#define is_reviver(ptr) (is_rider(ptr) || (ptr)->mlet == S_TROLL)
/* this returns the light's range, or 0 if none; if we add more light emitting
monsters, we'll likely have to add a new light range field to mons[] */
#define emits_light(ptr) (((ptr)->mlet == S_LIGHT || \