From 8cf70f77710e73c400bec5bb4a4aa8f6719b446d Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 2 Sep 2019 02:59:09 -0700 Subject: [PATCH] fix github issue 217 - monster spellcasting feedback Fixes #217 Feedback when spellcasting monster aimed at the wrong spot due to not being able to see an invisible hero only gave the intended message if hero couldn't see self. The code was using 'if (Invisible)' which checks whether the hero is invisible and can't see invisible, when it should have been using 'if (Invis)' which just tests whether the hero is invisible. It wouldn't surprise if the same problem occurs elsewhere. Those macros are rather error prone. The issue report mentions that one of the affected messages might be unreachable. I didn't investigate that. --- doc/fixes36.3 | 5 ++++- src/mcastu.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 14df3035f..f51350117 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.107 $ $NHDT-Date: 1567302620 2019/09/01 01:50:20 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.108 $ $NHDT-Date: 1567418344 2019/09/02 09:59:04 $ 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, @@ -133,6 +133,9 @@ have 'O' update persistent inventory window if 'implicit_uncursed', 'O's "set