From: PatR Date: Wed, 9 Dec 2015 13:56:40 +0000 (-0800) Subject: fix #H4026 - silly plural bug X-Git-Tag: NetHack-3.6.1_RC01~1203 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ce4fe41803104ab971ae50936f84d050e6ad280;p=nethack fix #H4026 - silly plural bug When a stack of corpses gets zapped by undead turning, the message was "The corpses glows iridescently." Change it to "One of the corpses glows iridescently." since only one of the stack gets revived. --- diff --git a/src/zap.c b/src/zap.c index 474f19563..26ddd757d 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 zap.c $NHDT-Date: 1447987787 2015/11/20 02:49:47 $ $NHDT-Branch: master $:$NHDT-Revision: 1.236 $ */ +/* NetHack 3.6 zap.c $NHDT-Date: 1449669396 2015/12/09 13:56:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.238 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -758,15 +758,22 @@ boolean by_hero; if (costly_spot(x, y)) shkp = shop_keeper(*in_rooms(x, y, SHOPBASE)); - if (cansee(x, y)) - pline( - "%s glows iridescently.", - upstart(corpse_xname(corpse, (const char *) 0, CXN_PFX_THE))); - else if (shkp) + if (cansee(x, y)) { + char buf[BUFSZ]; + unsigned pfx = CXN_PFX_THE; + + Strcpy(buf, (corpse->quan > 1L) ? "one of " : ""); + if (carried(corpse) && !corpse->unpaid) { + Strcat(buf, "your "); + pfx = CXN_NO_PFX; + } + Strcat(buf, corpse_xname(corpse, (const char *) 0, pfx)); + pline("%s glows iridescently.", upstart(buf)); + } else if (shkp) { /* need some prior description of the corpse since stolen_value() will refer to the object as "it" */ pline("A corpse is resuscitated."); - + } /* don't charge for shopkeeper's own corpse if we just revived him */ if (shkp && mtmp != shkp) (void) stolen_value(corpse, x, y, (boolean) shkp->mpeaceful,