print a message about being back on the ground after leaving a pool */
| 4973 | |
| 4974 | /* print a message about being back on the ground after leaving a pool */ |
| 4975 | void |
| 4976 | back_on_ground(boolean rescued) |
| 4977 | { |
| 4978 | const char *preposit = (Levitation || Flying) ? "over" : "on", |
| 4979 | *surf = surface(u.ux, u.uy), *you_are_back; |
| 4980 | char icebuf[QBUFSZ]; |
| 4981 | |
| 4982 | if (is_ice(u.ux, u.uy)) { |
| 4983 | /* "on ice" */ |
| 4984 | surf = ice_descr(u.ux, u.uy, icebuf); |
| 4985 | } else if (!strcmpi(surf, "floor") || !strcmpi(surf, "ground")) { |
| 4986 | /* "on solid ground" */ |
| 4987 | surf = "solid ground"; |
| 4988 | } else if (!strcmpi(surf, "bridge") || !strcmpi(surf, "altar") |
| 4989 | || !strcmpi(surf, "headstone")) { |
| 4990 | /* "on a bridge" */ |
| 4991 | surf = an(surf); |
| 4992 | } else if (!strcmpi(surf, "stairs") || !strcmpi(surf, "lava") |
| 4993 | || !strcmpi(surf, "bottom")) { |
| 4994 | /* "on the stairs" */ |
| 4995 | surf = the(surf); |
| 4996 | } else { /* "cloud", "air", "air bubble", "wall", "fountain", "doorway" */ |
| 4997 | /* "in a cloud", "in the air" */ |
| 4998 | surf = !strcmp(surf, "air") ? the(surf) : an(surf); |
| 4999 | preposit = "in"; |
| 5000 | } |
| 5001 | if (rescued) { |
| 5002 | you_are_back = "You find yourself"; |
| 5003 | } else { |
| 5004 | you_are_back = flags.verbose ? "You are back" : "Back"; |
| 5005 | } |
| 5006 | pline("%s %s %s.", you_are_back, preposit, surf); |
| 5007 | iflags.last_msg = PLNMSG_BACK_ON_GROUND; |
| 5008 | } |
| 5009 | |
| 5010 | /* life-saving or divine rescue has attempted to get the hero out of hostile |
| 5011 | terrain and put hero in an unexpected spot or failed due to overfull level |