MCPcopy Create free account
hub / github.com/NetHack/NetHack / mplayer_talk

Function mplayer_talk

src/mplayer.c:355–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void
356mplayer_talk(struct monst *mtmp)
357{
358 static const char
359 *same_class_msg[3] = {
360 "I can't win, and neither will you!",
361 "You don't deserve to win!",
362 "Mine should be the honor, not yours!",
363 },
364 *other_class_msg[3] = {
365 "The low-life wants to talk, eh?",
366 "Fight, scum!",
367 "Here is what I have to say!",
368 };
369
370 if (mtmp->mpeaceful)
371 return; /* will drop to humanoid talk */
372
373 SetVoice(mtmp, 0, 80, 0);
374 verbalize("Talk? -- %s", mtmp->data == &mons[gu.urole.mnum]
375 ? same_class_msg[rn2(3)]
376 : other_class_msg[rn2(3)]);
377}
378
379/*mplayer.c*/

Callers 1

domonnoiseFunction · 0.85

Calls 2

verbalizeFunction · 0.85
rn2Function · 0.85

Tested by

no test coverage detected