]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/AttackGoal.hpp
aggression
[blobs.git] / src / creature / AttackGoal.hpp
diff --git a/src/creature/AttackGoal.hpp b/src/creature/AttackGoal.hpp
new file mode 100644 (file)
index 0000000..ab8056f
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef BLOBS_CREATURE_ATTACKGOAL_HPP_
+#define BLOBS_CREATURE_ATTACKGOAL_HPP_
+
+#include "Goal.hpp"
+
+namespace blobs {
+namespace creature {
+
+class AttackGoal
+: public Goal {
+
+public:
+       AttackGoal(Creature &self, Creature &target);
+       ~AttackGoal() override;
+
+public:
+       std::string Describe() const override;
+       void Tick(double dt) override;
+       void Action() override;
+       void OnBackground() override;
+
+       void SetDamageTarget(double t) noexcept { damage_target = t; }
+
+private:
+       Creature ⌖
+       double damage_target;
+       double damage_dealt;
+       double cooldown;
+
+};
+
+}
+}
+
+#endif