diff --git a/doc/xnh-changelog-9.0.md b/doc/xnh-changelog-9.0.md index 2cba5ad4b..584afc7db 100644 --- a/doc/xnh-changelog-9.0.md +++ b/doc/xnh-changelog-9.0.md @@ -38,6 +38,8 @@ changes: - When you #chat and are next to only one observable monster, you will automatically attempt to chat to that monster without being prompted for a direction to chat in. +- When you are a few turns from temporary invisibility expiring, you receive a + message warning you that you're becoming visible again. ### Architectural changes diff --git a/src/timeout.c b/src/timeout.c index 5e138f189..d0eb0e5c2 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -9,6 +9,7 @@ static void stoned_dialogue(void); static void vomiting_dialogue(void); static void choke_dialogue(void); static void levitation_dialogue(void); +static void reappear_dialogue(void); static void slime_dialogue(void); static void slimed_to_death(struct kinfo *); static void sickness_dialogue(void); @@ -388,6 +389,23 @@ levitation_dialogue(void) } } +static void +reappear_dialogue(void) +{ + if (EInvis) + return; + + if ((HInvis & TIMEOUT) == 5) { + if (Hallucination) { + You("are starting to get less clarified."); + } else if (See_invisible) { + You("are beginning to unfade."); + } else { + Your("outline is starting to become visible."); + } + } +} + static NEARDATA const char *const slime_texts[] = { "You are turning a little %s.", /* 5 */ "Your limbs are getting oozy.", /* 4 */ @@ -587,6 +605,8 @@ nh_timeout(void) else if (u.uluck < baseluck && (nostone || time_luck > 0)) u.uluck++; } + if (HInvis & TIMEOUT) + reappear_dialogue(); if (u.uinvulnerable) return; /* things past this point could kill you */ if (Stoned)