summaryrefslogtreecommitdiff
path: root/src/monster.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
commite99b6aaeb119feabfa2f7c3c49908625981e9708 (patch)
tree00f599c90443be884b9b8b51618552c2f8834f2d /src/monster.h
parenteadbe0cb009b8c8fec622946f0b0109a2f07b1f1 (diff)
downloadmana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.gz
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.bz2
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.xz
mana-e99b6aaeb119feabfa2f7c3c49908625981e9708.zip
Now different sounds can play when a monster misses the player.
Diffstat (limited to 'src/monster.h')
-rw-r--r--src/monster.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/monster.h b/src/monster.h
index 3d3cd546..1b666db4 100644
--- a/src/monster.h
+++ b/src/monster.h
@@ -26,6 +26,8 @@
#include "being.h"
+class MonsterInfo;
+
class Monster : public Being
{
public:
@@ -36,6 +38,22 @@ class Monster : public Being
virtual void setAction(Uint8 action);
virtual Type getType() const;
+
+ /**
+ * 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).
+ */
+ virtual void handleAttack(Being *victim, int damage);
+
+ protected:
+ /**
+ * Returns the MonsterInfo, with static data about this monster.
+ */
+ const MonsterInfo&
+ getInfo() const;
};
#endif