From 66242a0691e41a3104a696a5087c2c95a9aa6a7f Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 1 Jan 2018 17:14:37 -0800 Subject: [PATCH] fix #H6707 - double "gush of water hits" messages When polymorphed into an iron golem (or gremlin with 2/3 chance), triggering a rust trap would give "a gush of water hits " and then give a second "a gush of water hits you" when dealing with golem or gremlin effects. That made it seem as if the trap was hitting twice. This removes the redundant messages. (Rust trap against monster iron golem or gremlin didn't have them.) --- doc/fixes36.1 | 1 + src/trap.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 77e524f7d..2b0c439e8 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -497,6 +497,7 @@ can no longer play controlled notes on musical instrument if impaired if a special level specified the appearance of a mimic and mimics had been genocided prior to creating the level, whatever random monster took the mimic's place got its intended appearance +redundant "hit by gush of water" message if poly'd into iron golem or gremlin Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/trap.c b/src/trap.c index 401d5a7fc..df0e1e883 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 trap.c $NHDT-Date: 1494107206 2017/05/06 21:46:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.278 $ */ +/* NetHack 3.6 trap.c $NHDT-Date: 1514855666 2018/01/02 01:14:26 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.284 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1103,7 +1103,7 @@ unsigned trflags; if (uarmc) (void) water_damage(uarmc, cloak_simple_name(uarmc), TRUE); else if (uarm) - (void) water_damage(uarm, "armor", TRUE); + (void) water_damage(uarm, suit_simple_name(uarm), TRUE); else if (uarmu) (void) water_damage(uarmu, "shirt", TRUE); } @@ -1112,11 +1112,9 @@ unsigned trflags; if (u.umonnum == PM_IRON_GOLEM) { int dam = u.mhmax; - pline("%s you!", A_gush_of_water_hits); You("are covered with rust!"); losehp(Maybe_Half_Phys(dam), "rusting away", KILLED_BY); } else if (u.umonnum == PM_GREMLIN && rn2(3)) { - pline("%s you!", A_gush_of_water_hits); (void) split_mon(&youmonst, (struct monst *) 0); } @@ -2292,7 +2290,8 @@ register struct monst *mtmp; (void) water_damage(target, cloak_simple_name(target), TRUE); else if ((target = which_armor(mtmp, W_ARM)) != 0) - (void) water_damage(target, "armor", TRUE); + (void) water_damage(target, suit_simple_name(target), + TRUE); else if ((target = which_armor(mtmp, W_ARMU)) != 0) (void) water_damage(target, "shirt", TRUE); }