Source:NetHack 3.1.0/sounds.c

Below is the full text to sounds.c from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/sounds.c#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)sounds.c	3.1	92/07/07 2.   /* 	Copyright (c) 1989 Janet Walz, Mike Threepoint */ 3.   /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #include "hack.h"  6.    #include "edog.h"  7. 8.   #ifdef OVLB 9.    10.   static int FDECL(domonnoise,(struct monst *)); 11.  static int NDECL(dochat); 12.   13.   #endif /* OVLB */ 14.   15.   #ifdef SOUNDS 16.   17.   #ifdef OVL0 18.   19.   void 20.  dosounds 21.  {  22.       register xchar hallu; 23.      register struct mkroom *sroom; 24.      register int vx, vy; 25.  #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND) 26.      int xx; 27.  #endif 28.   29.       hallu = Hallucination ? 1 : 0; 30.    31.       if(!flags.soundok || u.uswallow || Underwater) return; 32.   33.       if (level.flags.nfountains && !rn2(400)) 34.  	switch (rn2(3)+hallu) { 35.  	    case 0: 36.  		You("hear bubbling water."); 37.  		break; 38.  	    case 1: 39.  		You("hear water falling on coins."); 40.  		break; 41.  	    case 2: 42.  		You("hear the splashing of a naiad."); 43.  		break; 44.  	    case 3: 45.  		You("hear a soda fountain!"); 46.  		break; 47.  	}  48.       if (level.flags.nsinks && !rn2(300)) 49.  	switch (rn2(2)+hallu) { 50.  	    case 0: 51.  		You("hear a slow drip."); 52.  		break; 53.  	    case 1: 54.  		You("hear a gurgling noise."); 55.  		break; 56.  	    case 2: 57.  		You("hear dishes being washed!"); 58.  		break; 59.  	}  60.    61.       if (level.flags.has_court && !rn2(200)) { 62.  	switch (rn2(3)+hallu) { 63.  	    case 0: 64.  		You("hear the tones of courtly conversation."); 65.  		break; 66.  	    case 1: 67.  		You("hear a sceptre being pounded in judgment."); 68.  		break; 69.  	    case 2: 70.  		pline("Someone just shouted \"Off with %s head!\"",  71.   		    flags.female ? "her" : "his"); 72.  		break; 73.  	    case 3: 74.  		You("hear Queen Beruthiel's cats!"); 75.  		break; 76.  	}  77.   	return; 78.      }  79.       if (level.flags.has_swamp && !rn2(200)) { 80.  	switch (rn2(2)+hallu) { 81.  	    case 0: 82.  		You("hear mosquitoes!"); 83.  		break; 84.  	    case 1: 85.  		You("smell marsh gas!");	/* so it's a smell...*/ 86.  		break; 87.  	    case 2: 88.  		You("hear Donald Duck!"); 89.  		break; 90.  	}  91.   	return; 92.      }  93.       if (level.flags.has_vault && !rn2(200)) { 94.  	if (!(sroom = search_special(VAULT))) { 95.  	    /* strange ... */ 96.   	    level.flags.has_vault = 0; 97.  	    return; 98.  	}  99.   	if(gd_sound) 100. 	    switch (rn2(2)+hallu) { 101. 		case 1: { 102. 		    boolean gold_in_vault = FALSE; 103.  104.  		    for (vx = sroom->lx;vx <= sroom->hx; vx++) 105. 			for (vy = sroom->ly; vy <= sroom->hy; vy++) 106. 			    if (g_at(vx, vy)) 107. 				gold_in_vault = TRUE; 108. #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND) 109. 		    /* Bug in aztec assembler here. Workaround below */ 110. 		    xx = ROOM_INDEX(sroom) + ROOMOFFSET; 111. 		    xx = (xx != vault_occupied(u.urooms)); 112. 		    if(xx) 113. #else 114. 		    if (vault_occupied(u.urooms) !=  115.  			 (ROOM_INDEX(sroom) + ROOMOFFSET)) 116. #endif /* AZTEC_C_WORKAROUND */ 117. 		    {  118.  			if (gold_in_vault) 119. 			    You(!hallu ? "hear someone counting money." :  120.  				"hear the quarterback calling the play."); 121. 			else 122. 			    You("hear someone searching."); 123. 			break; 124. 		    }  125.  		    /* fall into... (yes, even for hallucination) */ 126. 		}  127.  		case 0: 128. 		    You("hear the footsteps of a guard on patrol."); 129. 		    break; 130. 		case 2: 131. 		    You("hear Ebenezer Scrooge!"); 132. 		    break; 133. 	    }  134.  	return; 135.     }  136.      if (level.flags.has_beehive && !rn2(200)) { 137. 	switch (rn2(2)+hallu) { 138. 	    case 0: 139. 		You("hear a low buzzing."); 140. 		break; 141. 	    case 1: 142. 		You("hear an angry drone."); 143. 		break; 144. 	    case 2: 145. 		You("hear bees in your %sbonnet!",  146.  		    uarmh ? "" : "(nonexistent) "); 147. 		break; 148. 	}  149.  	return; 150.     }  151.      if (level.flags.has_morgue && !rn2(200)) { 152. 	switch (rn2(2)+hallu) { 153. 	    case 0: 154. 		You("suddenly realize it is unnaturally quiet."); 155. 		break; 156. 	    case 1: 157. 		pline("The hair on the back of your %s stands up.",  158.  			body_part(NECK)); 159. 		break; 160. 	    case 2: 161. 		pline("The hair on your %s seems to stand up.",  162.  			body_part(HEAD)); 163. 		break; 164. 	}  165.  	return; 166.     }  167.  #ifdef ARMY 168.     if (level.flags.has_barracks && !rn2(200)) { 169. 	switch (rn2(3)+hallu) { 170. 	    case 0: 171. 		You("hear blades being honed."); 172. 		break; 173. 	    case 1: 174. 		You("hear loud snoring."); 175. 		break; 176. 	    case 2: 177. 		You("hear dice being thrown."); 178. 		break; 179. 	    case 3: 180. 		You("hear General MacArthur!"); 181. 		break; 182. 	}  183.  	return; 184.     }  185.  #endif /* ARMY */ 186.     if (level.flags.has_zoo && !rn2(200)) { 187. 	switch (rn2(2)+hallu) { 188. 	    case 0: 189. 	You("hear a sound reminding you of an elephant stepping on a peanut."); 190. 		break; 191. 	    case 1: 192. 		You("hear a sound reminding you of a trained seal."); 193. 		break; 194. 	    case 2: 195. 		You("hear Doctor Doolittle!"); 196. 		break; 197. 	}  198.  	return; 199.     }  200.      if (level.flags.has_shop && !rn2(200)) { 201. 	if (!(sroom = search_special(ANY_SHOP))) { 202. 	    /* strange... */ 203.  	    level.flags.has_shop = 0; 204. 	    return; 205. 	}  206.          if(tended_shop(sroom) &&  207.  	   !index(u.ushops, ROOM_INDEX(sroom) + ROOMOFFSET)) 208. 	    switch (rn2(2)+hallu) { 209. 		case 0: 210. 		    You("hear someone cursing shoplifters."); 211. 		    break; 212. 		case 1: 213. 		    You("hear the chime of a cash register."); 214. 		    break; 215. 		case 2: 216. 		    You("hear Neiman and Marcus arguing!"); 217. 		    break; 218. 	    }  219.          return; 220.     }  221.  }  222.   223.  #endif /* OVL0 */ 224. #ifdef OVLB 225.  226.  #include "eshk.h"  227. 228. void 229. growl(mtmp) 230. register struct monst *mtmp; 231. {  232.      if (mtmp->msleep || !mtmp->mcanmove) return; 233.     /* presumably nearness and soundok checks have already been made */ 234.     switch (mtmp->data->msound) { 235. 	case MS_SILENT: 236. 	    break; 237. 	case MS_MEW: 238. 	case MS_HISS: 239. 	    pline("%s hisses!", Monnam(mtmp)); 240. 	    break; 241. 	case MS_BARK: 242. 	case MS_GROWL: 243. 	    pline("%s growls!", Monnam(mtmp)); 244. 	    break; 245. 	case MS_ROAR: 246. 	    pline("%s roars!", Monnam(mtmp)); 247. 	    break; 248. 	case MS_BUZZ: 249. 	    pline("%s buzzes!", Monnam(mtmp)); 250. 	    break; 251. 	case MS_SQEEK: 252. 	    pline("%s squeals!", Monnam(mtmp)); 253. 	    break; 254. 	case MS_SQAWK: 255. 	    pline("%s screeches!", Monnam(mtmp)); 256. 	    break; 257. 	case MS_NEIGH: 258. 	    pline("%s neighs!", Monnam(mtmp)); 259. 	    break; 260. 	case MS_WAIL: 261. 	    pline("%s wails!", Monnam(mtmp)); 262. 	    break; 263.     }  264.  }  265.   266.  void 267. yelp(mtmp) 268. register struct monst *mtmp; 269. /* the sounds of mistreated pets */ 270. {  271.      if (mtmp->msleep || !mtmp->mcanmove) return; 272.     /* presumably nearness and soundok checks have already been made */ 273.     switch (mtmp->data->msound) { 274. 	case MS_MEW: 275. 	    pline("%s yowls!", Monnam(mtmp)); 276. 	    break; 277. 	case MS_BARK: 278. 	case MS_GROWL: 279. 	    pline("%s yelps!", Monnam(mtmp)); 280. 	    break; 281. 	case MS_ROAR: 282. 	    pline("%s snarls!", Monnam(mtmp)); 283. 	    break; 284. 	case MS_SQEEK: 285. 	    pline("%s squeals!", Monnam(mtmp)); 286. 	    break; 287. 	case MS_SQAWK: 288. 	    pline("%s screaks!", Monnam(mtmp)); 289. 	    break; 290. 	case MS_WAIL: 291. 	    pline("%s wails!", Monnam(mtmp)); 292. 	    break; 293.     }  294.  }  295.   296.  void 297. whimper(mtmp) 298. register struct monst *mtmp; 299. /* the sounds of distressed pets */ 300. {  301.      if (mtmp->msleep || !mtmp->mcanmove) return; 302.     /* presumably nearness and soundok checks have already been made */ 303.     switch (mtmp->data->msound) { 304. 	case MS_MEW: 305. 	case MS_GROWL: 306. 	    pline("%s whimpers.", Monnam(mtmp)); 307. 	    break; 308. 	case MS_BARK: 309. 	    pline("%s whines.", Monnam(mtmp)); 310. 	    break; 311. 	case MS_SQEEK: 312. 	    pline("%s squeals.", Monnam(mtmp)); 313. 	    break; 314.     }  315.  }  316.   317.  #endif /* OVLB */ 318.  319.  #endif /* SOUNDS */ 320.  321.  #ifdef OVLB 322.  323.  static int 324. domonnoise(mtmp) 325. register struct monst *mtmp; 326. {  327.      /* presumably nearness and sleep checks have already been made */ 328.     if (!flags.soundok) return(0); 329.     switch (mtmp->data->msound) { 330. 	case MS_ORACLE: 331. 	    return doconsult(mtmp); 332. 	case MS_PRIEST: 333. 	    priest_talk(mtmp); 334. 	    break; 335. #ifdef SOUNDS 336. 	case MS_SILENT: 337. 	    break; 338. 	case MS_SQEEK: 339. 	    pline("%s squeaks.", Monnam(mtmp)); 340. 	    break; 341. 	case MS_SQAWK: 342. 	    pline("%s squawks.", Monnam(mtmp)); 343. 	    break; 344. 	case MS_MEW: 345. 	    if (mtmp->mtame) { 346. 		if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped ||  347.  		    moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5) 348. 		    pline("%s yowls.", Monnam(mtmp)); 349. 		else if (EDOG(mtmp)->hungrytime > moves + 1000) 350. 		    pline("%s purrs.", Monnam(mtmp)); 351. 		else 352. 		    pline("%s mews.", Monnam(mtmp)); 353. 	    }  354.  	case MS_HISS: 355. 	    if (!mtmp->mpeaceful) 356. 		pline("%s hisses!", Monnam(mtmp)); 357. 	    break; 358. 	case MS_BUZZ: 359. 	    if (!mtmp->mpeaceful) 360. 		pline("%s buzzes angrily.", Monnam(mtmp)); 361. 	    break; 362. 	case MS_GRUNT: 363. 	    pline("%s grunts.", Monnam(mtmp)); 364. 	    break; 365. 	case MS_BARK: 366. 	    if (flags.moonphase == FULL_MOON && night) { 367. 		pline("%s howls.", Monnam(mtmp)); 368. 		break; 369. 	    } else if (mtmp->mpeaceful) { 370. 		if (mtmp->mtame &&  371.  		    (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || 372. 		     moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5)) 373. 		    pline("%s whines.", Monnam(mtmp)); 374. 		else if (EDOG(mtmp)->hungrytime > moves + 1000) 375. 		    pline("%s yips.", Monnam(mtmp)); 376. 		else 377. 		    pline("%s barks.", Monnam(mtmp)); 378. 		break; 379. 	    }  380.  	case MS_GROWL: 381. 	    if (!mtmp->mpeaceful) 382. 		pline("%s growls!", Monnam(mtmp)); 383. 	    break; 384. 	case MS_ROAR: 385. 	    if (!mtmp->mpeaceful) 386. 		pline("%s roars!", Monnam(mtmp)); 387. 	    break; 388. 	case MS_NEIGH: 389. 	    pline("%s neighs.", Monnam(mtmp)); 390. 	    break; 391. 	case MS_WAIL: 392. 	    pline("%s wails mournfully.", Monnam(mtmp)); 393. 	    break; 394. 	case MS_GURGLE: 395. 	    pline("%s gurgles.", Monnam(mtmp)); 396. 	    break; 397. 	case MS_BURBLE: 398. 	    pline("%s burbles.", Monnam(mtmp)); 399. 	    break; 400. 	case MS_SHRIEK: 401. 	    pline("%s shrieks.", Monnam(mtmp)); 402. 	    aggravate; 403. 	    break; 404. 	case MS_IMITATE: 405. 	    pline("%s imitates you.", Monnam(mtmp)); 406. 	    break; 407. 	case MS_DJINNI: 408. 	    if (mtmp->mtame) verbalize("Thank you for freeing me!"); 409. 	    else if (mtmp->mpeaceful) verbalize("I'm free!"); 410. 	    else verbalize("This will teach you not to disturb me!"); 411. 	    break; 412. 	case MS_MUMBLE: 413. 	    pline("%s mumbles incomprehensibly.", Monnam(mtmp)); 414. 	    break; 415. #ifdef MULDGN 416. 	case MS_LEADER: 417. 	case MS_NEMESIS: 418. 	case MS_GUARDIAN: 419. 	    quest_chat(mtmp); 420. 	    break; 421. #endif 422. 	case MS_BONES: 423. 	    pline("%s rattles noisily.", Monnam(mtmp)); 424. 	    You("freeze momentarily."); 425. 	    nomul(-2); 426. 	    break; 427. 	case MS_HUMANOID: 428. 	    if(In_endgame(&u.uz) && is_mplayer(mtmp->data)) 429. 	        mplayer_talk(mtmp); 430. 	    /* Generic humanoid behaviour. */ 431.  	    if (!mtmp->mpeaceful) break; 432. 	    if (mtmp->mflee) 433. 		pline("%s wants nothing to do with you.", Monnam(mtmp)); 434. 	    else if (mtmp->mhp < mtmp->mhpmax/4) 435. 		pline("%s moans.", Monnam(mtmp)); 436. 	    else if (mtmp->mconf || mtmp->mstun) 437. 		verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?"); 438. 	    else if (!mtmp->mcansee) 439. 		verbalize("I can't see!"); 440. 	    else if (mtmp->mtrapped) 441. 		verbalize("I'm trapped!"); 442. 	    else if (mtmp->mhp < mtmp->mhpmax/2) 443. 		pline("%s asks for a potion of healing.", Monnam(mtmp)); 444. 	    /* Specific monster's interests */ 445. 	    else if (is_elf(mtmp->data)) 446. 		pline("%s curses orcs.", Monnam(mtmp)); 447. 	    else if (is_dwarf(mtmp->data)) 448. 		pline("%s talks about mining.", Monnam(mtmp)); 449. 	    else if (likes_magic(mtmp->data)) 450. 		pline("%s talks about spellcraft.", Monnam(mtmp)); 451. 	    else if (carnivorous(mtmp->data)) 452. 		pline("%s discusses what kinds of meat are safe to eat.", Monnam(mtmp)); 453. 	    else switch (monsndx(mtmp->data)){ 454. 		case PM_HOBBIT: 455. 		    if (mtmp->mhpmax - mtmp->mhp >= 10) 456. pline("%s complains about unpleasant dungeon conditions.", Monnam(mtmp)); 457. 		    else 458. 		    	pline("%s asks you about the One Ring.", Monnam(mtmp)); 459. 		    break; 460. 		case PM_ARCHEOLOGIST: 461. pline("%s describes a recent article in \"Spelunker Today\" magazine.", Monnam(mtmp)); 462. 		    break; 463. 		case PM_TOURIST: 464. 		    verbalize("Aloha."); 465. 		    break; 466. 		default: 467. 		    pline("%s discusses dungeon exploration.", Monnam(mtmp)); 468. 	    }  469.  	    break; 470. 	case MS_SEDUCE: 471. # ifdef SEDUCE 472. 	    if (mtmp->data->mlet != S_NYMPH &&  473.  		could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) { 474. 			(void) doseduce(mtmp); 475. 			break; 476. 	    }  477.  	    switch ((poly_gender != mtmp->female) ? rn2(3) : 0) { 478. # else 479. 	    switch ((poly_gender == 0) ? rn2(3) : 0) { 480. # endif 481. 		case 2: 482. 			verbalize("Hello, sailor."); 483. 			break; 484. 		case 1: 485. 			pline("%s comes on to you.", Monnam(mtmp)); 486. 			break; 487. 		default: 488. 			pline("%s cajoles you.", Monnam(mtmp)); 489. 	    }  490.  	    break; 491. # ifdef KOPS 492. 	case MS_ARREST: 493. 	    if (mtmp->mpeaceful) 494. 		verbalize("Just the facts, %s.",  495.  		      flags.female ? "Ma'am" : "Sir"); 496. 	    else switch (rn2(3)) { 497. 		case 1: 498. 		    verbalize("Anything you say can be used against you."); 499. 		    break; 500. 		case 2: 501. 		    verbalize("You're under arrest!"); 502. 		    break; 503. 		default: 504. 		    verbalize("Stop in the name of the Law!"); 505. 	    }  506.  	    break; 507. # endif 508. 	case MS_LAUGH: 509. 	    switch (rn2(4)) { 510. 		case 1: 511. 		    pline("%s giggles.", Monnam(mtmp)); 512. 		    break; 513. 		case 2: 514. 		    pline("%s chuckles.", Monnam(mtmp)); 515. 		    break; 516. 		case 3: 517. 		    pline("%s snickers.", Monnam(mtmp)); 518. 		    break; 519. 		default: 520. 		    pline("%s laughs.", Monnam(mtmp)); 521. 	    }  522.  	    break; 523. 	case MS_BRIBE: 524. 	    if (mtmp->mpeaceful && !mtmp->mtame) { 525. 		(void) demon_talk(mtmp); 526. 		break; 527. 	    }  528.  	    /* fall through */ 529. 	case MS_CUSS: 530. 	    if (!mtmp->mpeaceful) 531. 		cuss(mtmp); 532. 	    break; 533. 	case MS_GUARD: 534. 	    if (u.ugold) 535. 		verbalize("Please drop that gold and follow me."); 536. 	    else 537. 		verbalize("Please follow me."); 538. 	    break; 539. 	case MS_NURSE: 540. 	    if (uwep) 541. 		verbalize("Put that weapon away before you hurt someone!"); 542. 	    else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf) 543. 		if (pl_character[0] == 'H') 544. 		    verbalize("Doc, I can't help you unless you cooperate."); 545. 		else 546. 		    verbalize("Please undress so I can examine you."); 547. # ifdef TOURIST 548. 	    else if (uarmu) 549. 		verbalize("Take off your shirt, please."); 550. # endif 551. 	    else verbalize("Relax, this won't hurt a bit."); 552. 	    break; 553. 	case MS_SELL: /* pitch, pay, total */ 554. 	    if (ANGRY(mtmp)) 555. 		pline("%s mentions how much %s dislikes %s customers.",  556.  			ESHK(mtmp)->shknam,  557.  			mtmp->female ? "she" : "he",  558.  			ESHK(mtmp)->robbed ? "non-paying" : "rude"); 559. 	    else if (ESHK(mtmp)->following) 560. 		if (strncmp(ESHK(mtmp)->customer, plname, PL_NSIZ)) { 561. 		    verbalize("Hello %s!  I was looking for %s.",  562.  			    plname, ESHK(mtmp)->customer); 563. 		    ESHK(mtmp)->following = 0; 564. 		} else { 565. 		    verbalize("Hello %s!  Didn't you forget to pay?",  566.  			    plname); 567. 		}  568.  	    else if (ESHK(mtmp)->robbed) 569. 		pline("%s complains about a recent robbery.", ESHK(mtmp)->shknam); 570. 	    else if (ESHK(mtmp)->billct) 571. 		pline("%s reminds you that you haven't paid yet.", ESHK(mtmp)->shknam); 572. 	    else if (mtmp->mgold < 50) 573. 		pline("%s complains that business is bad.", ESHK(mtmp)->shknam); 574. 	    else if (mtmp->mgold > 4000) 575. 		pline("%s says that business is good.", ESHK(mtmp)->shknam); 576. 	    else 577. 		pline("%s talks about the problem of shoplifters.", ESHK(mtmp)->shknam); 578. 	    break; 579. 	case MS_SOLDIER: 580. 	    if (!mtmp->mpeaceful) 581. 	    switch (rn2(3)) { 582. 		case 2: 583. 		    verbalize("Resistance is useless!"); 584. 		    break; 585. 		case 1: 586. 		    verbalize("You're dog meat!"); 587. 		    break; 588. 		default: 589. 		    verbalize("Surrender!"); 590. 	    } else 591. 	    switch (rn2(3)) { 592. 		case 2: 593. 		    verbalize("What lousy pay we're getting here!"); 594. 		    break; 595. 		case 1: 596. 		    verbalize("The food's not fit for Orcs!"); 597. 		    break; 598. 		default: 599. 		    verbalize("My feet hurt, I've been on them all day!"); 600. 	    }  601.  	    break; 602. 	case MS_DEATH: 603. 	    pline("%s is busy reading a copy of Sandman #9.", Monnam(mtmp)); 604. 	    break; 605. 	case MS_PESTILENCE: 606. 	case MS_FAMINE: 607. 	    verbalize("Who do you think you are, War?"); 608. 	    break; 609. #endif /* SOUNDS */ 610.     }  611.      return(1); 612. }  613.   614.   615.  int 616. dotalk 617. {  618.      int result; 619.     boolean save_soundok = flags.soundok; 620.     flags.soundok = 1;	/* always allow sounds while chatting */ 621.     result = dochat; 622.     flags.soundok = save_soundok; 623.     return result; 624. }  625.   626.  static int 627. dochat 628. {  629.      register struct monst *mtmp; 630.     register int tx,ty; 631.     struct obj *otmp; 632.  633.  #ifdef POLYSELF 634.     if (uasmon->msound == MS_SILENT) { 635. 	Your("current form seems unable to speak."); 636. 	return(0); 637.     }  638.  #endif 639.     if (Strangled) { 640. 	You("can't speak.  You're choking!"); 641. 	return(0); 642.     }  643.      if (u.uswallow) { 644. 	pline("They won't hear you out there."); 645. 	return(0); 646.     }  647.      if (Underwater) { 648. 	pline("All you can utter is a mouthful of air bubbles."); 649. 	return(0); 650.     }  651.   652.      if (!Blind && (otmp = shop_object(u.ux, u.uy)) != (struct obj *)0) { 653. 	/* standing on something in a shop and chatting causes the shopkeeper 654. 	   to describe the price(s). This can inhibit other chatting inside 655. 	   a shop, but that shouldn't matter much. shop_object returns an 656. object iff inside a shop and the shopkeeper is present and willing 657. 	   (not angry) and able (not asleep) to speak and the position contains 658. 	   any objects other than just gold. 659. 	*/  660.  	price_quote(otmp); 661. 	return(1); 662.     }  663.   664.      (void) getdir("Talk to whom? [in what direction]"); 665.  666.      if (u.dz) { 667. 	pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down"); 668. 	return(0); 669.     }  670.   671.      if (u.dx == 0 && u.dy == 0) { 672. /*  673.   * Let's not include this. It raises all sorts of questions: can you wear 674.  * 2 helmets, 2 amulets, 3 pairs of gloves or 6 rings as a marilith, 675.  * etc... --KAA 676. #ifdef POLYSELF 677. 	if (u.umonnum == PM_ETTIN) { 678. 	    You("discover that your other head makes boring conversation."); 679. 	    return(1); 680. 	}  681.  #endif 682. */  683.  	pline("Talking to yourself is a bad habit for a dungeoneer."); 684. 	return(0); 685.     }  686.   687.      tx = u.ux+u.dx; ty = u.uy+u.dy; 688.     mtmp = m_at(tx, ty); 689.     if ((Blind && !Telepat) || !mtmp || mtmp->mundetected ||  690.  		mtmp->m_ap_type == M_AP_FURNITURE ||  691.  		mtmp->m_ap_type == M_AP_OBJECT) { 692. 	pline("I see nobody there."); 693. 	return(0); 694.     }  695.      if (!mtmp->mcanmove || mtmp->msleep) { 696. 	pline("%s seems not to notice you.", Monnam(mtmp)); 697. 	return(0); 698.     }  699.   700.      if (mtmp->mtame && mtmp->meating) { 701. 	pline("%s is eating noisily.", Monnam(mtmp)); 702. 	return (0); 703.     }  704.   705.      return domonnoise(mtmp); 706. }  707.   708.  #endif /* OVLB */ 709.  710.  /*sounds.c*/