]> granicus.if.org Git - nethack/commitdiff
U1258 - removing ring of levitation while riding a flying steed
authorcohrs <cohrs>
Fri, 21 Jan 2005 22:27:19 +0000 (22:27 +0000)
committercohrs <cohrs>
Fri, 21 Jan 2005 22:27:19 +0000 (22:27 +0000)
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
src/trap.c

index 9e9d5026b160169dae71876d226f00b87d1a90d9..b99dcd2e98fa32e0415d0915f6ac60677e9fccdb 100644 (file)
@@ -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
index eba7888e26da87fe96a5632b26945aa8a28a58d8..c5059094c641c163b42edd6a106c68221a13d572 100644 (file)
@@ -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));
                }
            }
        }