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
This commit is contained in:
PatR
2024-12-19 13:11:01 -08:00
parent 5de7f986a0
commit 1e431139b4
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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);