fix github issue #266 - timed clairvoyance

When the hero has random clairvoyance, the code used
| (moves % 15) == 0 && rn2(2) != 0
(where 'moves' is actually the turn number) to decide when it would
kick in and show a portion of the map.  If the hero was fast enough
to get an extra move when the turn value met the (moves % 15) == 0
condition then clairvoyance could happen twice (or more if poly'd)
on the same turn.

The changes (one new field, reordering a few others) in 'struct
context' invalidate existing 3.7.0-x save files.

Fixes #266
This commit is contained in:
PatR
2019-12-22 13:30:25 -08:00
parent 9b9925828a
commit 48a82fea8c
4 changed files with 33 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ $NHDT-Date: 1576288434 2019/12/14 01:53:54 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.26 $ $NHDT-Date: 1577050214 2019/12/22 21:30:14 $
General Fixes and Modified Features
-----------------------------------
@@ -13,6 +13,7 @@ improvements to pronoun usage when hallucinating
function calls made from mapglyph based on dungeon level are now called once
per level
fix accessing mons[-1] when trying to gate in a non-valid demon
fast hero could have random clairvoyance happen more than once on same turn
Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository
@@ -56,7 +57,7 @@ Code Cleanup and Reorganization
move majority of global variables into instance_globals struct g
move zeroobj, zeromonst, zeroany into const_globals struct cg
remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR
old Qt moved from win/Qt to win/Qt3
old Qt moved from win/Qt to win/Qt3 and files renamed to use qt3_ prefix
more current Qt for Qt version 4 and 5 moved from win/Qt4 to win/Qt; qt4
moniker changed to qt_