]> granicus.if.org Git - nethack/commitdiff
U897: kicking while in the air
authorcohrs <cohrs>
Fri, 26 Mar 2004 19:26:37 +0000 (19:26 +0000)
committercohrs <cohrs>
Fri, 26 Mar 2004 19:26:37 +0000 (19:26 +0000)
If you kick something while in the air (i.e. on the Air level or while
in a bubble on the water level), 1) greased objects were treated specially
and 2) messages were given about the object sliding.
- add checks for kicking in the air, and always increased distance a bit
(I didn't add any checks to deal with the transition from air to water or
visa versa)
- don't set the flag that causes the "slides" message in these cases either

doc/fixes35.0
src/dokick.c

index 85d4d7ac408dd2ca4ec0ba220702032da5b8a01e..dd8235f787063636fd7d28a7b93cf9107d1de660 100644 (file)
@@ -61,6 +61,7 @@ sync default documentation of "null" option with the code
 tripping over a cockatrice corpse didn't petrify, even when not wearing boots
 do not call swamps on the Juiblex level "moat" when freezing
 keep score from wrapping around and becoming negative by capping it
+kicked objects do not slide when on the air or water levels
 
 
 Platform- and/or Interface-Specific Fixes
index 3beb64c4a03b19b3489cd5c78906369ee523c54e..cb9fc9517d1a78d8828e8a9ffcc765fbb04c2f5d 100644 (file)
@@ -454,6 +454,9 @@ xchar x, y;
        if (is_pool(x, y)) {
            /* you're in the water too; significantly reduce range */
            range = range / 3 + 1;      /* {1,2}=>1, {3,4,5}=>2, {6,7,8}=>3 */
+       } else if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) {
+           /* you're in air, since is_pool did not match */
+           range + rnd(3);
        } else {
            if (is_ice(x, y)) range += rnd(3),  slide = TRUE;
            if (kickobj->greased) range += rnd(3),  slide = TRUE;