From 3cc82cbbe707887d134cbc13d2aab8205e5c5e72 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 27 Jul 2020 09:20:12 -0700 Subject: [PATCH] venom bit I looked for places where changing "{blinding,acid} venom" into "splash of {blinding,acid} venom" might make messages become too verbose. Turns out to have been unnecessary work because the full name won't be used unless you get a venom object in inventory and formally identify it. Wizard mode, or bones from wizard mode, is necessary for that to happen so the possibility can be ignored. [The name change is still useful for wizard mode wishing though.] Many messages use hard-coded "venom" instead of xname() so won't be affected even if such identification takes place. However, thitmon() was producing |The is hit by the splash of venom. |The splash of venom blinds the . which seems rather redundant even without the longer full object name. So change the second message to be generated as |The venom blinds the . It also shortens "cream pie" in first line to "pie" in second one. --- src/mthrowu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mthrowu.c b/src/mthrowu.c index e7340a04b..712dbfc01 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mthrowu.c $NHDT-Date: 1586567393 2020/04/11 01:09:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.99 $ */ +/* NetHack 3.6 mthrowu.c $NHDT-Date: 1595866809 2020/07/27 16:20:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -425,7 +425,14 @@ boolean verbose; /* give message(s) even when you can't see what happened */ : AT_WEAP), otmp)) { if (vis && mtmp->mcansee) - pline("%s is blinded by %s.", Monnam(mtmp), the(xname(otmp))); + /* shorten object name to reduce redundancy in the + two message [first via hit() above] sequence: + "The {splash of venom,cream pie} hits ." + " is blinded by the {venom,pie}." */ + pline("%s is blinded by %s.", Monnam(mtmp), + the((otmp->oclass == VENOM_CLASS) ? "venom" + : (otmp->otyp == CREAM_PIE) ? "pie" + : xname(otmp))); /* catchall; not used */ mtmp->mcansee = 0; tmp = (int) mtmp->mblinded + rnd(25) + 20; if (tmp > 127)