NetHack Patch Database v0.27

323 patches

New Speed System

NameNew Speed System v1.0
RatingNot rated
AuthorMichael Hedera
ForNetHack 3.3.1
DescriptionImproved speed system
 All the monsters and the player have their counters (mtmp->movement and youmonst.movement, respectively). The game goes in little steps (counted by mainclock), at each step decrementing the player's and monters' counters (if positive) by TIME_STEP, by default 10. When a monster's counter is <= 0, this monster will move: a variable (mtmp->timet) is set to the base time taken by the move, then the move happens, then mtmp->timet (randomized a bit) is added to the monster's movement counter.

As I wanted to keep the patch relatively short, I left the general layout of moveloop() unchanged, so the code still looks very assymetrical; the part handling player's move is done "inside out".

The mtmp->timet can in principle be modified during the "move happens". This should make it relatively straightforward to make different actions take different amounts of time: just add:
mtmp->timet = 3 * mtmp->timet / 5
or somesuch in the code performing given action.

The base time taken by a monster's move is NLENUNIT (default 1440) divided by monster's speed; immobile creatures get a special treatment.

The patch also uses flags.step, which is true if the last player's move was... well... movement, not fight or something else. It is used in allmain.c to (hopefully) fix the bug of steeds being speeded up by the player wearing speed boots.
DownloadGet it from us (12.1 Kb)
AddedJune 06, 2006 18:59
Submit an update to this patch

Add a comment

Name ()required
Rating (0 is worst, 5 is best) 
Commentrequired
You can use up to 1024 characters.
Only supported tag is [url]clickable_link[/url].

You will need to answer the following question correctly: What symbol represents a wand?