Initial commit.

This commit is contained in:
2019-12-29 15:29:52 +01:00
commit 9a45d34f9f
22 changed files with 18180 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#include "PokemonForme.hpp"
PkmnLib::Library::PokemonForme::PokemonForme(std::string name, float height, float weight, uint32_t baseExperience,
std::vector<uint8_t> types,
CreatureLib::Core::StatisticSet<uint16_t> baseStats,
std::vector<std::string> talents, std::vector<std::string> secretTalents,
const CreatureLib::Library::LearnableAttacks* attacks)
: SpeciesVariant(name, height, weight, baseExperience, types, baseStats, talents, secretTalents, attacks) {}

View File

@@ -0,0 +1,18 @@
#ifndef PKMNLIB_POKEMONFORME_HPP
#define PKMNLIB_POKEMONFORME_HPP
#include <Library/CreatureData/SpeciesVariant.hpp>
namespace PkmnLib::Library {
class PokemonForme : public CreatureLib::Library::SpeciesVariant {
public:
PokemonForme(std::string name, float height, float weight, uint32_t baseExperience, std::vector<uint8_t> types,
CreatureLib::Core::StatisticSet<uint16_t> baseStats, std::vector<std::string> talents,
std::vector<std::string> secretTalents, const CreatureLib::Library::LearnableAttacks* attacks);
private:
public:
};
}
#endif // PKMNLIB_POKEMONFORME_HPP

View File

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

View File

@@ -0,0 +1,29 @@
#ifndef PKMNLIB_POKEMONSPECIES_HPP
#define PKMNLIB_POKEMONSPECIES_HPP
#include <Battling/Models/Creature.hpp>
#include "PokemonForme.hpp"
namespace PkmnLib::Library {
class PokemonSpecies : public CreatureLib::Library::CreatureSpecies {
private:
uint8_t _baseHappiness;
public:
PokemonSpecies(uint16_t id, const std::string& name, const PokemonForme* defaultVariant, float genderRatio,
const std::string& growthRate, uint8_t captureRate, uint8_t baseHappiness)
: CreatureSpecies(id, name, defaultVariant, genderRatio, growthRate, captureRate),
_baseHappiness(baseHappiness) {}
inline uint8_t GetBaseHappiness() const { return _baseHappiness; }
inline const PokemonForme* GetDefaultForme() const {
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant("default"));
}
inline const PokemonForme* GetForme(const std::string& key) const {
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant(key));
}
};
}
#endif // PKMNLIB_POKEMONSPECIES_HPP

View File

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

View File

@@ -0,0 +1,22 @@
#ifndef PKMNLIB_SPECIESLIBRARY_HPP
#define PKMNLIB_SPECIESLIBRARY_HPP
#include <Library/SpeciesLibrary.hpp>
#include "PokemonSpecies.hpp"
namespace PkmnLib::Library {
class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary {
public:
inline const PokemonSpecies* GetPkmnSpecies(const std::string& name) const {
return reinterpret_cast<const PokemonSpecies*>(CreatureLib::Library::SpeciesLibrary::GetSpecies(name));
}
const PokemonSpecies* operator[](const std::string& name) const { return GetPkmnSpecies(name); }
void LoadSpecies(const std::string& name, const PokemonSpecies* species){
CreatureLib::Library::SpeciesLibrary::LoadSpecies(name, species);
}
};
}
#endif // PKMNLIB_SPECIESLIBRARY_HPP