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

Function seemimic

src/mon.c:4408–4427  ·  view source on GitHub ↗

NOTE: we must check for mimicry before calling this routine */

Source from the content-addressed store, hash-verified

4406
4407/* NOTE: we must check for mimicry before calling this routine */
4408void
4409seemimic(struct monst *mtmp)
4410{
4411 boolean is_blocker_appear = (is_lightblocker_mappear(mtmp));
4412
4413 if (has_mcorpsenm(mtmp))
4414 freemcorpsenm(mtmp);
4415
4416 mtmp->m_ap_type = M_AP_NOTHING;
4417 mtmp->mappearance = 0;
4418
4419 /*
4420 * Discovered mimics don't block light.
4421 */
4422 if (is_blocker_appear
4423 && !does_block(mtmp->mx, mtmp->my, &levl[mtmp->mx][mtmp->my]))
4424 unblock_point(mtmp->mx, mtmp->my);
4425
4426 newsym(mtmp->mx, mtmp->my);
4427}
4428
4429/* [taken out of rescham() in order to be shared by restore_cham()] */
4430void

Callers 15

furniture_detectFunction · 0.85
findoneFunction · 0.85
mfind0Function · 0.85
attack_checksFunction · 0.85
that_is_a_mimicFunction · 0.85
domove_swap_with_petFunction · 0.85
pre_mm_attackFunction · 0.85
mdisplacemFunction · 0.85
gazemmFunction · 0.85
sleep_monstFunction · 0.85
mhurtleFunction · 0.85
do_earthquakeFunction · 0.85

Calls 3

freemcorpsenmFunction · 0.85
unblock_pointFunction · 0.85
newsymFunction · 0.85

Tested by

no test coverage detected