From c97e3e1db7a45c39a6599ce4aadf5bdf46e3cb53 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 4 Sep 2021 14:46:24 -0700 Subject: [PATCH] Fixes entry for "Disambiguate blunt weapons" and additional comments. Pull request #584 expands the oc_dir field of objects[] from 2 bits to 3 in order to hold the weapon strike- type bit mask. Closes #584 --- include/objclass.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/objclass.h b/include/objclass.h index 850cbdb59..72a33f298 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -66,13 +66,14 @@ struct objclass { Bitfield(oc_tough, 1); /* hard gems/rings */ Bitfield(oc_dir, 3); -#define NODIR 1 /* for wands/spells: non-directional */ -#define IMMEDIATE 2 /* directional */ -#define RAY 3 /* zap beams */ - -#define PIERCE 1 /* for weapons & tools used as weapons */ -#define SLASH 2 /* (latter includes iron ball & chain) */ -#define WHACK 4 + /* oc_dir: zap style for wands and spells */ +#define NODIR 1 /* non-directional */ +#define IMMEDIATE 2 /* directional beam that doesn't ricochet */ +#define RAY 3 /* beam that does bounce off walls */ + /* overloaded oc_dir: strike mode bit mask for weapons and weptools */ +#define PIERCE 01 /* pointed weapon punctures target */ +#define SLASH 02 /* sharp weapon cuts target */ +#define WHACK 04 /* blunt weapon bashes target */ /* 3 free bits */