crystal armor bit

Accidentally left out of the "breaking crystal armor" commit
e9c58c2fe4.
This commit is contained in:
PatR
2023-06-14 16:14:18 -07:00
parent e9c58c2fe4
commit 7d052bafb0
2 changed files with 2 additions and 16 deletions

View File

@@ -516,24 +516,9 @@ Helmet_off(void)
boolean
hard_helmet(struct obj *obj)
{
static const char crystal_[] = "crystal ";
const char *ostr;
int otyp;
if (!obj || !is_helmet(obj))
return FALSE;
if (is_metallic(obj))
return TRUE;
/* make helm of brilliance (crystal helmet) be classified 'hard'; this
test would work for crystal plate mail too if suits reached here */
otyp = obj->otyp;
if (objects[otyp].oc_material == GLASS
&& (((ostr = OBJ_NAME(objects[otyp])) != 0
&& !strncmp(ostr, crystal_, 8))
|| ((ostr = OBJ_DESCR(objects[otyp])) != 0
&& !strncmp(ostr, crystal_, 8))))
return TRUE;
return FALSE;
return (is_metallic(obj) || is_crackable(obj)) ? TRUE : FALSE;
}
static int