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

Function vamp_shift

src/monmove.c:2376–2394  ·  view source on GitHub ↗

this is called when a vampire turns into a fog cloud in order to move under a closed door; if it was sensed via telepathy or seen via infravision, its new fog cloud shape will disappear */

Source from the content-addressed store, hash-verified

2374 under a closed door; if it was sensed via telepathy or seen via
2375 infravision, its new fog cloud shape will disappear */
2376staticfn int
2377vamp_shift(
2378 struct monst *mon,
2379 struct permonst *ptr,
2380 boolean domsg)
2381{
2382 int reslt = 0;
2383
2384 if (mon->data == ptr) {
2385 /* already right shape */
2386 reslt = 1;
2387 } else if (is_vampshifter(mon)) {
2388 reslt = newcham(mon, ptr, domsg ? NC_SHOW_MSG : NO_NC_FLAGS);
2389 /* shape-change message is given when vampshifter turns into a
2390 fog cloud in order to move under a closed door */
2391 display_nhwindow(WIN_MESSAGE, FALSE);
2392 }
2393 return reslt;
2394}
2395
2396/*monmove.c*/

Callers 1

postmovFunction · 0.85

Calls 1

newchamFunction · 0.85

Tested by

no test coverage detected