From 738c2239c9063cbf62e5650977da45c1e38a3108 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 4 Nov 2023 13:02:57 +0200 Subject: [PATCH] Lightning has a small chance of melting iron bars --- doc/fixes3-7-0.txt | 1 + src/zap.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 34331a621..6dd684786 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1273,6 +1273,7 @@ hero had worn amulet of magical breathing become unworn during theft by nymph, digging down on a magical trap causes it to explode thrown potion of sickness now bypasses target's innate magic resistance but only affects current hit points, no longer also reducing maximum HP +lightning has a small chance of melting iron bars Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/zap.c b/src/zap.c index dbc1a1d0d..06ab216ef 100644 --- a/src/zap.c +++ b/src/zap.c @@ -5143,11 +5143,16 @@ zap_over_floor( (void) create_gas_cloud(x, y, 1, 8); break; + case ZT_LIGHTNING: + /*FALLTHRU*/ case ZT_ACID: if (lev->typ == IRONBARS) { + if (damgtype == ZT_LIGHTNING && rn2(10)) + break; if ((lev->wall_info & W_NONDIGGABLE) != 0) { if (see_it) - Norep("The %s corrode somewhat but remain intact.", + Norep("The %s %s somewhat but remain intact.", + (damgtype == ZT_ACID) ? "corrode" : "melt", defsyms[S_bars].explanation); /* but nothing actually happens... */ } else {