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:
+2
-1
@@ -38,7 +38,8 @@
|
|||||||
#define is_floater(ptr) ((ptr)->mlet == S_EYE || (ptr)->mlet == S_LIGHT)
|
#define is_floater(ptr) ((ptr)->mlet == S_EYE || (ptr)->mlet == S_LIGHT)
|
||||||
/* clinger: piercers, mimics, wumpus -- generally don't fall down holes */
|
/* clinger: piercers, mimics, wumpus -- generally don't fall down holes */
|
||||||
#define is_clinger(ptr) (((ptr)->mflags1 & M1_CLING) != 0L)
|
#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 is_swimmer(ptr) (((ptr)->mflags1 & M1_SWIM) != 0L)
|
||||||
#define breathless(ptr) (((ptr)->mflags1 & M1_BREATHLESS) != 0L)
|
#define breathless(ptr) (((ptr)->mflags1 & M1_BREATHLESS) != 0L)
|
||||||
#define amphibious(ptr) \
|
#define amphibious(ptr) \
|
||||||
|
|||||||
+18
-2
@@ -199,8 +199,7 @@ walking_on_water(void)
|
|||||||
{
|
{
|
||||||
if (u.uinwater || Levitation || Flying)
|
if (u.uinwater || Levitation || Flying)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return (boolean) (Wwalking
|
return (boolean) (Wwalking && is_pool_or_lava(u.ux, u.uy));
|
||||||
&& (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* describe u.utraptype; used by status_enlightenment() and self_lookat() */
|
/* describe u.utraptype; used by status_enlightenment() and self_lookat() */
|
||||||
@@ -1643,6 +1642,23 @@ attributes_enlightenment(int unused_mode UNUSED, int final)
|
|||||||
}
|
}
|
||||||
BFlying = save_BFly;
|
BFlying = save_BFly;
|
||||||
}
|
}
|
||||||
|
/* including this might bring attention to the fact that ceiling
|
||||||
|
clinging has inconsistencies... */
|
||||||
|
if (is_clinger(g.youmonst.data)) {
|
||||||
|
boolean has_lid = has_ceiling(&u.uz);
|
||||||
|
|
||||||
|
if (has_lid && !u.uinwater) {
|
||||||
|
you_can("cling to the ceiling", "");
|
||||||
|
} else {
|
||||||
|
Sprintf(buf, " to the ceiling if %s%s%s",
|
||||||
|
!has_lid ? "there was one" : "",
|
||||||
|
(!has_lid && u.uinwater) ? " and " : "",
|
||||||
|
u.uinwater ? (Underwater ? "you weren't underwater"
|
||||||
|
: "you weren't in the water") : "");
|
||||||
|
/* past tense is applicable for death while Unchanging */
|
||||||
|
enl_msg(You_, "could cling", "could have clung", buf, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
/* actively walking on water handled earlier as a status condition */
|
/* actively walking on water handled earlier as a status condition */
|
||||||
if (Wwalking && !walking_on_water())
|
if (Wwalking && !walking_on_water())
|
||||||
you_can("walk on water", from_what(WWALKING));
|
you_can("walk on water", from_what(WWALKING));
|
||||||
|
|||||||
Reference in New Issue
Block a user