From 2b9cc7282c4d06df927bb14021d86a591fd0c51b Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sun, 26 Jan 2003 04:11:49 +0000 Subject: [PATCH] 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(). --- doc/fixes34.1 | 2 ++ src/makemon.c | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index e43f94987..96feacdbd 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/makemon.c b/src/makemon.c index 4ca1affd2..fa7f8926c 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -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; } -- 2.40.0