2020-01-02 17:02:40 +00:00
|
|
|
#ifndef PKMNLIB_CREATEPOKEMON_HPP
|
|
|
|
#define PKMNLIB_CREATEPOKEMON_HPP
|
|
|
|
|
|
|
|
#include <utility>
|
2020-01-05 14:18:30 +00:00
|
|
|
#include "Pokemon.hpp"
|
2020-01-02 17:02:40 +00:00
|
|
|
namespace PkmnLib::Battling {
|
|
|
|
class CreatePokemon {
|
|
|
|
private:
|
|
|
|
const BattleLibrary* _library;
|
2020-02-27 17:59:15 +00:00
|
|
|
Arbutils::CaseInsensitiveConstString _species;
|
|
|
|
Arbutils::CaseInsensitiveConstString _forme = "default"_cnc;
|
2020-01-02 17:02:40 +00:00
|
|
|
uint8_t _level;
|
|
|
|
std::string _nickname = "";
|
|
|
|
|
|
|
|
std::string _ability = "";
|
2020-01-02 19:26:01 +00:00
|
|
|
uint8_t _nature = 255;
|
2020-01-02 17:02:40 +00:00
|
|
|
CreatureLib::Library::Gender _gender = static_cast<CreatureLib::Library::Gender>(-1);
|
2020-02-27 17:59:15 +00:00
|
|
|
Arbutils::CaseInsensitiveConstString _heldItem = ""_cnc;
|
2020-01-02 17:02:40 +00:00
|
|
|
uint32_t _identifier = 0;
|
|
|
|
std::vector<std::tuple<const Library::MoveData*, CreatureLib::Battling::AttackLearnMethod>> _attacks = {};
|
|
|
|
|
|
|
|
uint8_t _ivHp = 0;
|
|
|
|
uint8_t _ivAttack = 0;
|
|
|
|
uint8_t _ivDefense = 0;
|
|
|
|
uint8_t _ivSpAtt = 0;
|
|
|
|
uint8_t _ivSpDef = 0;
|
|
|
|
uint8_t _ivSpeed = 0;
|
|
|
|
|
|
|
|
uint8_t _evHp = 0;
|
|
|
|
uint8_t _evAttack = 0;
|
|
|
|
uint8_t _evDefense = 0;
|
|
|
|
uint8_t _evSpAtt = 0;
|
|
|
|
uint8_t _evSpDef = 0;
|
|
|
|
uint8_t _evSpeed = 0;
|
|
|
|
|
2020-02-01 15:56:09 +00:00
|
|
|
bool _shininessSet = false;
|
|
|
|
bool _isShiny = false;
|
|
|
|
|
2020-01-02 17:02:40 +00:00
|
|
|
public:
|
2020-02-27 17:59:15 +00:00
|
|
|
CreatePokemon(const BattleLibrary* library, const Arbutils::CaseInsensitiveConstString& species, uint8_t level)
|
|
|
|
: _library(library), _species(species), _level(level) {}
|
2020-01-02 17:02:40 +00:00
|
|
|
|
2020-02-27 17:59:15 +00:00
|
|
|
CreatePokemon* WithForme(const Arbutils::CaseInsensitiveConstString& forme);
|
2020-02-01 15:56:09 +00:00
|
|
|
CreatePokemon* WithGender(CreatureLib::Library::Gender gender);
|
|
|
|
CreatePokemon* IsShiny(bool value);
|
2020-02-27 17:59:15 +00:00
|
|
|
CreatePokemon* WithHeldItem(const Arbutils::CaseInsensitiveConstString& item);
|
|
|
|
CreatePokemon* LearnMove(const Arbutils::CaseInsensitiveConstString& move, CreatureLib::Battling::AttackLearnMethod method);
|
2020-02-01 15:56:09 +00:00
|
|
|
|
2020-02-27 17:59:15 +00:00
|
|
|
CreatePokemon* WithRandomIndividualValues(Arbutils::Random rand = Arbutils::Random());
|
2020-01-02 19:26:01 +00:00
|
|
|
CreatePokemon* WithIndividualValue(CreatureLib::Core::Statistic stat, uint8_t value);
|
2020-01-05 14:18:30 +00:00
|
|
|
CreatePokemon* WithIndividualValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
|
|
|
|
uint8_t speed);
|
2020-01-02 19:26:01 +00:00
|
|
|
CreatePokemon* WithEffortValue(CreatureLib::Core::Statistic stat, uint8_t value);
|
2020-01-05 14:18:30 +00:00
|
|
|
CreatePokemon* WithEffortValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
|
|
|
|
uint8_t speed);
|
|
|
|
|
2020-01-02 19:26:01 +00:00
|
|
|
CreatePokemon* WithNature(const std::string& nature);
|
2020-01-02 17:02:40 +00:00
|
|
|
|
|
|
|
Pokemon* Build();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PKMNLIB_CREATEPOKEMON_HPP
|