B14014: soft hats and piercers

Soft "helmets" don't protect against falling rocks, but did protect against
piercers.  Update the checks so only hard (metallic) helmets provide this
protection.  The same report quibbled about using the word "helmet" for
soft head coverings.  This patch does not address that quibble.
This commit is contained in:
cohrs
2002-11-21 18:05:48 +00:00
parent 7b9f2f6e3e
commit d3e2f53910
3 changed files with 5 additions and 2 deletions

View File

@@ -356,6 +356,7 @@ mattacku(mtmp)
u.uundetected = 0;
if (is_hider(youmonst.data)) {
coord cc; /* maybe we need a unexto() function? */
struct obj *obj;
You("fall from the %s!", ceiling(u.ux,u.uy));
if (enexto(&cc, u.ux, u.uy, youmonst.data)) {
@@ -377,7 +378,8 @@ mattacku(mtmp)
if (youmonst.data->mlet != S_PIERCER)
return(0); /* trappers don't attack */
if (which_armor(mtmp, WORN_HELMET)) {
obj = which_armor(mtmp, WORN_HELMET);
if (obj && is_metallic(obj)) {
Your("blow glances off %s helmet.",
s_suffix(mon_nam(mtmp)));
} else {