github issue #1060 - crystal helmet
Issue reported by vultur-cadens: changing helm of brilliance to crystal made it stop being classified as "hard helmet" so it gave less protection against things falling onto the hero's head. Change the is_metallic() tests used on helmets to new hard_helmet(). Unlike when thrown, crystal helmets don't break when objects fall on them. Fixes #1060
This commit is contained in:
@@ -1430,7 +1430,7 @@ find_offensive(struct monst *mtmp)
|
||||
*/
|
||||
nomore(MUSE_SCR_EARTH);
|
||||
if (obj->otyp == SCR_EARTH
|
||||
&& ((helmet && is_metallic(helmet)) || mtmp->mconf
|
||||
&& (hard_helmet(helmet) || mtmp->mconf
|
||||
|| amorphous(mtmp->data) || passes_walls(mtmp->data)
|
||||
|| noncorporeal(mtmp->data) || unsolid(mtmp->data)
|
||||
|| !rn2(10))
|
||||
@@ -1875,7 +1875,7 @@ rnd_offensive_item(struct monst *mtmp)
|
||||
case 0: {
|
||||
struct obj *helmet = which_armor(mtmp, W_ARMH);
|
||||
|
||||
if ((helmet && is_metallic(helmet)) || amorphous(pm)
|
||||
if (hard_helmet(helmet) || amorphous(pm)
|
||||
|| passes_walls(pm) || noncorporeal(pm) || unsolid(pm))
|
||||
return SCR_EARTH;
|
||||
} /* fall through */
|
||||
|
||||
Reference in New Issue
Block a user