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

Function trapeffect_telep_trap

src/trap.c:2069–2085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2067}
2068
2069staticfn int
2070trapeffect_telep_trap(
2071 struct monst *mtmp,
2072 struct trap *trap,
2073 unsigned int trflags UNUSED)
2074{
2075 if (mtmp == &gy.youmonst) {
2076 seetrap(trap);
2077 tele_trap(trap);
2078 } else {
2079 boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
2080
2081 mtele_trap(mtmp, trap, in_sight);
2082 return Trap_Moved_Mon;
2083 }
2084 return Trap_Effect_Finished;
2085}
2086
2087staticfn int
2088trapeffect_level_telep(

Callers 1

trapeffect_selectorFunction · 0.85

Calls 4

seetrapFunction · 0.85
tele_trapFunction · 0.85
canseemonFunction · 0.85
mtele_trapFunction · 0.85

Tested by

no test coverage detected