From d3dfe5dfc8724150797345ce993039c383324849 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Fri, 17 Jan 2003 03:40:47 +0000 Subject: [PATCH] Test cvs script patch mailer 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 | 6 ++++++ src/wield.c | 9 +-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/obj.h b/include/obj.h index 3d5ed3e60..45c27a5bf 100644 --- a/include/obj.h +++ b/include/obj.h @@ -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\ diff --git a/src/wield.c b/src/wield.c index 53daf89c8..70ddeaf16 100644 --- a/src/wield.c +++ b/src/wield.c @@ -52,14 +52,6 @@ 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.",