returns True if monster doesn't attack, False if it does */
| 58 | |
| 59 | /* returns True if monster doesn't attack, False if it does */ |
| 60 | boolean |
| 61 | noattacks(struct permonst *ptr) |
| 62 | { |
| 63 | int i; |
| 64 | struct attack *mattk = ptr->mattk; |
| 65 | |
| 66 | for (i = 0; i < NATTK; i++) { |
| 67 | /* AT_BOOM "passive attack" (gas spore's explosion upon death) |
| 68 | isn't an attack as far as our callers are concerned */ |
| 69 | if (mattk[i].aatyp == AT_BOOM) |
| 70 | continue; |
| 71 | |
| 72 | if (mattk[i].aatyp) |
| 73 | return FALSE; |
| 74 | } |
| 75 | return TRUE; |
| 76 | } |
| 77 | |
| 78 | /* does monster-type transform into something else when petrified? */ |
| 79 | boolean |
no outgoing calls
no test coverage detected