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

Function trapeffect_level_telep

src/trap.c:2087–2103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2085}
2086
2087staticfn int
2088trapeffect_level_telep(
2089 struct monst *mtmp,
2090 struct trap *trap,
2091 unsigned int trflags)
2092{
2093 if (mtmp == &gy.youmonst) {
2094 seetrap(trap);
2095 level_tele_trap(trap, trflags);
2096 } else {
2097 boolean in_sight = canseemon(mtmp) || (mtmp == u.usteed);
2098 boolean forcetrap = ((trflags & FORCETRAP) != 0);
2099
2100 return mlevel_tele_trap(mtmp, trap, forcetrap, in_sight);
2101 }
2102 return Trap_Effect_Finished;
2103}
2104
2105staticfn int
2106trapeffect_web(

Callers 3

trapeffect_holeFunction · 0.85
trapeffect_magic_portalFunction · 0.85
trapeffect_selectorFunction · 0.85

Calls 4

seetrapFunction · 0.85
level_tele_trapFunction · 0.85
canseemonFunction · 0.85
mlevel_tele_trapFunction · 0.85

Tested by

no test coverage detected