True iff the type of monster pass through iron bars */
| 551 | |
| 552 | /* True iff the type of monster pass through iron bars */ |
| 553 | boolean |
| 554 | passes_bars(struct permonst *mptr) |
| 555 | { |
| 556 | return (boolean) (passes_walls(mptr) || amorphous(mptr) || unsolid(mptr) |
| 557 | || is_whirly(mptr) || verysmall(mptr) |
| 558 | /* rust monsters and some puddings can destroy bars */ |
| 559 | || dmgtype(mptr, AD_RUST) || dmgtype(mptr, AD_CORR) |
| 560 | /* rock moles can eat bars */ |
| 561 | || metallivorous(mptr) |
| 562 | || (slithy(mptr) && !bigmonst(mptr))); |
| 563 | } |
| 564 | |
| 565 | /* returns True if monster can blow (whistle, etc) */ |
| 566 | boolean |