]> granicus.if.org Git - nethack/commitdiff
Test cvs script patch mailer
authornethack.allison <nethack.allison>
Fri, 17 Jan 2003 03:40:47 +0000 (03:40 +0000)
committernethack.allison <nethack.allison>
Fri, 17 Jan 2003 03:40:47 +0000 (03:40 +0000)
Move an is_elven_* macro definition to the same spot as the other ones
so future elven equipment changes can be done in one place.

include/obj.h
src/wield.c

index 3d5ed3e60f88e055b3fb405151bc81c362e26bd4..45c27a5bf87a312078066a281e212fd6fd7df96f 100644 (file)
@@ -185,6 +185,12 @@ struct obj {
                                || (otmp)->otyp == ELVEN_CLOAK\
                                || (otmp)->otyp == ELVEN_SHIELD\
                                || (otmp)->otyp == ELVEN_BOOTS)
+#define is_elven_weapon(otmp)  ((otmp)->otyp == ELVEN_ARROW\
+                               || (otmp)->otyp == ELVEN_SPEAR\
+                               || (otmp)->otyp == ELVEN_DAGGER\
+                               || (otmp)->otyp == ELVEN_SHORT_SWORD\
+                               || (otmp)->otyp == ELVEN_BROADSWORD\
+                               || (otmp)->otyp == ELVEN_BOW)
 #define is_orcish_armor(otmp)  ((otmp)->otyp == ORCISH_HELM\
                                || (otmp)->otyp == ORCISH_CHAIN_MAIL\
                                || (otmp)->otyp == ORCISH_RING_MAIL\
index 53daf89c8ad117f0b84facb21ff0e054d8811e85..70ddeaf161409e72d074a16022070dfd65791b59 100644 (file)
 
 STATIC_DCL int FDECL(ready_weapon, (struct obj *));
 
-/* elven weapons vibrate warningly when enchanted beyond a limit */
-#define is_elven_weapon(optr)  ((optr)->otyp == ELVEN_ARROW\
-                               || (optr)->otyp == ELVEN_SPEAR\
-                               || (optr)->otyp == ELVEN_DAGGER\
-                               || (optr)->otyp == ELVEN_SHORT_SWORD\
-                               || (optr)->otyp == ELVEN_BROADSWORD\
-                               || (optr)->otyp == ELVEN_BOW)
-
 /* used by will_weld() */
 /* probably should be renamed */
 #define erodeable_wep(optr)    ((optr)->oclass == WEAPON_CLASS \
@@ -701,6 +693,7 @@ register int amount;
        }
 
        /* an elven magic clue, cookie@keebler */
+       /* elven weapons vibrate warningly when enchanted beyond a limit */
        if ((uwep->spe > 5)
                && (is_elven_weapon(uwep) || uwep->oartifact || !rn2(7)))
            Your("%s unexpectedly.",