From 282cc9383f02d81f7d1c7381e507146e95b2c3fa Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 31 Aug 2022 17:23:55 -0700 Subject: [PATCH] more summon nasties If the summon nasties spell creates a single monster, the feedback changes from "Monsters appear" to "A monster appears" but if you were invisible or displaced it still said "around". Avoid | A monster appears around a spot near you! or | A monster appears around your displaced image! --- src/mcastu.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mcastu.c b/src/mcastu.c index d2b64d777..1179988cb 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -409,22 +409,26 @@ cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum) impossible("bad wizard cloning?"); break; case MGC_SUMMON_MONS: { - int count; + int count = nasty(mtmp); - count = nasty(mtmp); /* summon something nasty */ - if (mtmp->iswiz) { + if (!count) { + ; /* nothing was created? */ + } else if (mtmp->iswiz) { verbalize("Destroy the thief, my pet%s!", plur(count)); } else { - const char *mappear = (count == 1) ? "A monster appears" - : "Monsters appear"; + boolean one = (count == 1); + const char *mappear = one ? "A monster appears" + : "Monsters appear"; /* messages not quite right if plural monsters created but only a single monster is seen */ if (Invis && !perceives(mtmp->data) && (mtmp->mux != u.ux || mtmp->muy != u.uy)) - pline("%s around a spot near you!", mappear); + pline("%s %s a spot near you!", mappear, + one ? "at" : "around"); else if (Displaced && (mtmp->mux != u.ux || mtmp->muy != u.uy)) - pline("%s around your displaced image!", mappear); + pline("%s %s your displaced image!", mappear, + one ? "by" : "around"); else pline("%s from nowhere!", mappear); }