SUpport for EggMoves
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-08-11 19:36:18 +02:00
parent badfccf440
commit 9274b675e9
4 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1 @@
#include "LearnableMoves.hpp"

View File

@@ -0,0 +1,25 @@
#ifndef PKMNLIB_LEARNABLEMOVES_HPP
#define PKMNLIB_LEARNABLEMOVES_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <CreatureLib/Library/CreatureData/LearnableAttacks.hpp>
#include "../Moves/MoveData.hpp"
namespace PkmnLib::Library {
class LearnableMoves : CreatureLib::Library::LearnableAttacks {
ArbUt::List<ArbUt::BorrowedPtr<const MoveData>> _eggMoves;
public:
explicit LearnableMoves(size_t levelAttackCapacity) : LearnableAttacks(levelAttackCapacity) {}
void AddEggMove(const ArbUt::BorrowedPtr<const MoveData>& move) noexcept {
if (!_eggMoves.Contains(move))
_eggMoves.Append(move);
}
const ArbUt::List<ArbUt::BorrowedPtr<const MoveData>>& GetEggMoves() const noexcept { return _eggMoves; }
};
}
#endif // PKMNLIB_LEARNABLEMOVES_HPP