used for doors (also tins). can be used for anything else that opens. */
| 6691 | |
| 6692 | /* used for doors (also tins). can be used for anything else that opens. */ |
| 6693 | void |
| 6694 | b_trapped(const char *item, int bodypart) |
| 6695 | { |
| 6696 | int lvl = level_difficulty(), |
| 6697 | dmg = rnd(5 + (lvl < 5 ? lvl : 2 + lvl / 2)); |
| 6698 | |
| 6699 | Soundeffect(se_kaboom, 80); |
| 6700 | pline("KABOOM!! %s was booby-trapped!", The(item)); |
| 6701 | wake_nearby(FALSE); |
| 6702 | losehp(Maybe_Half_Phys(dmg), "explosion", KILLED_BY_AN); |
| 6703 | exercise(A_STR, FALSE); |
| 6704 | if (bodypart != NO_PART) |
| 6705 | exercise(A_CON, FALSE); |
| 6706 | make_stunned((HStun & TIMEOUT) + (long) dmg, TRUE); |
| 6707 | } |
| 6708 | |
| 6709 | /* Monster is hit by trap. */ |
| 6710 | staticfn boolean |
no test coverage detected