| 714 | static const char *const orcfruit[] = { "paddle cactus", "dwarven root" }; |
| 715 | |
| 716 | staticfn void |
| 717 | migrate_orc(struct monst *mtmp, unsigned long mflags) |
| 718 | { |
| 719 | int nlev, max_depth, cur_depth; |
| 720 | d_level dest; |
| 721 | |
| 722 | cur_depth = (int) depth(&u.uz); |
| 723 | max_depth = dunlevs_in_dungeon(&u.uz) |
| 724 | + (svd.dungeons[u.uz.dnum].depth_start - 1); |
| 725 | if (mflags == ORC_LEADER) { |
| 726 | /* Note that the orc leader will take possession of any |
| 727 | * remaining stuff not already delivered to other |
| 728 | * orcs between here and the bottom of the mines. |
| 729 | */ |
| 730 | nlev = max_depth; |
| 731 | /* once in a blue moon, he won't be at the very bottom */ |
| 732 | if (!rn2(40)) |
| 733 | nlev--; |
| 734 | mtmp->migflags |= MIGR_LEFTOVERS; |
| 735 | } else { |
| 736 | nlev = rn2((max_depth - cur_depth) + 1) + cur_depth; |
| 737 | if (nlev == cur_depth) |
| 738 | nlev++; |
| 739 | if (nlev > max_depth) |
| 740 | nlev = max_depth; |
| 741 | mtmp->migflags = (mtmp->migflags & ~MIGR_LEFTOVERS); |
| 742 | } |
| 743 | get_level(&dest, nlev); |
| 744 | migrate_to_level(mtmp, ledger_no(&dest), MIGR_RANDOM, (coord *) 0); |
| 745 | } |
| 746 | |
| 747 | staticfn void |
| 748 | shiny_orc_stuff(struct monst *mtmp) |
no test coverage detected