]> granicus.if.org Git - nethack/commitdiff
fix #H2588 - turn order alternation bug
authornethack.rankin <nethack.rankin>
Wed, 16 May 2012 01:47:18 +0000 (01:47 +0000)
committernethack.rankin <nethack.rankin>
Wed, 16 May 2012 01:47:18 +0000 (01:47 +0000)
     From a bug report, when the hero has
precisely 24 movement points, fast monsters will move twice and then the
hero will move twice, instead of being interleaved.  The hero will get 24
additonal movement points approximately one turn out of three when wearing
speed boots (or when using spell of haste self or potion of speed) and can
also get 18 additional points twice in succession, with a net of 24 after
12 of them are used on the first turn.  But hero might not be starting at
zero at the time, so I'm not sure how often this is actually noticeable.

     He apparently got a report about this for <some variant> and had some
user-contributed instrumentation in place that made it easier to replicate.
This fix is the one he suggested.

doc/fixes35.0
src/allmain.c

index 1d52652e612d18869d46a7fbb03468f7584a8e29..74fa5f47b7975a88153e6cdef471414363ecbe3f 100644 (file)
@@ -840,6 +840,8 @@ declining to attack a peaceful monster via movement used up nutrition even
 declining to attack a peaceful monster via kicking woke nearby monsters and
        scuffed engraving at hero's location even though no action took place
 make hero be immune from stinking cloud damage during successful prayer
+very fast hero would sometimes take two consecutive moves with very fast
+       monsters then getting two moves, instead of interleaving the activity
 
 
 Platform- and/or Interface-Specific Fixes
index 8744323b25c71fc64a1691b650bc1a36f326005e..1742a302c632b3312c60d26c0c49cb2ab0eed5df 100644 (file)
@@ -97,7 +97,7 @@ boolean resuming;
                context.mon_moving = TRUE;
                do {
                    monscanmove = movemon();
-                   if (youmonst.movement > NORMAL_SPEED)
+                   if (youmonst.movement >= NORMAL_SPEED)
                        break;  /* it's now your turn */
                } while (monscanmove);
                context.mon_moving = FALSE;