does water disturb the movement? */
| 2362 | |
| 2363 | /* does water disturb the movement? */ |
| 2364 | staticfn boolean |
| 2365 | water_turbulence(coordxy *x, coordxy *y) |
| 2366 | { |
| 2367 | if (u.uinwater) { |
| 2368 | int wtcap; |
| 2369 | int wtmod = (Swimming ? MOD_ENCUMBER : SLT_ENCUMBER); |
| 2370 | |
| 2371 | water_friction(); |
| 2372 | if (!u.dx && !u.dy) { |
| 2373 | nomul(0); |
| 2374 | return TRUE; |
| 2375 | } |
| 2376 | *x = u.ux + u.dx; |
| 2377 | *y = u.uy + u.dy; |
| 2378 | |
| 2379 | /* are we trying to move out of water while carrying too much? */ |
| 2380 | if (isok(*x, *y) && !is_pool(*x, *y) && !Is_waterlevel(&u.uz) |
| 2381 | && (wtcap = near_capacity()) > wtmod) { |
| 2382 | /* when escaping from drowning you need to be unencumbered |
| 2383 | in order to crawl out of water, but when not drowning, |
| 2384 | doing so while encumbered is feasible; if in an aquatic |
| 2385 | form, stressed or less is allowed; otherwise (magical |
| 2386 | breathing), only burdened is allowed */ |
| 2387 | You("are carrying too much to climb out of the water."); |
| 2388 | nomul(0); |
| 2389 | return TRUE; |
| 2390 | } |
| 2391 | } |
| 2392 | return FALSE; |
| 2393 | } |
| 2394 | |
| 2395 | staticfn void |
| 2396 | slippery_ice_fumbling(void) |
no test coverage detected