Source:NetHack 3.6.0/src/fountain.c

From NetHackWiki
Jump to: navigation, search

Below is the full text to fountain.c from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/src/fountain.c#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

Top of file

  1.  /* NetHack 3.6	fountain.c	$NHDT-Date: 1444937416 2015/10/15 19:30:16 $  $NHDT-Branch: master $:$NHDT-Revision: 1.55 $ */
  2.  /*	Copyright Scott R. Turner, srt@ucla, 10/27/86 */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  /* Code for drinking from fountains. */
  6.  
  7.  #include "hack.h"
  8.  
  9.  STATIC_DCL void NDECL(dowatersnakes);
  10.  STATIC_DCL void NDECL(dowaterdemon);
  11.  STATIC_DCL void NDECL(dowaternymph);
  12.  STATIC_PTR void FDECL(gush, (int, int, genericptr_t));
  13.  STATIC_DCL void NDECL(dofindgem);
  14.  

floating_above

  1.  /* used when trying to dip in or drink from fountain or sink or pool while
  2.     levitating above it, or when trying to move downwards in that state */
  3.  void
  4.  floating_above(what)
  5.  const char *what;
  6.  {
  7.      const char *umsg = "are floating high above the %s.";
  8.  
  9.      if (u.utrap && (u.utraptype == TT_INFLOOR || u.utraptype == TT_LAVA)) {
  10.          /* when stuck in floor (not possible at fountain or sink location,
  11.             so must be attempting to move down), override the usual message */
  12.          umsg = "are trapped in the %s.";
  13.          what = surface(u.ux, u.uy); /* probably redundant */
  14.      }
  15.      You(umsg, what);
  16.  }
  17.  

dowatersnakes

  1.  /* Fountain of snakes! */
  2.  STATIC_OVL void
  3.  dowatersnakes()
  4.  {
  5.      register int num = rn1(5, 2);
  6.      struct monst *mtmp;
  7.  
  8.      if (!(mvitals[PM_WATER_MOCCASIN].mvflags & G_GONE)) {
  9.          if (!Blind)
  10.              pline("An endless stream of %s pours forth!",
  11.                    Hallucination ? makeplural(rndmonnam(NULL)) : "snakes");
  12.          else
  13.              You_hear("%s hissing!", something);
  14.          while (num-- > 0)
  15.              if ((mtmp = makemon(&mons[PM_WATER_MOCCASIN], u.ux, u.uy,
  16.                                  NO_MM_FLAGS)) != 0
  17.                  && t_at(mtmp->mx, mtmp->my))
  18.                  (void) mintrap(mtmp);
  19.      } else
  20.          pline_The("fountain bubbles furiously for a moment, then calms.");
  21.  }
  22.  

dowaterdemon

  1.  /* Water demon */
  2.  STATIC_OVL void
  3.  dowaterdemon()
  4.  {
  5.      struct monst *mtmp;
  6.  
  7.      if (!(mvitals[PM_WATER_DEMON].mvflags & G_GONE)) {
  8.          if ((mtmp = makemon(&mons[PM_WATER_DEMON], u.ux, u.uy,
  9.                              NO_MM_FLAGS)) != 0) {
  10.              if (!Blind)
  11.                  You("unleash %s!", a_monnam(mtmp));
  12.              else
  13.                  You_feel("the presence of evil.");
  14.  
  15.              /* Give those on low levels a (slightly) better chance of survival
  16.               */
  17.              if (rnd(100) > (80 + level_difficulty())) {
  18.                  pline("Grateful for %s release, %s grants you a wish!",
  19.                        mhis(mtmp), mhe(mtmp));
  20.                  /* give a wish and discard the monster (mtmp set to null) */
  21.                  mongrantswish(&mtmp);
  22.              } else if (t_at(mtmp->mx, mtmp->my))
  23.                  (void) mintrap(mtmp);
  24.          }
  25.      } else
  26.          pline_The("fountain bubbles furiously for a moment, then calms.");
  27.  }
  28.  

dowaternymph

  1.  /* Water Nymph */
  2.  STATIC_OVL void
  3.  dowaternymph()
  4.  {
  5.      register struct monst *mtmp;
  6.  
  7.      if (!(mvitals[PM_WATER_NYMPH].mvflags & G_GONE)
  8.          && (mtmp = makemon(&mons[PM_WATER_NYMPH], u.ux, u.uy,
  9.                             NO_MM_FLAGS)) != 0) {
  10.          if (!Blind)
  11.              You("attract %s!", a_monnam(mtmp));
  12.          else
  13.              You_hear("a seductive voice.");
  14.          mtmp->msleeping = 0;
  15.          if (t_at(mtmp->mx, mtmp->my))
  16.              (void) mintrap(mtmp);
  17.      } else if (!Blind)
  18.          pline("A large bubble rises to the surface and pops.");
  19.      else
  20.          You_hear("a loud pop.");
  21.  }
  22.  

dogushforth

  1.  /* Gushing forth along LOS from (u.ux, u.uy) */
  2.  void
  3.  dogushforth(drinking)
  4.  int drinking;
  5.  {
  6.      int madepool = 0;
  7.  
  8.      do_clear_area(u.ux, u.uy, 7, gush, (genericptr_t) &madepool);
  9.      if (!madepool) {
  10.          if (drinking)
  11.              Your("thirst is quenched.");
  12.          else
  13.              pline("Water sprays all over you.");
  14.      }
  15.  }
  16.  

gush

  1.  STATIC_PTR void
  2.  gush(x, y, poolcnt)
  3.  int x, y;
  4.  genericptr_t poolcnt;
  5.  {
  6.      register struct monst *mtmp;
  7.      register struct trap *ttmp;
  8.  
  9.      if (((x + y) % 2) || (x == u.ux && y == u.uy)
  10.          || (rn2(1 + distmin(u.ux, u.uy, x, y))) || (levl[x][y].typ != ROOM)
  11.          || (sobj_at(BOULDER, x, y)) || nexttodoor(x, y))
  12.          return;
  13.  
  14.      if ((ttmp = t_at(x, y)) != 0 && !delfloortrap(ttmp))
  15.          return;
  16.  
  17.      if (!((*(int *) poolcnt)++))
  18.          pline("Water gushes forth from the overflowing fountain!");
  19.  
  20.      /* Put a pool at x, y */
  21.      levl[x][y].typ = POOL;
  22.      /* No kelp! */
  23.      del_engr_at(x, y);
  24.      water_damage_chain(level.objects[x][y], TRUE);
  25.  
  26.      if ((mtmp = m_at(x, y)) != 0)
  27.          (void) minliquid(mtmp);
  28.      else
  29.          newsym(x, y);
  30.  }
  31.  

dofindgem

  1.  /* Find a gem in the sparkling waters. */
  2.  STATIC_OVL void
  3.  dofindgem()
  4.  {
  5.      if (!Blind)
  6.          You("spot a gem in the sparkling waters!");
  7.      else
  8.          You_feel("a gem here!");
  9.      (void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL, LUCKSTONE - 1), u.ux, u.uy,
  10.                       FALSE, FALSE);
  11.      SET_FOUNTAIN_LOOTED(u.ux, u.uy);
  12.      newsym(u.ux, u.uy);
  13.      exercise(A_WIS, TRUE); /* a discovery! */
  14.  }
  15.  

dryup

  1.  void
  2.  dryup(x, y, isyou)
  3.  xchar x, y;
  4.  boolean isyou;
  5.  {
  6.      if (IS_FOUNTAIN(levl[x][y].typ)
  7.          && (!rn2(3) || FOUNTAIN_IS_WARNED(x, y))) {
  8.          if (isyou && in_town(x, y) && !FOUNTAIN_IS_WARNED(x, y)) {
  9.              struct monst *mtmp;
  10.  
  11.              SET_FOUNTAIN_WARNED(x, y);
  12.              /* Warn about future fountain use. */
  13.              for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  14.                  if (DEADMONSTER(mtmp))
  15.                      continue;
  16.                  if (is_watch(mtmp->data) && couldsee(mtmp->mx, mtmp->my)
  17.                      && mtmp->mpeaceful) {
  18.                      pline("%s yells:", Amonnam(mtmp));
  19.                      verbalize("Hey, stop using that fountain!");
  20.                      break;
  21.                  }
  22.              }
  23.              /* You can see or hear this effect */
  24.              if (!mtmp)
  25.                  pline_The("flow reduces to a trickle.");
  26.              return;
  27.          }
  28.          if (isyou && wizard) {
  29.              if (yn("Dry up fountain?") == 'n')
  30.                  return;
  31.          }
  32.          /* replace the fountain with ordinary floor */
  33.          levl[x][y].typ = ROOM;
  34.          levl[x][y].looted = 0;
  35.          levl[x][y].blessedftn = 0;
  36.          if (cansee(x, y))
  37.              pline_The("fountain dries up!");
  38.          /* The location is seen if the hero/monster is invisible
  39.             or felt if the hero is blind. */
  40.          newsym(x, y);
  41.          level.flags.nfountains--;
  42.          if (isyou && in_town(x, y))
  43.              (void) angry_guards(FALSE);
  44.      }
  45.  }
  46.  

drinkfountain

  1.  void
  2.  drinkfountain()
  3.  {
  4.      /* What happens when you drink from a fountain? */
  5.      register boolean mgkftn = (levl[u.ux][u.uy].blessedftn == 1);
  6.      register int fate = rnd(30);
  7.  
  8.      if (Levitation) {
  9.          floating_above("fountain");
  10.          return;
  11.      }
  12.  
  13.      if (mgkftn && u.uluck >= 0 && fate >= 10) {
  14.          int i, ii, littleluck = (u.uluck < 4);
  15.  
  16.          pline("Wow!  This makes you feel great!");
  17.          /* blessed restore ability */
  18.          for (ii = 0; ii < A_MAX; ii++)
  19.              if (ABASE(ii) < AMAX(ii)) {
  20.                  ABASE(ii) = AMAX(ii);
  21.                  context.botl = 1;
  22.              }
  23.          /* gain ability, blessed if "natural" luck is high */
  24.          i = rn2(A_MAX); /* start at a random attribute */
  25.          for (ii = 0; ii < A_MAX; ii++) {
  26.              if (adjattrib(i, 1, littleluck ? -1 : 0) && littleluck)
  27.                  break;
  28.              if (++i >= A_MAX)
  29.                  i = 0;
  30.          }
  31.          display_nhwindow(WIN_MESSAGE, FALSE);
  32.          pline("A wisp of vapor escapes the fountain...");
  33.          exercise(A_WIS, TRUE);
  34.          levl[u.ux][u.uy].blessedftn = 0;
  35.          return;
  36.      }
  37.  
  38.      if (fate < 10) {
  39.          pline_The("cool draught refreshes you.");
  40.          u.uhunger += rnd(10); /* don't choke on water */
  41.          newuhs(FALSE);
  42.          if (mgkftn)
  43.              return;
  44.      } else {
  45.          switch (fate) {
  46.          case 19: /* Self-knowledge */
  47.              You_feel("self-knowledgeable...");
  48.              display_nhwindow(WIN_MESSAGE, FALSE);
  49.              enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
  50.              exercise(A_WIS, TRUE);
  51.              pline_The("feeling subsides.");
  52.              break;
  53.          case 20: /* Foul water */
  54.              pline_The("water is foul!  You gag and vomit.");
  55.              morehungry(rn1(20, 11));
  56.              vomit();
  57.              break;
  58.          case 21: /* Poisonous */
  59.              pline_The("water is contaminated!");
  60.              if (Poison_resistance) {
  61.                  pline("Perhaps it is runoff from the nearby %s farm.",
  62.                        fruitname(FALSE));
  63.                  losehp(rnd(4), "unrefrigerated sip of juice", KILLED_BY_AN);
  64.                  break;
  65.              }
  66.              losestr(rn1(4, 3));
  67.              losehp(rnd(10), "contaminated water", KILLED_BY);
  68.              exercise(A_CON, FALSE);
  69.              break;
  70.          case 22: /* Fountain of snakes! */
  71.              dowatersnakes();
  72.              break;
  73.          case 23: /* Water demon */
  74.              dowaterdemon();
  75.              break;
  76.          case 24: /* Curse an item */ {
  77.              register struct obj *obj;
  78.  
  79.              pline("This water's no good!");
  80.              morehungry(rn1(20, 11));
  81.              exercise(A_CON, FALSE);
  82.              for (obj = invent; obj; obj = obj->nobj)
  83.                  if (!rn2(5))
  84.                      curse(obj);
  85.              break;
  86.          }
  87.          case 25: /* See invisible */
  88.              if (Blind) {
  89.                  if (Invisible) {
  90.                      You("feel transparent.");
  91.                  } else {
  92.                      You("feel very self-conscious.");
  93.                      pline("Then it passes.");
  94.                  }
  95.              } else {
  96.                  You_see("an image of someone stalking you.");
  97.                  pline("But it disappears.");
  98.              }
  99.              HSee_invisible |= FROMOUTSIDE;
  100.              newsym(u.ux, u.uy);
  101.              exercise(A_WIS, TRUE);
  102.              break;
  103.          case 26: /* See Monsters */
  104.              (void) monster_detect((struct obj *) 0, 0);
  105.              exercise(A_WIS, TRUE);
  106.              break;
  107.          case 27: /* Find a gem in the sparkling waters. */
  108.              if (!FOUNTAIN_IS_LOOTED(u.ux, u.uy)) {
  109.                  dofindgem();
  110.                  break;
  111.              }
  112.          case 28: /* Water Nymph */
  113.              dowaternymph();
  114.              break;
  115.          case 29: /* Scare */
  116.          {
  117.              register struct monst *mtmp;
  118.  
  119.              pline("This water gives you bad breath!");
  120.              for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  121.                  if (DEADMONSTER(mtmp))
  122.                      continue;
  123.                  monflee(mtmp, 0, FALSE, FALSE);
  124.              }
  125.              break;
  126.          }
  127.          case 30: /* Gushing forth in this room */
  128.              dogushforth(TRUE);
  129.              break;
  130.          default:
  131.              pline("This tepid water is tasteless.");
  132.              break;
  133.          }
  134.      }
  135.      dryup(u.ux, u.uy, TRUE);
  136.  }
  137.  

dipfountain

  1.  void
  2.  dipfountain(obj)
  3.  register struct obj *obj;
  4.  {
  5.      if (Levitation) {
  6.          floating_above("fountain");
  7.          return;
  8.      }
  9.  
  10.      /* Don't grant Excalibur when there's more than one object.  */
  11.      /* (quantity could be > 1 if merged daggers got polymorphed) */
  12.      if (obj->otyp == LONG_SWORD && obj->quan == 1L && u.ulevel >= 5 && !rn2(6)
  13.          && !obj->oartifact
  14.          && !exist_artifact(LONG_SWORD, artiname(ART_EXCALIBUR))) {
  15.          if (u.ualign.type != A_LAWFUL) {
  16.              /* Ha!  Trying to cheat her. */
  17.              pline(
  18.               "A freezing mist rises from the water and envelopes the sword.");
  19.              pline_The("fountain disappears!");
  20.              curse(obj);
  21.              if (obj->spe > -6 && !rn2(3))
  22.                  obj->spe--;
  23.              obj->oerodeproof = FALSE;
  24.              exercise(A_WIS, FALSE);
  25.          } else {
  26.              /* The lady of the lake acts! - Eric Backus */
  27.              /* Be *REAL* nice */
  28.              pline(
  29.                "From the murky depths, a hand reaches up to bless the sword.");
  30.              pline("As the hand retreats, the fountain disappears!");
  31.              obj = oname(obj, artiname(ART_EXCALIBUR));
  32.              discover_artifact(ART_EXCALIBUR);
  33.              bless(obj);
  34.              obj->oeroded = obj->oeroded2 = 0;
  35.              obj->oerodeproof = TRUE;
  36.              exercise(A_WIS, TRUE);
  37.          }
  38.          update_inventory();
  39.          levl[u.ux][u.uy].typ = ROOM;
  40.          levl[u.ux][u.uy].looted = 0;
  41.          newsym(u.ux, u.uy);
  42.          level.flags.nfountains--;
  43.          if (in_town(u.ux, u.uy))
  44.              (void) angry_guards(FALSE);
  45.          return;
  46.      } else {
  47.          int er = water_damage(obj, NULL, TRUE);
  48.  
  49.          if (obj->otyp == POT_ACID
  50.              && er != ER_DESTROYED) { /* Acid and water don't mix */
  51.              useup(obj);
  52.              return;
  53.          } else if (er != ER_NOTHING && !rn2(2)) { /* no further effect */
  54.              return;
  55.          }
  56.      }
  57.  
  58.      switch (rnd(30)) {
  59.      case 16: /* Curse the item */
  60.          curse(obj);
  61.          break;
  62.      case 17:
  63.      case 18:
  64.      case 19:
  65.      case 20: /* Uncurse the item */
  66.          if (obj->cursed) {
  67.              if (!Blind)
  68.                  pline_The("water glows for a moment.");
  69.              uncurse(obj);
  70.          } else {
  71.              pline("A feeling of loss comes over you.");
  72.          }
  73.          break;
  74.      case 21: /* Water Demon */
  75.          dowaterdemon();
  76.          break;
  77.      case 22: /* Water Nymph */
  78.          dowaternymph();
  79.          break;
  80.      case 23: /* an Endless Stream of Snakes */
  81.          dowatersnakes();
  82.          break;
  83.      case 24: /* Find a gem */
  84.          if (!FOUNTAIN_IS_LOOTED(u.ux, u.uy)) {
  85.              dofindgem();
  86.              break;
  87.          }
  88.      case 25: /* Water gushes forth */
  89.          dogushforth(FALSE);
  90.          break;
  91.      case 26: /* Strange feeling */
  92.          pline("A strange tingling runs up your %s.", body_part(ARM));
  93.          break;
  94.      case 27: /* Strange feeling */
  95.          You_feel("a sudden chill.");
  96.          break;
  97.      case 28: /* Strange feeling */
  98.          pline("An urge to take a bath overwhelms you.");
  99.          {
  100.              long money = money_cnt(invent);
  101.              struct obj *otmp;
  102.              if (money > 10) {
  103.                  /* Amount to lose.  Might get rounded up as fountains don't
  104.                   * pay change... */
  105.                  money = somegold(money) / 10;
  106.                  for (otmp = invent; otmp && money > 0; otmp = otmp->nobj)
  107.                      if (otmp->oclass == COIN_CLASS) {
  108.                          int denomination = objects[otmp->otyp].oc_cost;
  109.                          long coin_loss =
  110.                              (money + denomination - 1) / denomination;
  111.                          coin_loss = min(coin_loss, otmp->quan);
  112.                          otmp->quan -= coin_loss;
  113.                          money -= coin_loss * denomination;
  114.                          if (!otmp->quan)
  115.                              delobj(otmp);
  116.                      }
  117.                  You("lost some of your money in the fountain!");
  118.                  CLEAR_FOUNTAIN_LOOTED(u.ux, u.uy);
  119.                  exercise(A_WIS, FALSE);
  120.              }
  121.          }
  122.          break;
  123.      case 29: /* You see coins */
  124.          /* We make fountains have more coins the closer you are to the
  125.           * surface.  After all, there will have been more people going
  126.           * by.	Just like a shopping mall!  Chris Woodbury  */
  127.  
  128.          if (FOUNTAIN_IS_LOOTED(u.ux, u.uy))
  129.              break;
  130.          SET_FOUNTAIN_LOOTED(u.ux, u.uy);
  131.          (void) mkgold((long) (rnd((dunlevs_in_dungeon(&u.uz) - dunlev(&u.uz)
  132.                                     + 1) * 2) + 5),
  133.                        u.ux, u.uy);
  134.          if (!Blind)
  135.              pline("Far below you, you see coins glistening in the water.");
  136.          exercise(A_WIS, TRUE);
  137.          newsym(u.ux, u.uy);
  138.          break;
  139.      }
  140.      update_inventory();
  141.      dryup(u.ux, u.uy, TRUE);
  142.  }
  143.  

breaksink

  1.  void
  2.  breaksink(x, y)
  3.  int x, y;
  4.  {
  5.      if (cansee(x, y) || (x == u.ux && y == u.uy))
  6.          pline_The("pipes break!  Water spurts out!");
  7.      level.flags.nsinks--;
  8.      levl[x][y].doormask = 0;
  9.      levl[x][y].typ = FOUNTAIN;
  10.      level.flags.nfountains++;
  11.      newsym(x, y);
  12.  }
  13.  

drinksink

  1.  void
  2.  drinksink()
  3.  {
  4.      struct obj *otmp;
  5.      struct monst *mtmp;
  6.  
  7.      if (Levitation) {
  8.          floating_above("sink");
  9.          return;
  10.      }
  11.      switch (rn2(20)) {
  12.      case 0:
  13.          You("take a sip of very cold water.");
  14.          break;
  15.      case 1:
  16.          You("take a sip of very warm water.");
  17.          break;
  18.      case 2:
  19.          You("take a sip of scalding hot water.");
  20.          if (Fire_resistance)
  21.              pline("It seems quite tasty.");
  22.          else
  23.              losehp(rnd(6), "sipping boiling water", KILLED_BY);
  24.          /* boiling water burns considered fire damage */
  25.          break;
  26.      case 3:
  27.          if (mvitals[PM_SEWER_RAT].mvflags & G_GONE)
  28.              pline_The("sink seems quite dirty.");
  29.          else {
  30.              mtmp = makemon(&mons[PM_SEWER_RAT], u.ux, u.uy, NO_MM_FLAGS);
  31.              if (mtmp)
  32.                  pline("Eek!  There's %s in the sink!",
  33.                        (Blind || !canspotmon(mtmp)) ? "something squirmy"
  34.                                                     : a_monnam(mtmp));
  35.          }
  36.          break;
  37.      case 4:
  38.          do {
  39.              otmp = mkobj(POTION_CLASS, FALSE);
  40.              if (otmp->otyp == POT_WATER) {
  41.                  obfree(otmp, (struct obj *) 0);
  42.                  otmp = (struct obj *) 0;
  43.              }
  44.          } while (!otmp);
  45.          otmp->cursed = otmp->blessed = 0;
  46.          pline("Some %s liquid flows from the faucet.",
  47.                Blind ? "odd" : hcolor(OBJ_DESCR(objects[otmp->otyp])));
  48.          otmp->dknown = !(Blind || Hallucination);
  49.          otmp->quan++;       /* Avoid panic upon useup() */
  50.          otmp->fromsink = 1; /* kludge for docall() */
  51.          (void) dopotion(otmp);
  52.          obfree(otmp, (struct obj *) 0);
  53.          break;
  54.      case 5:
  55.          if (!(levl[u.ux][u.uy].looted & S_LRING)) {
  56.              You("find a ring in the sink!");
  57.              (void) mkobj_at(RING_CLASS, u.ux, u.uy, TRUE);
  58.              levl[u.ux][u.uy].looted |= S_LRING;
  59.              exercise(A_WIS, TRUE);
  60.              newsym(u.ux, u.uy);
  61.          } else
  62.              pline("Some dirty water backs up in the drain.");
  63.          break;
  64.      case 6:
  65.          breaksink(u.ux, u.uy);
  66.          break;
  67.      case 7:
  68.          pline_The("water moves as though of its own will!");
  69.          if ((mvitals[PM_WATER_ELEMENTAL].mvflags & G_GONE)
  70.              || !makemon(&mons[PM_WATER_ELEMENTAL], u.ux, u.uy, NO_MM_FLAGS))
  71.              pline("But it quiets down.");
  72.          break;
  73.      case 8:
  74.          pline("Yuk, this water tastes awful.");
  75.          more_experienced(1, 0);
  76.          newexplevel();
  77.          break;
  78.      case 9:
  79.          pline("Gaggg... this tastes like sewage!  You vomit.");
  80.          morehungry(rn1(30 - ACURR(A_CON), 11));
  81.          vomit();
  82.          break;
  83.      case 10:
  84.          pline("This water contains toxic wastes!");
  85.          if (!Unchanging) {
  86.              You("undergo a freakish metamorphosis!");
  87.              polyself(0);
  88.          }
  89.          break;
  90.      /* more odd messages --JJB */
  91.      case 11:
  92.          You_hear("clanking from the pipes...");
  93.          break;
  94.      case 12:
  95.          You_hear("snatches of song from among the sewers...");
  96.          break;
  97.      case 19:
  98.          if (Hallucination) {
  99.              pline("From the murky drain, a hand reaches up... --oops--");
  100.              break;
  101.          }
  102.      default:
  103.          You("take a sip of %s water.",
  104.              rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot");
  105.      }
  106.  }
  107.  
  108.  /*fountain.c*/