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

Function release_hero

src/monmove.c:361–372  ·  view source on GitHub ↗

ungrab/expel held/swallowed hero */

Source from the content-addressed store, hash-verified

359
360/* ungrab/expel held/swallowed hero */
361staticfn void
362release_hero(struct monst *mon)
363{
364 if (mon == u.ustuck) {
365 if (u.uswallow) {
366 expels(mon, mon->data, TRUE);
367 } else if (!sticks(gy.youmonst.data)) {
368 unstuck(mon); /* let go */
369 You("get released!");
370 }
371 }
372}
373
374struct monst *
375find_pmmonst(int pm)

Callers 2

monfleeFunction · 0.85
dochugFunction · 0.85

Calls 4

expelsFunction · 0.85
sticksFunction · 0.85
unstuckFunction · 0.85
YouFunction · 0.85

Tested by

no test coverage detected