couple of is_clinger bits

The grounded() macro wasn't fully handling is_clinger().  Not sure
what impact this fix will have.

Add ability to cling to the ceiling to enlightenment feedback.  If
it gets fixed up to a state where it is useable while polymorphed,
some or all of it should be moved to non-magic ^X feedback.
This commit is contained in:
PatR
2022-05-27 15:28:49 -07:00
parent 5c1e22b337
commit 01f3be9a7c
2 changed files with 20 additions and 3 deletions

View File

@@ -38,7 +38,8 @@
#define is_floater(ptr) ((ptr)->mlet == S_EYE || (ptr)->mlet == S_LIGHT)
/* clinger: piercers, mimics, wumpus -- generally don't fall down holes */
#define is_clinger(ptr) (((ptr)->mflags1 & M1_CLING) != 0L)
#define grounded(ptr) (!is_flyer(ptr) && !is_floater(ptr) && !is_clinger(ptr))
#define grounded(ptr) (!is_flyer(ptr) && !is_floater(ptr) \
&& (!is_clinger(ptr) || !has_ceiling(&u.uz)))
#define is_swimmer(ptr) (((ptr)->mflags1 & M1_SWIM) != 0L)
#define breathless(ptr) (((ptr)->mflags1 & M1_BREATHLESS) != 0L)
#define amphibious(ptr) \