From: nethack.rankin Date: Wed, 16 May 2012 02:15:10 +0000 (+0000) Subject: addtional monster movement tweak X-Git-Tag: MOVE2GIT~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b90d87ec3c1202405cd6640fde255dbd9410dd67;p=nethack addtional monster movement tweak Introduce some variation in monster movement by adding and substracting small random amounts to the fixed increment from the main monster table. The amount added is potentially bigger (average is +2) than the amount substracted (average is +1), so monsters will tend to be slightly faster. Probably not noticeable except for super-slow monsters not being so glacially slow, since net +1 is a bigger relative increase for such critters' low movement rates. In practice, the noticeable effect will be that ordinary speed monsters will occasionally get an extra move even if/when player keeps the hero unburdened. Possible extension (although I'm not planning to do it): sort the monster list by pending movement points, so that faster monsters move before slower ones. The random variation would become noticeable because groups of same-speed monsters would alter their movement order depending upon who got a bigger increment or smaller decrement on that turn. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 74fa5f47b..5a57db943 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1049,6 +1049,7 @@ bones files now include extra data to identify dead hero and reason for death dipping multiple potions in another potion may only dip part of their stack make being inside a stinking cloud (when not immune or resistant) become a major trouble which is fixable by prayer +introduce some variation in monster movement rates Platform- and/or Interface-Specific New Features diff --git a/src/mon.c b/src/mon.c index aff3ee4e2..ae6394d13 100644 --- a/src/mon.c +++ b/src/mon.c @@ -454,8 +454,16 @@ struct monst *mon; /* average movement is 1.50 times normal */ mmove = ((rn2(2) ? 4 : 5) * mmove) / 3; } - } + } else #endif + if (mmove) { + /* vary movement points allocated to slightly reduce predictability; + random increment (avg +2) exceeds random decrement (avg +1) by + a small amount; normal speed monsters will occasionally get an + extra move and slow ones won't be quite as slow */ + mmove += rn2(5) - rn2(3); /* + 0..4 - 0..2, average net +1 */ + if (mmove < 1) mmove = 1; + } return mmove; }