From 05f9950c998e8e0f162d1f84ba8f59fd6a0b4430 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 4 Dec 2023 13:07:43 -0500 Subject: [PATCH 1/3] Fix: fumbling vs losing footing in earthquake Fumbling was apparently meant to make it harder to keep your footing when an earthquake created a pit under you, requiring a 1/5 roll to stay upright, but because it was added as an additional OR it actually just gave the hero an additional (albeit unlikely) chance to retain her footing. Make it actually have a negative impact on the hero's ability to retain his footing rather than a minor boost. --- src/music.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/music.c b/src/music.c index ff667e03c..045e6e839 100644 --- a/src/music.c +++ b/src/music.c @@ -415,9 +415,9 @@ do_earthquake(int force) selftouch("Falling, you"); } else if (u.utrap && u.utraptype == TT_PIT) { boolean keepfooting = - ((Fumbling && !rn2(5)) - || (!rnl(Role_if(PM_ARCHEOLOGIST) ? 3 : 9)) - || ((ACURR(A_DEX) > 7) && rn2(5))); + (!(Fumbling && rn2(5)) + && (!(rnl(Role_if(PM_ARCHEOLOGIST) ? 3 : 9)) + || ((ACURR(A_DEX) > 7) && rn2(5)))); You("are jostled around violently!"); set_utrap(rn1(6, 2), TT_PIT); From a15d5173260f728e9a9c24e8231f0edfd539138a Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 4 Dec 2023 14:40:16 -0500 Subject: [PATCH 2/3] Refine ice fumbling effects vs mounted hero Fumbling makes the hero fall from the saddle, but the justification was weak if the only fumbling source is riding over ice (the messages were things like "you drop the reins" which made more sense from magical fumbling). Make all fumbling from ice alone go into the ice-specific "slip on the ice" block and add a chance to fall from your mount there. If fumbling from another source while riding on ice, the hero will always fall from his steed, since that's what happens on normal floor -- ice had actually been reducing this chance. --- src/timeout.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/timeout.c b/src/timeout.c index 36dd27076..dee2509f7 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1175,14 +1175,23 @@ slip_or_trip(void) an(mons[otmp->corpsenm].pmnames[NEUTRAL])); instapetrify(gk.killer.name); } - } else if (rn2(3) && is_ice(u.ux, u.uy)) { + } else if ((HFumbling & FROMOUTSIDE) || (is_ice(u.ux, u.uy) && !rn2(3))) { + /* is fumbling from ice alone? */ + boolean ice_only = !(EFumbling || (HFumbling & ~FROMOUTSIDE)); + pline("%s %s%s on the ice.", - u.usteed ? upstart(x_monnam(u.usteed, - (has_mgivenname(u.usteed)) ? ARTICLE_NONE - : ARTICLE_THE, - (char *) 0, SUPPRESS_SADDLE, FALSE)) + u.usteed ? upstart(x_monnam(u.usteed, ARTICLE_THE, (char *) 0, + SUPPRESS_SADDLE, FALSE)) : "You", rn2(2) ? "slip" : "slide", on_foot ? "" : "s"); + /* fumbling outside of ice while mounted always causes the hero to + fall from the saddle, so to avoid a counterintuitive effect where + ice makes riding _less_ hazardous, unconditionally dismount if + fumbling is from a non-ice source */ + if (!on_foot && (!ice_only || !rn2(3))) { + You("lose your balance."); + dismount_steed(DISMOUNT_FELL); + } } else { if (on_foot) { switch (rn2(4)) { From 986c8e7ff4208505e68d1752bb1a3019fcac5acf Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 4 Dec 2023 14:48:27 -0500 Subject: [PATCH 3/3] 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. --- src/hack.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hack.c b/src/hack.c index 4b9bc0c6c..92914e172 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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;