summaryrefslogtreecommitdiff
path: root/src/monster.h
diff options
context:
space:
mode:
authorsniper <sniper@livecd.janhome.net>2009-03-10 14:28:31 +0100
committerJared Adams <jaxad0127@gmail.com>2009-03-10 08:01:51 -0600
commitcf49b996e41f6e28aa67fb2d6891c1b28e65d520 (patch)
treea12a5ee85064b2271e3c21554e89649ea07a3540 /src/monster.h
parent7aeec98b0d2ff6c034c78e9ae6572179a808cfc5 (diff)
downloadmana-cf49b996e41f6e28aa67fb2d6891c1b28e65d520.tar.gz
mana-cf49b996e41f6e28aa67fb2d6891c1b28e65d520.tar.bz2
mana-cf49b996e41f6e28aa67fb2d6891c1b28e65d520.tar.xz
mana-cf49b996e41f6e28aa67fb2d6891c1b28e65d520.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/monster.h')
-rw-r--r--src/monster.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/monster.h b/src/monster.h
index ab6f85df..7c16d178 100644
--- a/src/monster.h
+++ b/src/monster.h
@@ -47,17 +47,20 @@ class Monster : public Being
* Handles an attack of another being by this monster. Plays a hit or
* miss sound when appropriate.
*
- * @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);
/**
* Puts a damage bubble above this monster and plays the hurt sound
*
- * @param amount The amount of damage.
+ * @param attacker the attacking being
+ * @param damage the amount of damage recieved (0 means miss)
+ * @param type the attack type
*/
- virtual void takeDamage(int amount);
+ virtual void takeDamage(Being *attacker, int amount, AttackType type);
/**
* Returns the MonsterInfo, with static data about this monster.