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
This commit is contained in:
PatR
2021-09-04 14:46:24 -07:00
parent 52585b00ab
commit c97e3e1db7

View File

@@ -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 */