From: Guillaume Clemens Date: Fri, 30 Jul 2021 14:37:17 +0000 (+0200) Subject: Non-metallic gloves protect worn rings from shock X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67295bc706525934c461a0d940ca0da39fc302d2;p=nethack Non-metallic gloves protect worn rings from shock --- diff --git a/src/zap.c b/src/zap.c index f27f82d23..ae4c111ad 100644 --- a/src/zap.c +++ b/src/zap.c @@ -5070,7 +5070,8 @@ destroy_one_item(struct obj *obj, int osym, int dmgtyp) quan = obj->quan; switch (osym) { case RING_CLASS: - if (obj->otyp == RIN_SHOCK_RESISTANCE) { + if (((obj->owornmask & W_RING) && uarmg && !is_metallic(uarmg)) + || obj->otyp == RIN_SHOCK_RESISTANCE) { skip++; break; }