summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 512d682b..1f57b0b2 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -29,5 +29,23 @@
void Being::update()
{
if (mController)
- mController->update();
-}
+ mController->update();
+
+ mHitsTaken.clear();
+}
+
+void Being::damage(Damage damage)
+{
+ int HPloss;
+
+ HPloss = damage; // TODO: Implement complex damage calculation here
+
+ mHitpoints -= HPloss;
+ mHitsTaken.push_back(HPloss);
+ LOG_DEBUG("Being " << getPublicID() << " got hit", 0);
+}
+
+void Being::performAttack(MapComposite* map)
+{
+ //Monster attack
+}