From 9bd8fcf82abc5f0dcaa55e462894def35a374d42 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Mon, 12 Jan 2026 18:08:17 +0000 Subject: [PATCH] Cursed potions of invisibility remove intrinsic invisibility They still have their other current effects (aggravating monsters and granting temporary invisibility). This is mostly meant as a way of counteracting the "turn permanently invisible" effect of magic traps, for players who would rather their characters remained visible. Thanks to paxed for helping with this commit. --- doc/fixes3-7-0.txt | 1 + src/potion.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 055bf4054..1d7427bf7 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1567,6 +1567,7 @@ dragonhide can rot throwing ammo without a launcher produces a message polymorphing into a large polyform unequips rather than destroying cloaks clarify in the #quit message that it doesn't save the game +cursed potion of invisibility removes intrinsic invisibility Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/potion.c b/src/potion.c index ca7a2eaa5..072d33b29 100644 --- a/src/potion.c +++ b/src/potion.c @@ -827,6 +827,10 @@ peffect_invisibility(struct obj *otmp) if (otmp->cursed) { pline("For some reason, you feel your presence is known."); aggravate(); + + /* doing this gives temporary invisibility, but removes permanent + invisibility */ + HInvis &= ~FROMOUTSIDE; } }