Destroy a trap that emanates from the floor. */
| 6665 | |
| 6666 | /* Destroy a trap that emanates from the floor. */ |
| 6667 | boolean |
| 6668 | delfloortrap(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. */ |
| 6693 | void |
no test coverage detected