make a swarm of undead around mm */
| 453 | |
| 454 | /* make a swarm of undead around mm */ |
| 455 | void |
| 456 | mkundead( |
| 457 | coord *mm, |
| 458 | boolean revive_corpses, |
| 459 | int mm_flags) |
| 460 | { |
| 461 | int cnt = (level_difficulty() + 1) / 10 + rnd(5); |
| 462 | struct permonst *mdat; |
| 463 | struct obj *otmp; |
| 464 | coord cc; |
| 465 | |
| 466 | while (cnt--) { |
| 467 | mdat = morguemon(); |
| 468 | if (mdat && enexto(&cc, mm->x, mm->y, mdat) |
| 469 | && (!revive_corpses |
| 470 | || !(otmp = sobj_at(CORPSE, cc.x, cc.y)) |
| 471 | || !revive(otmp, FALSE))) |
| 472 | (void) makemon(mdat, cc.x, cc.y, mm_flags); |
| 473 | } |
| 474 | svl.level.flags.graveyard = TRUE; /* reduced chance for undead corpse */ |
| 475 | } |
| 476 | |
| 477 | staticfn struct permonst * |
| 478 | morguemon(void) |