From 0d2752d05dfed3356bfdd4977b9c8cde39a0d2ea Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 16 Feb 2026 19:51:04 -0800 Subject: [PATCH] more cursed potion of invisibility Give feedback if a visible monster drinks a potion of invisibility that happens to be cursed so monster fails to become invisible, or if hero hits a visible monster with a cursed potion of invisibility and it fails to become invisible. --- src/muse.c | 7 +++++++ src/potion.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/muse.c b/src/muse.c index 8c95e00ec..aa0474e4e 100644 --- a/src/muse.c +++ b/src/muse.c @@ -2439,6 +2439,13 @@ use_misc(struct monst *mtmp) } if (oseen) makeknown(otmp->otyp); + } else if (vismon && !mtmp->minvis) { + /* cursed potion; mon tried to make itself invisible but failed */ + pline("%s briefly seems to be transparent.", Monnam(mtmp)); + /* we could call map_invisible() before the pline(), then + newsym() after; unseen monster glyph would be visible during + the pline, but hero would forget any remembered object under + the monster */ } else if (!vismon && canseemon(mtmp)) { /* cursed potion; this won't happen because a monster will only drink a potion of invisibility when not already invisible */ diff --git a/src/potion.c b/src/potion.c index 2ea79fb44..1758d16b8 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1785,6 +1785,9 @@ potionhit(struct monst *mon, struct obj *obj, int how) if (sawit && !canspotmon(mon)) { if (cansee(mon->mx, mon->my)) map_invisible(mon->mx, mon->my); + } else if (sawit && cursed_potion) { + pline("%s briefly seems to be transparent.", Monnam(mon)); + /* see use_misc(muse.c) for comment about map_invisible() */ } else if (!sawit && canspotmon(mon)) { /* if an invisible mon glyph was present, mon_set_minvis()'s newsym() has gotten rid of it */