From 1a97dce7278275c14c1e98c157e9024b1ac1a0ea Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 6 Sep 2019 14:39:25 -0700 Subject: [PATCH] fix github issue 218 = hallu vs passive gaze Fixes #218 Hallucinating hero has 75% to be unaffected by a gaze counterattack that paralyzes. Check for that before checking free action (100% chance to be unaffected). The only change is that player might get different feedback when both forms of protection against the gaze. --- doc/fixes36.3 | 4 +++- src/uhitm.c | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d0f1fcb89..734272ffa 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.108 $ $NHDT-Date: 1567418344 2019/09/02 09:59:04 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.110 $ $NHDT-Date: 1567805962 2019/09/06 21:39:22 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -137,6 +137,8 @@ when spellcasting monster aimed at wrong spot due to not being able to see invisible hero, feedback could be erroneous if hero could see self [messages used 'if (Invisible)' test where 'if (Invis)' was meant] prevent impossible when guard tries to relocate a monster on a full level +hallucination provides partial protection from passive gaze counterattack + against hero's attack; check for that before checking for free action Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/uhitm.c b/src/uhitm.c index 83bb49ca2..371b3fd99 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 uhitm.c $NHDT-Date: 1562876956 2019/07/11 20:29:16 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.211 $ */ +/* NetHack 3.6 uhitm.c $NHDT-Date: 1567805813 2019/09/06 21:36:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.212 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2854,13 +2854,16 @@ boolean wep_was_destroyed; if (ureflects("%s gaze is reflected by your %s.", s_suffix(Monnam(mon)))) { ; - } else if (Free_action) { - You("momentarily stiffen under %s gaze!", - s_suffix(mon_nam(mon))); } else if (Hallucination && rn2(4)) { + /* [it's the hero who should be getting paralyzed + and isn't; this message describes the monster's + reaction rather than the hero's escape] */ pline("%s looks %s%s.", Monnam(mon), !rn2(2) ? "" : "rather ", !rn2(2) ? "numb" : "stupified"); + } else if (Free_action) { + You("momentarily stiffen under %s gaze!", + s_suffix(mon_nam(mon))); } else { You("are frozen by %s gaze!", s_suffix(mon_nam(mon))); nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -127);