From 1e431139b4a85791732344ba370e32539edb3d54 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 19 Dec 2024 13:11:01 -0800 Subject: [PATCH] fix issue #1342 - garbled iron bars message Issue reported by elunna: the message given when zap_over_floor() hits iron bars with lightning or acid was substituting a couple of words or phrases in the wrong order, resulting in |The {melt|dissolve} iron bars somewhat but remain intact. when the iron bar location is flagged as non-diggable. It should be |The iron bars {melt|dissolve} somewhat but remain intact. Not mentioned: the corresponding message for locations that aren't flagged as non-diggable used "melt" unconditionally. Change it to keep "melt" for lightning but switch to "corrode away" for acid. Fixes #1342 --- doc/fixes3-7-0.txt | 1 + src/zap.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 24d7ec690..47e3c7753 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2077,6 +2077,7 @@ knockback could move hero diagonally into or out of an open doorway farlook of /e or /E stopped reporting engraving and headstone text after a fix for the situation where // or ; reported such text when there was an object or monster in the way +message was garbled when lightning or acid breath hit iron bars Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/zap.c b/src/zap.c index 23fdac1be..d0e8fa077 100644 --- a/src/zap.c +++ b/src/zap.c @@ -5285,13 +5285,14 @@ zap_over_floor( if ((lev->wall_info & W_NONDIGGABLE) != 0) { if (see_it) Norep("The %s %s somewhat but remain intact.", - (damgtype == ZT_ACID) ? "corrode" : "melt", - defsyms[S_bars].explanation); + defsyms[S_bars].explanation, + (damgtype == ZT_ACID) ? "corrode" : "melt"); /* but nothing actually happens... */ } else { rangemod -= 3; if (see_it) - Norep("The %s melt.", defsyms[S_bars].explanation); + Norep("The %s %s.", defsyms[S_bars].explanation, + (damgtype == ZT_ACID) ? "corrode away" : "melt"); dissolve_bars(x, y); if (*in_rooms(x, y, SHOPBASE)) { add_damage(x, y, (type >= 0) ? SHOP_BARS_COST : 0L);