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

Function missmu

src/mhitu.c:84–100  ·  view source on GitHub ↗

monster missed you */

Source from the content-addressed store, hash-verified

82
83/* monster missed you */
84staticfn void
85missmu(struct monst *mtmp, boolean nearmiss, struct attack *mattk)
86{
87 gh.hitmsg_mid = 0;
88 gh.hitmsg_prev = NULL;
89
90 if (!canspotmon(mtmp))
91 map_invisible(mtmp->mx, mtmp->my);
92
93 if (could_seduce(mtmp, &gy.youmonst, mattk) && !mtmp->mcan)
94 pline_mon(mtmp, "%s pretends to be friendly.", Monnam(mtmp));
95 else
96 pline_mon(mtmp, "%s %smisses!", Monnam(mtmp),
97 (nearmiss && flags.verbose) ? "just " : "");
98
99 stop_occupation();
100}
101
102/* strike types P|S|B: Pierce (pointed: stab) => "thrusts",
103 Slash (edged: slice) or whack (blunt: Bash) => "swings" */

Callers 1

mattackuFunction · 0.85

Calls 5

map_invisibleFunction · 0.85
could_seduceFunction · 0.85
pline_monFunction · 0.85
MonnamFunction · 0.85
stop_occupationFunction · 0.85

Tested by

no test coverage detected