Source:NetHack 3.4.3/src/fountain.c

From NetHackWiki
(Redirected from Source:Ref/dowaterdemon)
Jump to: navigation, search

Below is the full text to src/fountain.c from NetHack 3.4.3. To link to a particular line, write [[fountain.c#line123]], for example.

Top of file

  1. /*	SCCS Id: @(#)fountain.c	3.4	2003/03/23	*/
  2. /*	Copyright Scott R. Turner, srt@ucla, 10/27/86 */
  3. /* NetHack may be freely redistributed.  See license for details. */

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.

  1. /* Code for drinking from fountains. */
  2.  
  3. #include "hack.h"
  4.  
  5. STATIC_DCL void NDECL(dowatersnakes);
  6. STATIC_DCL void NDECL(dowaterdemon);
  7. STATIC_DCL void NDECL(dowaternymph);
  8. STATIC_PTR void FDECL(gush, (int,int,genericptr_t));
  9. STATIC_DCL void NDECL(dofindgem);

floating_above

  1. void
  2. floating_above(what)
  3. const char *what;
  4. {
  5. You("are floating high above the %s.", what);
  6. }

dowatersnakes

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

dowaterdemon

  1. STATIC_OVL
  2. void
  3. dowaterdemon() /* Water demon */
  4. {
  5. register 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, NO_MM_FLAGS))) {
  9. 	    if (!Blind)
  10. 		You("unleash %s!", a_monnam(mtmp));
  11. 	    else
  12. 		You_feel("the presence of evil.");
  13.  
  14. 	/* Give those on low levels a (slightly) better chance of survival */
  15. 	    if (rnd(100) > (80 + level_difficulty())) {
  16. 		pline("Grateful for %s release, %s grants you a wish!",
  17. 		      mhis(mtmp), mhe(mtmp));
  18. 		makewish();
  19. 		mongone(mtmp);
  20. 	    } else if (t_at(mtmp->mx, mtmp->my))
  21. 		(void) mintrap(mtmp);
  22. 	}
  23. } else
  24. 	pline_The("fountain bubbles furiously for a moment, then calms.");
  25. }

dowaternymph

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

dogushforth

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

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)))  ||
  11. 	    (levl[x][y].typ != ROOM) ||
  12. 	    (sobj_at(BOULDER, x, y)) || nexttodoor(x, y))
  13. 		return;
  14.  
  15. 	if ((ttmp = t_at(x, y)) != 0 && !delfloortrap(ttmp))
  16. 		return;
  17.  
  18. 	if (!((*(int *)poolcnt)++))
  19. 	    pline("Water gushes forth from the overflowing fountain!");
  20.  
  21. 	/* Put a pool at x, y */
  22. 	levl[x][y].typ = POOL;
  23. 	/* No kelp! */
  24. 	del_engr_at(x, y);
  25. 	water_damage(level.objects[x][y], FALSE, TRUE);
  26.  
  27. 	if ((mtmp = m_at(x, y)) != 0)
  28. 		(void) minliquid(mtmp);
  29. 	else
  30. 		newsym(x,y);
  31. }

dofindgem

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

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. 			SET_FOUNTAIN_WARNED(x,y);
  11. 			/* Warn about future fountain use. */
  12. 			for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  13. 			    if (DEADMONSTER(mtmp)) continue;
  14. 			    if ((mtmp->data == &mons[PM_WATCHMAN] ||
  15. 				mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  16. 			       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) pline_The("flow reduces to a trickle.");
  25. 			return;
  26. 		}
  27. #ifdef WIZARD
  28. 		if (isyou && wizard) {
  29. 			if (yn("Dry up fountain?") == 'n')
  30. 				return;
  31. 		}
  32. #endif
  33. 		/* replace the fountain with ordinary floor */
  34. 		levl[x][y].typ = ROOM;
  35. 		levl[x][y].looted = 0;
  36. 		levl[x][y].blessedftn = 0;
  37. 		if (cansee(x,y)) 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. }

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

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

breaksink

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