Check whether steed will slip on ice if mounted

If riding over ice, check whether the steed, rather than the hero, is
cold-resistant or floating to determine whether it should slip, since it
is the monster which would actually be in contact with the ice.
This commit is contained in:
Michael Meyer
2023-12-04 14:48:27 -05:00
parent a15d517326
commit 986c8e7ff4

View File

@@ -2142,12 +2142,13 @@ static void
slippery_ice_fumbling(void)
{
boolean on_ice = !Levitation && is_ice(u.ux, u.uy);
struct monst *iceskater = u.usteed ? u.usteed : &gy.youmonst;
if (on_ice) {
if ((uarmf && objdescr_is(uarmf, "snow boots"))
|| resists_cold(&gy.youmonst) || Flying
|| is_floater(gy.youmonst.data) || is_clinger(gy.youmonst.data)
|| is_whirly(gy.youmonst.data)) {
|| resists_cold(iceskater) || Flying
|| is_floater(iceskater->data) || is_clinger(iceskater->data)
|| is_whirly(iceskater->data)) {
on_ice = FALSE;
} else if (!rn2(Cold_resistance ? 3 : 2)) {
HFumbling |= FROMOUTSIDE;