X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2FAttackGoal.hpp;fp=src%2Fcreature%2FAttackGoal.hpp;h=ab8056ffe3d407d7003ea7ab333364d150a75d48;hb=cead4f0686af352cdbac1f2c2df9b6a21ad9faec;hp=0000000000000000000000000000000000000000;hpb=7e02b21428efa3ebec14a34d0c1f81e81d362bfc;p=blobs.git diff --git a/src/creature/AttackGoal.hpp b/src/creature/AttackGoal.hpp new file mode 100644 index 0000000..ab8056f --- /dev/null +++ b/src/creature/AttackGoal.hpp @@ -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