From: PatR Date: Sat, 7 May 2016 23:24:17 +0000 (-0700) Subject: fix #H4336 - extra space in potions boil message X-Git-Tag: NetHack-3.6.1_RC01~790 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7bdc5a95b7604b03c3a5c43420aa195f490da703;p=nethack fix #H4336 - extra space in potions boil message 'Your boils and explodes.' 'One of your boils and explodes.' 'Some of your boil and explode.' 'All of your boil and explode.' The last variation had an extra space in the message prefix.... In addition to removing the excess space, this adds 'Both of your boil and explode.' to be used for the (All == 2) case. The bug and fix also apply to stacks of potions 'freezing and shattering' and to stacks of scrolls 'catching fire and burning'. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 724ed89d5..2af532913 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -228,6 +228,8 @@ when feel_location removed a remembered-unseen-monster glyph from a known water location while hero was levitating, the map was redrawn showing floor instead of water at that spot Vlad's tower2 and tower3 didn't show up in wizard-mode ^O output or ^V? menu +remove extra space from "All of your boil and explode." + (also applies to potions freezing and to scrolls burning) Fixes to Post-3.6.0 Problems that Were Exposed Via git Respository diff --git a/src/zap.c b/src/zap.c index 21d683e48..b0a182873 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 zap.c $NHDT-Date: 1461028544 2016/04/19 01:15:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.251 $ */ +/* NetHack 3.6 zap.c $NHDT-Date: 1462663451 2016/05/07 23:24:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.252 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4706,9 +4706,12 @@ register int osym, dmgtyp; if (!cnt) continue; - mult = (cnt == quan) - ? (quan > 1) ? "All of your " : "Your" - : (cnt == 1L) ? "One of your" : "Some of your"; + mult = (cnt == 1L) + ? (quan == 1L) ? "Your" /* 1 of 1 */ + : "One of your" /* 1 of N */ + : (cnt < quan) ? "Some of your" /* n of N */ + : (quan == 2L) ? "Both of your" /* 2 of 2 */ + : "All of your"; /* N of N */ pline("%s %s %s!", mult, xname(obj), destroy_strings[dindx][(cnt > 1L)]); if (osym == POTION_CLASS && dmgtyp != AD_COLD) {