diff --git a/include/obj.h b/include/obj.h index 461426bfb..5bcf9d0dc 100644 --- a/include/obj.h +++ b/include/obj.h @@ -222,6 +222,11 @@ struct obj { (obj)->otyp == FLINT || \ (obj)->otyp == TOUCHSTONE) +/* misc */ +#define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER || \ + (otmp)->otyp == RUBBER_HOSE) + + /* helpers, simple enough to be macros */ #define is_plural(o) ((o)->quan > 1 || \ (o)->oartifact == ART_EYES_OF_THE_OVERWORLD) diff --git a/src/uhitm.c b/src/uhitm.c index c279011fe..4cac38282 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -575,7 +575,7 @@ int thrown; ((wtype = uwep_skill_type()) != P_NONE && P_SKILL(wtype) >= P_SKILLED) && ((monwep = MON_WEP(mon)) != 0 && - objects[monwep->otyp].oc_material >= WOOD && + !is_flimsy(monwep) && !obj_resists(monwep, 50 + 15 * greatest_erosion(obj), 100))) { /*