#ifndef PKMNLIB_LEARNEDMOVE_HPP #define PKMNLIB_LEARNEDMOVE_HPP #include #include "../../Library/Moves/MoveData.hpp" namespace PkmnLib::Battling { class LearnedMove final : public CreatureLib::Battling::LearnedAttack { public: LearnedMove(const ArbUt::BorrowedPtr& move, CreatureLib::Battling::AttackLearnMethod learnMethod) : CreatureLib::Battling::LearnedAttack(move.As(), learnMethod) {} const ArbUt::BorrowedPtr GetMoveData() const { return GetAttack().ForceAs(); } LearnedAttack* non_null Clone() const override { auto move = new LearnedMove(GetAttack().ForceAs(), GetLearnMethod()); move->DecreaseUses(GetMaxUses() - GetRemainingUses()); return move; } }; } #endif // PKMNLIB_LEARNEDMOVE_HPP