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

Function cuss

src/wizard.c:845–883  ·  view source on GitHub ↗

Insult or intimidate the player */

Source from the content-addressed store, hash-verified

843
844/* Insult or intimidate the player */
845void
846cuss(struct monst *mtmp)
847{
848 if (Deaf)
849 return;
850 if (mtmp->iswiz) {
851 if (!rn2(5)) { /* typical bad guy action */
852 pline("%s laughs fiendishly.", Monnam(mtmp));
853 } else if (u.uhave.amulet && !rn2(SIZE(random_insult))) {
854 SetVoice(mtmp, 0, 80, 0);
855 verbalize("Relinquish the amulet, %s!",
856 ROLL_FROM(random_insult));
857 } else if (u.uhp < 5 && !rn2(2)) { /* Panic */
858 SetVoice(mtmp, 0, 80, 0);
859 verbalize(rn2(2) ? "Even now thy life force ebbs, %s!"
860 : "Savor thy breath, %s, it be thy last!",
861 ROLL_FROM(random_insult));
862 } else if (mtmp->mhp < 5 && !rn2(2)) { /* Parthian shot */
863 SetVoice(mtmp, 0, 80, 0);
864 verbalize(rn2(2) ? "I shall return." : "I'll be back.");
865 } else {
866 SetVoice(mtmp, 0, 80, 0);
867 verbalize("%s %s!",
868 ROLL_FROM(random_malediction),
869 ROLL_FROM(random_insult));
870 }
871 } else if (is_lminion(mtmp)
872 && !(mtmp->isminion && EMIN(mtmp)->renegade)) {
873 com_pager("angel_cuss"); /* TODO: the Hallucination msg */
874 /*com_pager(rn2(QTN_ANGELIC - 1 + (Hallucination ? 1 : 0))
875 + QT_ANGELIC);*/
876 } else {
877 if (!rn2(is_minion(mtmp->data) ? 100 : 5))
878 pline("%s casts aspersions on your ancestry.", Monnam(mtmp));
879 else
880 com_pager("demon_cuss");
881 }
882 wake_nearto(mtmp->mx, mtmp->my, 5 * 5);
883}
884
885/*wizard.c*/

Callers 2

domonnoiseFunction · 0.85
dochugFunction · 0.85

Calls 6

rn2Function · 0.85
MonnamFunction · 0.85
verbalizeFunction · 0.85
com_pagerFunction · 0.85
wake_neartoFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected