Initial commit.
This commit is contained in:
10
src/Library/Moves/MoveCategory.hpp
Normal file
10
src/Library/Moves/MoveCategory.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef PKMNLIB_MOVECATEGORY_HPP
|
||||
#define PKMNLIB_MOVECATEGORY_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace PkmnLib::Library {
|
||||
enum class MoveCategory : uint8_t { Physical, Special, Status };
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_MOVECATEGORY_HPP
|
||||
12
src/Library/Moves/MoveData.cpp
Normal file
12
src/Library/Moves/MoveData.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "MoveData.hpp"
|
||||
#include <unitypes.h>
|
||||
PkmnLib::Library::MoveData::MoveData(std::string name, std::string type, PkmnLib::Library::MoveCategory category,
|
||||
uint8_t power, uint8_t accuracy, uint8_t baseUsage,
|
||||
CreatureLib::Library::AttackTarget target, uint8_t priority,
|
||||
std::unordered_set<std::string> flags)
|
||||
: AttackData(name, type, static_cast<CreatureLib::Library::AttackCategory>(category), power, accuracy, baseUsage,
|
||||
target, priority, flags) {}
|
||||
|
||||
PkmnLib::Library::MoveCategory PkmnLib::Library::MoveData::GetCategory() const {
|
||||
return static_cast<PkmnLib::Library::MoveCategory>(AttackData::GetCategory());
|
||||
}
|
||||
21
src/Library/Moves/MoveData.hpp
Normal file
21
src/Library/Moves/MoveData.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef PKMNLIB_MOVEDATA_HPP
|
||||
#define PKMNLIB_MOVEDATA_HPP
|
||||
|
||||
#include <Library/Attacks/AttackData.hpp>
|
||||
#include <unitypes.h>
|
||||
#include "MoveCategory.hpp"
|
||||
|
||||
namespace PkmnLib::Library {
|
||||
class MoveData : public CreatureLib::Library::AttackData {
|
||||
private:
|
||||
|
||||
public:
|
||||
MoveData(std::string name, std::string type, PkmnLib::Library::MoveCategory category, uint8_t power,
|
||||
uint8_t accuracy, uint8_t baseUsage, CreatureLib::Library::AttackTarget target, uint8_t priority,
|
||||
std::unordered_set<std::string> flags);
|
||||
|
||||
PkmnLib::Library::MoveCategory GetCategory() const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_MOVEDATA_HPP
|
||||
4
src/Library/Moves/MoveLibrary.cpp
Normal file
4
src/Library/Moves/MoveLibrary.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#include "MoveLibrary.hpp"
|
||||
const CreatureLib::Library::AttackData* PkmnLib::Library::MoveLibrary::operator[](const std::string& name) const {
|
||||
return AttackLibrary::operator[](name);
|
||||
}
|
||||
12
src/Library/Moves/MoveLibrary.hpp
Normal file
12
src/Library/Moves/MoveLibrary.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef PKMNLIB_MOVELIBRARY_HPP
|
||||
#define PKMNLIB_MOVELIBRARY_HPP
|
||||
|
||||
#include <Library/AttackLibrary.hpp>
|
||||
namespace PkmnLib::Library {
|
||||
class MoveLibrary : public CreatureLib::Library::AttackLibrary {
|
||||
public:
|
||||
virtual const CreatureLib::Library::AttackData* operator[](const std::string& name) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_MOVELIBRARY_HPP
|
||||
Reference in New Issue
Block a user