#ifndef CREATURELIB_ATTACKUSEHISTORY_HPP #define CREATURELIB_ATTACKUSEHISTORY_HPP #include "../../Models/ExecutingAttack.hpp" #include "HistoryElement.hpp" namespace CreatureLib::Battling { class AttackUseHistory final : public HistoryElement { std::unique_ptr _attack; protected: void Clear() override { if (_attack != nullptr) { _attack.reset(); } HistoryElement::Clear(); } public: AttackUseHistory(const ExecutingAttack* attack) : _attack(attack) {} HistoryElementKind GetKind() const noexcept override { return HistoryElementKind::AttackUse; } ArbUt::BorrowedPtr GetAttack() const noexcept { return _attack; } }; } #endif // CREATURELIB_ATTACKUSEHISTORY_HPP