Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-06-15 22:17:30 -04:00
5 changed files with 299 additions and 74 deletions

View File

@@ -653,16 +653,26 @@ register struct monst *mtmp;
nhUse(mac); /* suppress 'dead increment' from static analyzer */
if (ptr != &mons[PM_GUARD] && ptr != &mons[PM_WATCHMAN]
&& ptr != &mons[PM_WATCH_CAPTAIN]) {
if (ptr == &mons[PM_WATCH_CAPTAIN]) {
; /* better weapon rather than extra gear here */
} else if (ptr == &mons[PM_WATCHMAN]) {
if (rn2(3)) /* most watchmen carry a whistle */
(void) mongets(mtmp, TIN_WHISTLE);
} else if (ptr == &mons[PM_GUARD]) {
/* if hero teleports out of a vault while being confronted
by the vault's guard, there is a shrill whistling sound,
so guard evidently carries a cursed whistle */
otmp = mksobj(TIN_WHISTLE, TRUE, FALSE);
curse(otmp);
(void) mpickobj(mtmp, otmp);
} else { /* soldiers and their officers */
if (!rn2(3))
(void) mongets(mtmp, K_RATION);
if (!rn2(2))
(void) mongets(mtmp, C_RATION);
if (ptr != &mons[PM_SOLDIER] && !rn2(3))
(void) mongets(mtmp, BUGLE);
} else if (ptr == &mons[PM_WATCHMAN] && rn2(3))
(void) mongets(mtmp, TIN_WHISTLE);
}
} else if (ptr == &mons[PM_SHOPKEEPER]) {
(void) mongets(mtmp, SKELETON_KEY);
switch (rn2(4)) {