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

@@ -2155,6 +2155,7 @@ preceding #overview with the 'm' prefix brings up the overview display as a
menu allowing selection of any visited level to #annotate; it also
shows every level visited rather than just the "interesting" ones
include monster size in feedback for wand of probing and stethoscope
crystal armor is now subject to cracking damage rather than outright breakage
Platform- and/or Interface-Specific New Features

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