diff options
author | sniper <sniper@livecd.janhome.net> | 2009-03-10 14:28:31 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-10 09:02:53 -0600 |
commit | 2353f11b75e347c9662c7224f5b3abcd9189a6bb (patch) | |
tree | bf4c6b7dca4cab6b6bacf5e32c51518cbd327ae5 /src/localplayer.h | |
parent | 1570fb33d5909786ef2997246ada7c46dd6de9e4 (diff) | |
download | mana-2353f11b75e347c9662c7224f5b3abcd9189a6bb.tar.gz mana-2353f11b75e347c9662c7224f5b3abcd9189a6bb.tar.bz2 mana-2353f11b75e347c9662c7224f5b3abcd9189a6bb.tar.xz mana-2353f11b75e347c9662c7224f5b3abcd9189a6bb.zip |
Extended hit type handling
The client can now differentiate between the following hit types:
- hit (normal)
- critical (full attack)
- multi (more than one hit at once, currently not used)
- reflect (reflected damage, currently not used)
- flee (dodging criticals)
The Being's showCrit method is now merged into takeDamage.
Being's takeDamage and handleAttack now both get the opponent, the amount of
damage and the attack type as parameter.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index 85868750..16e7c124 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -143,11 +143,11 @@ class LocalPlayer : public Player * displayed as soon as the player attacks, not when the server says * the player does. * - * @param victim The attacked being. - * @param damage The amount of damage dealt (0 means miss). + * @param victim the victim being + * @param damage the amount of damage dealt (0 means miss) + * @param type the attack type */ - virtual void handleAttack(Being *victim, int damage) {} - + virtual void handleAttack(Being *victim, int damage, AttackType type) {} /** * Returns the current target of the player. Returns 0 if no being is * currently targeted. |