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

Function into_vs_onto

src/trap.c:5374–5389  ·  view source on GitHub ↗

whether moving to a trap location is moving "into" the trap or "onto" it */

Source from the content-addressed store, hash-verified

5372
5373/* whether moving to a trap location is moving "into" the trap or "onto" it */
5374boolean
5375into_vs_onto(int traptype)
5376{
5377 switch (traptype) {
5378 case BEAR_TRAP:
5379 case PIT:
5380 case SPIKED_PIT:
5381 case HOLE:
5382 case TELEP_TRAP:
5383 case LEVEL_TELEP:
5384 case MAGIC_PORTAL:
5385 case WEB:
5386 return TRUE;
5387 }
5388 return FALSE;
5389}
5390
5391/* while attempting to disarm an adjacent trap, we've fallen into it */
5392staticfn void

Callers 2

avoid_trap_andor_regionFunction · 0.85
move_into_trapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected