From 019837d03f7a888781d85102da99996ea070fdef Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 26 Mar 2004 19:26:37 +0000 Subject: [PATCH] U897: kicking while in the air 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 | 1 + src/dokick.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 85d4d7ac4..dd8235f78 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 diff --git a/src/dokick.c b/src/dokick.c index 3beb64c4a..cb9fc9517 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -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;