diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-06-10 15:11:01 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-07-07 21:56:14 +0200 |
commit | 4cf22065e9f2b24eb481959aa65667ef1bd0724d (patch) | |
tree | b7bfe1214fd1a0c6bfe99be35204c537a050cac9 /src/utils/mathutils.cpp | |
parent | 576431fb11a3dbc256fbd1f5a853a5be719f1879 (diff) | |
download | manaserv-4cf22065e9f2b24eb481959aa65667ef1bd0724d.tar.gz manaserv-4cf22065e9f2b24eb481959aa65667ef1bd0724d.tar.bz2 manaserv-4cf22065e9f2b24eb481959aa65667ef1bd0724d.tar.xz manaserv-4cf22065e9f2b24eb481959aa65667ef1bd0724d.zip |
Work on (Auto)Attack system.
During the implementation bjorn and I agreed to limit the number of attacks that
can be used in the same tick to one. This makes a lot of stuff easier and the
client cannot display two frames at the same time
Things done:
- Implemented setting of attacks when equipping/unequipping items
- Single place where the xml attack node is parsed
- Finished attack logic
- Unified the attack handling of monsters and characters
- Added a global cooldown after attack use
(not only for next use of same attack)
- Removed the temponary attributes for the monster attack values
- Priorities for all attacks
- Rewrote the attack core:
- Attacks now have this attributes:
- warmup -> time a attack needs after starting it to actually deal the damage
- cooldown -> time a attack needs after dealing damage before another attack
can be used
- reuse -> time before the same attack can be used again
- If no attack is performed at the moment the following is done:
- make a list with all ready attacks
- check for attack that has the necessarily range and highest priority
- start this attack (inform client about it)
- when warmup is finished -> trigger damage
- when cooldown is finished -> allow to use other (or the same if reusetimer
allows) attacks
TODO:
- sync client with this to allow better timed animations
Diffstat (limited to 'src/utils/mathutils.cpp')
0 files changed, 0 insertions, 0 deletions