B17003 Asmodeus can't use intended wands

m_initweap() was trying to give him wands of fire and cold; since
he had no weapon attacks, he wasn't is_armed(), so this code never
got called.

This moves the code to m_initinv().
This commit is contained in:
nethack.allison
2003-01-26 04:11:49 +00:00
parent 5a7bebf5a6
commit 2b9cc7282c
2 changed files with 12 additions and 7 deletions

View File

@@ -365,6 +365,8 @@ no longer need to manually examine inventory after regaining sight in order
when adding an object to inventory, it is possible for it to becomed both
wielded and quivered if it merges with weapon and autoquiver is enabled
include rocks as likely candidates for quivering if alternate weapon is a sling
Asmodeus fails an is_armed() check, so code in m_initweap() to give him wands
of fire and cold never got called; move the code to m_initinv()
Platform- and/or Interface-Specific Fixes

View File

@@ -407,13 +407,6 @@ register struct monst *mtmp;
case PM_HORNED_DEVIL:
(void)mongets(mtmp, rn2(4) ? TRIDENT : BULLWHIP);
break;
case PM_ICE_DEVIL:
if (!rn2(4)) (void)mongets(mtmp, SPEAR);
break;
case PM_ASMODEUS:
(void)mongets(mtmp, WAN_COLD);
(void)mongets(mtmp, WAN_FIRE);
break;
case PM_DISPATER:
(void)mongets(mtmp, WAN_STRIKING);
break;
@@ -642,6 +635,16 @@ register struct monst *mtmp;
mkmonmoney(mtmp, (long) d(level_difficulty(), 30));
#endif
break;
case S_DEMON:
/* moved here from m_initweap() because these don't
have AT_WEAP so m_initweap() is not called for them */
if (ptr == &mons[PM_ICE_DEVIL] && !rn2(4)) {
(void)mongets(mtmp, SPEAR);
} else if (ptr == &mons[PM_ASMODEUS]) {
(void)mongets(mtmp, WAN_COLD);
(void)mongets(mtmp, WAN_FIRE);
}
break;
default:
break;
}