Describe engulf attacks a bit more consistently

Use verbiage for mon vs mon and hero (mostly hero) engulf attacks that
matches recent changes to monster vs hero engulf attacks more closely
(e.g. "swallows whole" instead of "engulfs" for purple worm, other
changes in b07fe59...).  Also ensure non-AD_DGST engulf attacks
(e.g. from revamped trapper or lurker above polyforms) aren't treated as
"eating" (or as involving "debris").

Also change the enfolds and digests macros so they produce booleans
rather than attack pointers (I got a compiler warning about casting
struct attack * to boolean when I did 'boolean b = digests(ptr);').
This commit is contained in:
Michael Meyer
2022-08-24 13:08:46 -04:00
committed by PatR
parent 0145a020c1
commit 34aabca74b
3 changed files with 32 additions and 16 deletions

View File

@@ -86,8 +86,10 @@
#define is_wooden(ptr) ((ptr) == &mons[PM_WOOD_GOLEM])
#define thick_skinned(ptr) (((ptr)->mflags1 & M1_THICK_HIDE) != 0L)
#define hug_throttles(ptr) ((ptr) == &mons[PM_ROPE_GOLEM])
#define digests(ptr) dmgtype_fromattack((ptr), AD_DGST, AT_ENGL) /* purple w*/
#define enfolds(ptr) dmgtype_fromattack((ptr), AD_WRAP, AT_ENGL) /* 't' */
#define digests(ptr) \
(dmgtype_fromattack((ptr), AD_DGST, AT_ENGL) != 0) /* purple w*/
#define enfolds(ptr) \
(dmgtype_fromattack((ptr), AD_WRAP, AT_ENGL) != 0) /* 't' */
#define slimeproof(ptr) \
((ptr) == &mons[PM_GREEN_SLIME] || flaming(ptr) || noncorporeal(ptr))
#define lays_eggs(ptr) (((ptr)->mflags1 & M1_OVIPAROUS) != 0L)