| 796 | } |
| 797 | |
| 798 | staticfn void |
| 799 | stolen_booty(void) |
| 800 | { |
| 801 | char *gang, gang_name[BUFSZ]; |
| 802 | struct monst *mtmp; |
| 803 | int cnt, i, otyp; |
| 804 | |
| 805 | /* |
| 806 | * -------------------------------------------------------- |
| 807 | * Mythos: |
| 808 | * |
| 809 | * A tragic accident has occurred in Frontier Town... |
| 810 | * It has been overrun by orcs. |
| 811 | * |
| 812 | * The booty that the orcs took from the town is now |
| 813 | * in the possession of the orcs that did this and |
| 814 | * have long since fled the level. |
| 815 | * -------------------------------------------------------- |
| 816 | */ |
| 817 | |
| 818 | gang = rndorcname(gang_name); |
| 819 | /* create the stuff that the gang took */ |
| 820 | cnt = rnd(4); |
| 821 | for (i = 0; i < cnt; ++i) |
| 822 | migr_booty_item(rn2(4) ? TALLOW_CANDLE : WAX_CANDLE, gang); |
| 823 | cnt = rnd(3); |
| 824 | for (i = 0; i < cnt; ++i) |
| 825 | migr_booty_item(SKELETON_KEY, gang); |
| 826 | otyp = rn1((GAUNTLETS_OF_DEXTERITY - LEATHER_GLOVES) + 1, LEATHER_GLOVES); |
| 827 | migr_booty_item(otyp, gang); |
| 828 | cnt = rnd(10); |
| 829 | for (i = 0; i < cnt; ++i) { |
| 830 | /* Food items - but no lembas! (or some other weird things) */ |
| 831 | otyp = rn1(TIN - TRIPE_RATION + 1, TRIPE_RATION); |
| 832 | if (otyp != LEMBAS_WAFER |
| 833 | /* exclude meat <anything>, globs of <anything>, kelp |
| 834 | which all have random generation probability of 0 |
| 835 | (K-/C-rations do too, but we want to include those) */ |
| 836 | && (objects[otyp].oc_prob != 0 |
| 837 | || otyp == C_RATION || otyp == K_RATION) |
| 838 | /* exclude food items which utilize obj->corpsenm because |
| 839 | that field is going to be overloaded for delivery purposes */ |
| 840 | && otyp != CORPSE && otyp != EGG && otyp != TIN) |
| 841 | migr_booty_item(otyp, gang); |
| 842 | } |
| 843 | migr_booty_item(rn2(2) ? LONG_SWORD : SILVER_SABER, gang); |
| 844 | /* create the leader of the orc gang */ |
| 845 | mtmp = makemon(&mons[PM_ORC_CAPTAIN], 0, 0, MM_NONAME); |
| 846 | if (mtmp) { |
| 847 | mtmp = christen_monst(mtmp, upstart(gang)); |
| 848 | mtmp->mpeaceful = 0; |
| 849 | set_malign(mtmp); |
| 850 | shiny_orc_stuff(mtmp); |
| 851 | migrate_orc(mtmp, ORC_LEADER); |
| 852 | } |
| 853 | /* Make most of the orcs on the level be part of the invading gang */ |
| 854 | for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { |
| 855 | if (DEADMONSTER(mtmp)) |
no test coverage detected