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
This commit is contained in:
cohrs
2004-03-26 19:26:37 +00:00
parent 607f63e5fd
commit 019837d03f
2 changed files with 4 additions and 0 deletions

View 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;