diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index a004006be..23d22abcc 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1554,6 +1554,7 @@ if hero was killed by a wand zapped by a monster, cause of death was reported throttle the difficulty of the monsters in theme room "buried zombies" buried troll whose auto-revive timer expired might triger panic with "revive default case 6" +throwing a helm of brilliance could yield "breaking odd object?" Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/dothrow.c b/src/dothrow.c index be50ce4e8..8571ce9f9 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -2458,7 +2458,14 @@ breakobj( boolean breaktest(struct obj *obj) { - if (obj_resists(obj, 1, 99)) + int nonbreakchance = 1; /* chance for non-artifacts to resist */ + + /* this may need to be changed if actual glass armor gets added someday; + for now, it affects crystal plate mail and helm of brilliance */ + if (obj->oclass == ARMOR_CLASS) + nonbreakchance = 95; + + if (obj_resists(obj, nonbreakchance, 99)) return 0; if (objects[obj->otyp].oc_material == GLASS && !obj->oartifact && obj->oclass != GEM_CLASS) @@ -2486,9 +2493,10 @@ breakmsg(struct obj *obj, boolean in_view) switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { default: /* glass or crystal wand */ if (obj->oclass != WAND_CLASS) - impossible("breaking odd object?"); + impossible("breaking odd object (%d)?", obj->otyp); /*FALLTHRU*/ case CRYSTAL_PLATE_MAIL: + case HELM_OF_BRILLIANCE: case LENSES: case MIRROR: case CRYSTAL_BALL: