MCPcopy Index your code
hub / github.com/NetHack/NetHack / m_respond

Function m_respond

src/mon.c:4121–4131  ·  view source on GitHub ↗

monster responds to player action; not the same as a passive attack */

Source from the content-addressed store, hash-verified

4119
4120/* monster responds to player action; not the same as a passive attack */
4121void
4122m_respond(struct monst *mtmp)
4123{
4124 if (mtmp->data->msound == MS_SHRIEK && !um_dist(mtmp->mx, mtmp->my, 1))
4125 m_respond_shrieker(mtmp);
4126 if (mtmp->data == &mons[PM_MEDUSA] && couldsee(mtmp->mx, mtmp->my))
4127 m_respond_medusa(mtmp);
4128 /* Erinyes will inform surrounding monsters of your crimes */
4129 if (mtmp->data == &mons[PM_ERINYS] && !mtmp->mpeaceful && m_canseeu(mtmp))
4130 aggravate();
4131}
4132
4133/* how quest guardians respond when you attack the quest leader */
4134staticfn void

Callers 3

bhitmFunction · 0.85
boomhitFunction · 0.85
dochugFunction · 0.85

Calls 4

um_distFunction · 0.85
m_respond_shriekerFunction · 0.85
m_respond_medusaFunction · 0.85
aggravateFunction · 0.85

Tested by

no test coverage detected