summaryrefslogtreecommitdiff
path: root/src/monster.h
diff options
context:
space:
mode:
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