return True if mon is capable of converting other monsters into zombies */
| 359 | |
| 360 | /* return True if mon is capable of converting other monsters into zombies */ |
| 361 | boolean |
| 362 | zombie_maker(struct monst *mon) |
| 363 | { |
| 364 | struct permonst *pm = mon->data; |
| 365 | |
| 366 | if (mon->mcan) |
| 367 | return FALSE; |
| 368 | |
| 369 | switch (pm->mlet) { |
| 370 | case S_ZOMBIE: |
| 371 | /* Z-class monsters that aren't actually zombies go here */ |
| 372 | if (pm == &mons[PM_GHOUL] || pm == &mons[PM_SKELETON]) |
| 373 | return FALSE; |
| 374 | return TRUE; |
| 375 | case S_LICH: |
| 376 | /* all liches will create zombies as well */ |
| 377 | return TRUE; |
| 378 | } |
| 379 | return FALSE; |
| 380 | } |
| 381 | |
| 382 | /* Return monster index of zombie monster which this monster could |
| 383 | be turned into, or NON_PM if it doesn't have a direct counterpart. |
no outgoing calls
no test coverage detected