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

Function delfloortrap

src/trap.c:6667–6690  ·  view source on GitHub ↗

Destroy a trap that emanates from the floor. */

Source from the content-addressed store, hash-verified

6665
6666/* Destroy a trap that emanates from the floor. */
6667boolean
6668delfloortrap(struct trap *ttmp)
6669{
6670 /* some of these are arbitrary -dlc */
6671 if (ttmp && ((ttmp->ttyp == SQKY_BOARD) || (ttmp->ttyp == BEAR_TRAP)
6672 || (ttmp->ttyp == LANDMINE) || (ttmp->ttyp == FIRE_TRAP)
6673 || is_pit(ttmp->ttyp)
6674 || is_hole(ttmp->ttyp)
6675 || (ttmp->ttyp == TELEP_TRAP) || (ttmp->ttyp == LEVEL_TELEP)
6676 || (ttmp->ttyp == WEB) || (ttmp->ttyp == MAGIC_TRAP)
6677 || (ttmp->ttyp == ANTI_MAGIC))) {
6678 struct monst *mtmp;
6679
6680 if (u_at(ttmp->tx, ttmp->ty)) {
6681 if (u.utraptype != TT_BURIEDBALL)
6682 reset_utrap(TRUE);
6683 } else if ((mtmp = m_at(ttmp->tx, ttmp->ty)) != 0) {
6684 mtmp->mtrapped = 0;
6685 }
6686 deltrap(ttmp);
6687 return TRUE;
6688 }
6689 return FALSE;
6690}
6691
6692/* used for doors (also tins). can be used for anything else that opens. */
6693void

Callers 6

boulder_hits_poolFunction · 0.85
flooreffectsFunction · 0.85
liquid_flowFunction · 0.85
digholeFunction · 0.85
zap_over_floorFunction · 0.85
gushFunction · 0.85

Calls 2

reset_utrapFunction · 0.85
deltrapFunction · 0.85

Tested by

no test coverage detected