]> granicus.if.org Git - nethack/commitdiff
B17003 Asmodeus can't use intended wands
authornethack.allison <nethack.allison>
Sun, 26 Jan 2003 04:11:49 +0000 (04:11 +0000)
committernethack.allison <nethack.allison>
Sun, 26 Jan 2003 04:11:49 +0000 (04:11 +0000)
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
src/makemon.c

index e43f9498701338b8e41487881b64bee8327425e6..96feacdbd07523ed09aa7cdbea5e1d01bcd78ad1 100644 (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
index 4ca1affd22695572ee4cda4e1f6effcb4d63dd6b..fa7f8926c90b8c5f659271a15344e18a33a58da3 100644 (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;
        }