2020-01-02 17:02:40 +00:00
|
|
|
#ifndef PKMNLIB_LEARNEDMOVE_HPP
|
|
|
|
#define PKMNLIB_LEARNEDMOVE_HPP
|
|
|
|
|
2020-02-08 18:22:29 +00:00
|
|
|
#include <CreatureLib/Battling/Models/LearnedAttack.hpp>
|
2020-01-02 17:02:40 +00:00
|
|
|
#include "../../Library/Moves/MoveData.hpp"
|
|
|
|
namespace PkmnLib::Battling {
|
2020-10-15 16:13:00 +00:00
|
|
|
class LearnedMove final : public CreatureLib::Battling::LearnedAttack {
|
2020-01-26 14:18:04 +00:00
|
|
|
public:
|
2020-05-27 15:26:25 +00:00
|
|
|
LearnedMove(const ArbUt::BorrowedPtr<const Library::MoveData>& move,
|
|
|
|
CreatureLib::Battling::AttackLearnMethod learnMethod)
|
|
|
|
: CreatureLib::Battling::LearnedAttack(move.As<const CreatureLib::Library::AttackData>(), learnMethod) {}
|
2020-01-26 14:18:04 +00:00
|
|
|
|
2020-05-27 15:26:25 +00:00
|
|
|
const ArbUt::BorrowedPtr<const Library::MoveData> GetMoveData() const {
|
2020-07-04 17:33:26 +00:00
|
|
|
return GetAttack().ForceAs<const Library::MoveData>();
|
2020-05-27 15:26:25 +00:00
|
|
|
}
|
2021-04-11 14:27:21 +00:00
|
|
|
|
|
|
|
LearnedAttack* Clone() const override {
|
|
|
|
auto move = new LearnedMove(GetAttack().ForceAs<const Library::MoveData>(), GetLearnMethod());
|
|
|
|
move->DecreaseUses(GetMaxUses() - GetRemainingUses());
|
|
|
|
return move;
|
|
|
|
}
|
2020-01-02 17:02:40 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PKMNLIB_LEARNEDMOVE_HPP
|