| 780 | } |
| 781 | |
| 782 | struct permonst * |
| 783 | courtmon(void) |
| 784 | { |
| 785 | int i = rn2(60) + rn2(3 * level_difficulty()); |
| 786 | |
| 787 | if (i > 100) |
| 788 | return mkclass(S_DRAGON, 0); |
| 789 | else if (i > 95) |
| 790 | return mkclass(S_GIANT, 0); |
| 791 | else if (i > 85) |
| 792 | return mkclass(S_TROLL, 0); |
| 793 | else if (i > 75) |
| 794 | return mkclass(S_CENTAUR, 0); |
| 795 | else if (i > 60) |
| 796 | return mkclass(S_ORC, 0); |
| 797 | else if (i > 45) |
| 798 | return &mons[PM_BUGBEAR]; |
| 799 | else if (i > 30) |
| 800 | return &mons[PM_HOBGOBLIN]; |
| 801 | else if (i > 15) |
| 802 | return mkclass(S_GNOME, 0); |
| 803 | else |
| 804 | return mkclass(S_KOBOLD, 0); |
| 805 | } |
| 806 | |
| 807 | static const struct { |
| 808 | unsigned pm; |
no test coverage detected