E boolean FDECL(is_pool, (int,int));
E boolean FDECL(is_lava, (int,int));
+E boolean FDECL(is_pool_or_lava, (int,int));
E boolean FDECL(is_ice, (int,int));
E int FDECL(is_drawbridge_wall, (int,int));
E boolean FDECL(is_db_wall, (int,int));
return FALSE;
}
+boolean
+is_pool_or_lava(x,y)
+int x,y;
+{
+ if (is_pool(x,y) || is_lava(x,y))
+ return TRUE;
+ else
+ return FALSE;
+}
+
boolean
is_ice(x,y)
int x,y;
} else if (madeby == BY_OBJECT &&
/* the block against existing traps is mainly to
prevent broken wands from turning holes into pits */
- (ttmp || is_pool(x,y) || is_lava(x,y))) {
+ (ttmp || is_pool_or_lava(x,y))) {
/* digging by player handles pools separately */
return FALSE;
}
surface(dig_x,dig_y),
(dig_x != u.ux || dig_y != u.uy) ? "t" : "");
- } else if (is_pool(dig_x, dig_y) || is_lava(dig_x, dig_y)) {
+ } else if (is_pool_or_lava(dig_x, dig_y)) {
pline_The("%s sloshes furiously for a moment, then subsides.",
is_lava(dig_x, dig_y) ? "lava" : "water");
wake_nearby(); /* splashing */
You("swing %s through thin air.", yobjnam(obj, (char *)0));
} else if (!can_reach_floor(FALSE)) {
cant_reach_floor(u.ux, u.uy, FALSE, FALSE);
- } else if (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) {
+ } else if (is_pool_or_lava(u.ux, u.uy)) {
/* Monsters which swim also happen not to be able to dig */
You("cannot stay under%s long enough.",
is_pool(u.ux, u.uy) ? "water" : " the lava");
{
if (!otmp || otmp->otyp != BOULDER)
impossible("Not a boulder?");
- else if (!Is_waterlevel(&u.uz) && (is_pool(rx,ry) || is_lava(rx,ry))) {
+ else if (!Is_waterlevel(&u.uz) && is_pool_or_lava(rx,ry)) {
boolean lava = is_lava(rx,ry), fills_up;
const char *what = waterbody_name(rx,ry);
schar ltyp = levl[rx][ry].typ;
#ifdef STEED
(feeding && u.usteed) || /* can't eat off floor while riding */
#endif
- ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) &&
+ (is_pool_or_lava(u.ux, u.uy) &&
(Wwalking || is_clinger(youmonst.data) ||
(Flying && !Breathless))))
goto skipfloor;
if ((t && t->tseen) ||
(!Levitation && !Flying &&
!is_clinger(youmonst.data) &&
- (is_pool(x, y) || is_lava(x, y)) && levl[x][y].seenv))
+ is_pool_or_lava(x, y) && levl[x][y].seenv))
return FALSE;
}
if (((trap = t_at(x, y)) && trap->tseen) ||
(Blind && !Levitation && !Flying &&
!is_clinger(youmonst.data) &&
- (is_pool(x, y) || is_lava(x, y)) && levl[x][y].seenv)) {
+ is_pool_or_lava(x, y) && levl[x][y].seenv)) {
if(context.run >= 2) {
nomul(0);
context.move = 0;
/* check for entering water or lava */
if (!u.ustuck && !Levitation && !Flying &&
- (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy))) {
+ is_pool_or_lava(u.ux, u.uy)) {
#ifdef STEED
if (u.usteed && (is_flyer(u.usteed->data) ||
is_floater(u.usteed->data) || is_clinger(u.usteed->data))) {
if(context.run == 1) goto bcorr; /* if you must */
if(x == u.ux+u.dx && y == u.uy+u.dy) goto stop;
continue;
- } else if (is_pool(x,y) || is_lava(x,y)) {
+ } else if (is_pool_or_lava(x,y)) {
/* water and lava only stop you if directly in front, and stop
* you even if you are running
*/
}
check_strangling(TRUE);
- if(!Levitation && !u.ustuck &&
- (is_pool(u.ux,u.uy) || is_lava(u.ux,u.uy)))
+ if(!Levitation && !u.ustuck && is_pool_or_lava(u.ux,u.uy))
spoteffects(TRUE);
see_monsters();
}
find_ac();
if((!Levitation && !u.ustuck && !Flying &&
- (is_pool(u.ux,u.uy) || is_lava(u.ux,u.uy))) ||
+ is_pool_or_lava(u.ux,u.uy)) ||
(Underwater && !Swimming))
spoteffects(TRUE);
if (Passes_walls && u.utrap &&
cc.x = x; cc.y = y;
/* Prevent boulder from being placed on water */
if (ttmp->ttyp == ROLLING_BOULDER_TRAP
- && is_pool(x+distance*dx,y+distance*dy))
+ && is_pool_or_lava(x+distance*dx,y+distance*dy))
success = FALSE;
else success = isclearpath(&cc, distance, dx, dy);
if (ttmp->ttyp == ROLLING_BOULDER_TRAP) {