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

Function floor_trigger

src/trap.c:1060–1082  ·  view source on GitHub ↗

is trap type ttyp triggered by touching the floor? */

Source from the content-addressed store, hash-verified

1058
1059/* is trap type ttyp triggered by touching the floor? */
1060staticfn boolean
1061floor_trigger(int ttyp)
1062{
1063 switch (ttyp) {
1064 case ARROW_TRAP:
1065 case DART_TRAP:
1066 case ROCKTRAP:
1067 case SQKY_BOARD:
1068 case BEAR_TRAP:
1069 case LANDMINE:
1070 case ROLLING_BOULDER_TRAP:
1071 case SLP_GAS_TRAP:
1072 case RUST_TRAP:
1073 case FIRE_TRAP:
1074 case PIT:
1075 case SPIKED_PIT:
1076 case HOLE:
1077 case TRAPDOOR:
1078 return TRUE;
1079 default:
1080 return FALSE;
1081 }
1082}
1083
1084/* return TRUE if monster mtmp is up in the air, considering trap flags */
1085staticfn boolean

Callers 3

m_harmless_trapFunction · 0.85
dotrapFunction · 0.85
mintrapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected