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