fix #H4336 - extra space in potions boil message

'Your <single-potion> boils and explodes.'
'One of your <stack-of-potions> boils and explodes.'
'Some of your <stack-of-potions> boil and explode.'
'All of your  <stack-of-potions> 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 <stack-of-potions> 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'.
This commit is contained in:
PatR
2016-05-07 16:24:17 -07:00
parent 63a9879ebc
commit 7bdc5a95b7
2 changed files with 9 additions and 4 deletions
+2
View File
@@ -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 water location while hero was levitating, the map was redrawn showing
floor instead of water at that spot floor instead of water at that spot
Vlad's tower2 and tower3 didn't show up in wizard-mode ^O output or ^V? menu Vlad's tower2 and tower3 didn't show up in wizard-mode ^O output or ^V? menu
remove extra space from "All of your <stack-of-potions> 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 Fixes to Post-3.6.0 Problems that Were Exposed Via git Respository
+7 -4
View File
@@ -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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -4706,9 +4706,12 @@ register int osym, dmgtyp;
if (!cnt) if (!cnt)
continue; continue;
mult = (cnt == quan) mult = (cnt == 1L)
? (quan > 1) ? "All of your " : "Your" ? (quan == 1L) ? "Your" /* 1 of 1 */
: (cnt == 1L) ? "One of your" : "Some of your"; : "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), pline("%s %s %s!", mult, xname(obj),
destroy_strings[dindx][(cnt > 1L)]); destroy_strings[dindx][(cnt > 1L)]);
if (osym == POTION_CLASS && dmgtyp != AD_COLD) { if (osym == POTION_CLASS && dmgtyp != AD_COLD) {