This is a followup to the patch I made a couple months ago. It replaces
the "!Levitation && !u.uswallow" checks with can_reach_floor(), which
makes a more complete set of checks and is more consistent. I applied
this to fountains too. I doubt that fountains hit the ceiling, and the
checks also seem reasonable for heights in between (e.g. while mounted).
return 0;
}
/* Is there a fountain to drink from here? */
- if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) {
+ if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && can_reach_floor()) {
if(yn("Drink from the fountain?") == 'y') {
drinkfountain();
return 1;
}
#ifdef SINKS
/* Or a kitchen sink? */
- if (IS_SINK(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) {
+ if (IS_SINK(levl[u.ux][u.uy].typ) && can_reach_floor()) {
if (yn("Drink from the sink?") == 'y') {
drinksink();
return 1;