kill all members of genocided species */
| 5636 | |
| 5637 | /* kill all members of genocided species */ |
| 5638 | void |
| 5639 | kill_genocided_monsters(void) |
| 5640 | { |
| 5641 | struct monst *mtmp, *mtmp2; |
| 5642 | boolean kill_cham; |
| 5643 | int mndx; |
| 5644 | |
| 5645 | /* |
| 5646 | * Called during genocide, and again upon level change. The latter |
| 5647 | * catches up with any migrating monsters as they finally arrive at |
| 5648 | * their intended destinations, so possessions get deposited there. |
| 5649 | * |
| 5650 | * Chameleon handling: |
| 5651 | * 1) if chameleons have been genocided, destroy them |
| 5652 | * regardless of current form; |
| 5653 | * 2) otherwise, force every chameleon which is imitating |
| 5654 | * any genocided species to take on a new form. |
| 5655 | */ |
| 5656 | for (mtmp = fmon; mtmp; mtmp = mtmp2) { |
| 5657 | mtmp2 = mtmp->nmon; |
| 5658 | if (DEADMONSTER(mtmp)) |
| 5659 | continue; |
| 5660 | mndx = monsndx(mtmp->data); |
| 5661 | kill_cham = (ismnum(mtmp->cham) |
| 5662 | && (svm.mvitals[mtmp->cham].mvflags & G_GENOD)); |
| 5663 | if ((svm.mvitals[mndx].mvflags & G_GENOD) || kill_cham) { |
| 5664 | if (ismnum(mtmp->cham) && !kill_cham) |
| 5665 | (void) newcham(mtmp, (struct permonst *) 0, NC_SHOW_MSG); |
| 5666 | else |
| 5667 | mondead(mtmp); |
| 5668 | } |
| 5669 | if (mtmp->minvent) |
| 5670 | kill_eggs(mtmp->minvent); |
| 5671 | } |
| 5672 | |
| 5673 | kill_eggs(gi.invent); |
| 5674 | kill_eggs(fobj); |
| 5675 | kill_eggs(gm.migrating_objs); |
| 5676 | kill_eggs(svl.level.buriedobjlist); |
| 5677 | } |
| 5678 | |
| 5679 | void |
| 5680 | golemeffects(struct monst *mon, int damtype, int dam) |
no test coverage detected