diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-13 05:17:12 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-13 05:17:12 +0000 |
commit | a3ba5a8ee29de19bb37c6718f56f5f184d58be6a (patch) | |
tree | e2ee6a6a9fb04218050fafcc263739d34c9a4b16 /crawl-ref/source/player.cc | |
parent | 79c8875dd3844dcc3a027013d536b6d10ddc8480 (diff) | |
download | crawl-ref-a3ba5a8ee29de19bb37c6718f56f5f184d58be6a.tar.gz crawl-ref-a3ba5a8ee29de19bb37c6718f56f5f184d58be6a.zip |
This change breaks savefile compatibility.
Removed speed_inc field from monsterentry struct and added field
energy_usage, which lets a monster take different amounts of time for
different types of actions, defaulting to 10 points of energy for
everything but picking up an object, which defaults to 100% of the
monster's speed (the same as before this change). This is currently
only used to make curse toes move at half the speed with which they
attack (which was previously hard-coded), but is could be used for a
lot of interesting things.
A related change is that the manner in which apply_enchantment() deals
with a monster moving at a different rate than the player has changed
for monsters with non-zero-speed. As an example, giant bats have a
speed of 30, which means that apply_enchantments() gets called three
times per player move if the player is at normal speed;
apply_enchantment() has to compensate for this so that a poisoned bat
doesn't suffer three times the damage as a monster with speed 10.
Monsters being able to do things in energy increments of other than 10
complicated this, and the easiest way to deal with the complication
was to keep track of how much energy a monster had recently expended
with the new monsters class member ench_countdown, and use that to
call apply_enchantments() once for every normal-speed player move
(zero-speed monsters are still dealt with in the same manner as
before). Because of this, the "spd" variable in apply_enchantment()
and decay_enchantment() is normalized to 10 for all non-zero-speed
monsters. This doesn't work for ENCH_HELD, since a fast monster
should be able to escape from a net more quickly than a slow monster.
I've tried to compensate for this, but I'm not sure if I've done it
right.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2450 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
0 files changed, 0 insertions, 0 deletions