From b4b251b61858426b1ca51f0ffd259cd93fc56bd6 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 7 May 2023 01:03:29 -0700 Subject: [PATCH] temporary blindness vs permanent blindness While testing the fix for unicorn horn vs blindness, I noticed that when 'blind from birth' (OPTIONS=blind) you would get "your vision seems to dim for a moment but is normal now" when timed blindness was added to persistent blindness. That happened for both 3.6.x and to-be-3.7. Change it "you have a strange feeling for a moment". In 3.7, having temporary blindness timeout while permanently blind produced "your vision seems to brighten for a moment but is normal now". Change that to strange feeling too. For some reason I haven't tried to figure out, 3.6.x stayed silent when this took place. --- doc/fixes3-7-0.txt | 2 ++ src/potion.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 349b41df1..15246339d 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1178,6 +1178,8 @@ hangup in wizard or explore mode would result in answering ESC to "Die?" resulted in repeat death then the program might get stuck in a loop instead of exiting [no reports of such, but if it ever happened the process was probably killed without anyone knowing why it happened] +with OPTIONS=blind (blind from birth), being inflicted with timed blinding + yielded "your vision seems to dim for a moment but is normal now" Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/potion.c b/src/potion.c index 0a0205af0..27bd237d6 100644 --- a/src/potion.c +++ b/src/potion.c @@ -281,7 +281,7 @@ make_blinded(long xtime, boolean talk) } else if (old && !xtime) { /* clearing temporary blindness without toggling blindness */ if (talk) { - if (!haseyes(gy.youmonst.data)) { + if (!haseyes(gy.youmonst.data) || PermaBlind) { strange_feeling((struct obj *) 0, (char *) 0); } else if (Blindfolded) { eyes = body_part(EYE); @@ -307,7 +307,7 @@ make_blinded(long xtime, boolean talk) } else if (!old && xtime) { /* setting temporary blindness without toggling blindness */ if (talk) { - if (!haseyes(gy.youmonst.data)) { + if (!haseyes(gy.youmonst.data) || PermaBlind) { strange_feeling((struct obj *) 0, (char *) 0); } else if (Blindfolded) { eyes = body_part(EYE); @@ -1560,6 +1560,8 @@ H2Opotion_dip( res = TRUE; } return res; +#undef COST_alter) +#undef COST_none) } /* used when blessed or cursed scroll of light interacts with artifact light;