#ifndef CREATURELIB_LEARNEDATTACK_HPP #define CREATURELIB_LEARNEDATTACK_HPP #include #include #include "../../Library/Attacks/AttackData.hpp" #include "AttackLearnMethod.hpp" namespace CreatureLib::Battling { class LearnedAttack { borrowed_ptr _attack; uint8_t _maxUses; uint8_t _remainingUses; AttackLearnMethod _learnMethod; public: LearnedAttack(const borrowed_ptr& attack, uint8_t maxUses, AttackLearnMethod learnMethod); LearnedAttack(const borrowed_ptr& attack, AttackLearnMethod learnMethod); virtual ~LearnedAttack() = default; const borrowed_ptr& GetAttack() const noexcept; uint8_t GetMaxUses() const noexcept; uint8_t GetRemainingUses() const noexcept; AttackLearnMethod GetLearnMethod() const noexcept; virtual bool TryUse(uint8_t uses) noexcept; virtual void DecreaseUses(uint8_t amount) noexcept; virtual void RestoreUses(uint8_t amount) noexcept; virtual void RestoreAllUses() noexcept; }; } #endif // CREATURELIB_LEARNEDATTACK_HPP