From c40d876c3be22adaa5d22c0cb670bbaf7b9b81a3 Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 21 Jan 2005 22:27:19 +0000 Subject: [PATCH] U1258 - removing ring of levitation while riding a flying steed As reported, you'd get the "float gently to the ground" message even while riding a flying steed. Rearranged the code and added a new case for this. I found it odd that Hallucination protected you from falling out of the saddle due to the Sokoban air currents. The message implied otherwise, so I've made the sokoban_trap code apply in both cases. --- doc/fixes35.0 | 1 + src/trap.c | 48 +++++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 9e9d5026b..b99dcd2e9 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -77,6 +77,7 @@ message order when swapping places with a pet (e.g. into a trap), also use different term instead of "displace" flyers can get out of pits more easily than non-flyers allow use of the < command to try to exit a pit +clean up messages when you stop levitation while riding a flying steed Platform- and/or Interface-Specific Fixes diff --git a/src/trap.c b/src/trap.c index eba7888e2..c5059094c 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2447,32 +2447,34 @@ long hmask, emask; /* might cancel timeout */ if (!(emask & W_SADDLE)) #endif { - boolean sokoban_trap = (In_sokoban(&u.uz) && trap); - if (Hallucination) - pline("Bummer! You've %s.", - is_pool(u.ux,u.uy) ? - "splashed down" : sokoban_trap ? "crashed" : - "hit the ground"); - else { - if (!sokoban_trap) - You("float gently to the %s.", - surface(u.ux, u.uy)); - else { - /* Justification elsewhere for Sokoban traps - * is based on air currents. This is - * consistent with that. - * The unexpected additional force of the - * air currents once leviation - * ceases knocks you off your feet. - */ + if (In_sokoban(&u.uz) && trap) { + /* Justification elsewhere for Sokoban traps + * is based on air currents. This is + * consistent with that. + * The unexpected additional force of the + * air currents once leviation + * ceases knocks you off your feet. + */ + if (Hallucination) + pline("Bummer! You've crashed."); + else You("fall over."); - losehp(rnd(2), "dangerous winds", KILLED_BY); + losehp(rnd(2), "dangerous winds", KILLED_BY); #ifdef STEED - if (u.usteed) dismount_steed(DISMOUNT_FELL); + if (u.usteed) dismount_steed(DISMOUNT_FELL); #endif - selftouch("As you fall, you"); - } - } + selftouch("As you fall, you"); +#ifdef STEED + } else if (u.usteed && (is_floater(u.usteed->data) || + is_flyer(u.usteed->data))) { + You("settle more firmly in the saddle."); +#endif + } else if (Hallucination) + pline("Bummer! You've %s.", + is_pool(u.ux,u.uy) ? "splashed down" : + "hit the ground"); + else + You("float gently to the %s.", surface(u.ux, u.uy)); } } }