This commit is contained in:
@@ -7,25 +7,26 @@ namespace PkmnLib::Battling {
|
||||
class CreatePokemon {
|
||||
private:
|
||||
const BattleLibrary* _library;
|
||||
Arbutils::CaseInsensitiveConstString _species = ""_cnc;
|
||||
Arbutils::CaseInsensitiveConstString _forme = "default"_cnc;
|
||||
ArbUt::CaseInsensitiveConstString _species = ""_cnc;
|
||||
ArbUt::CaseInsensitiveConstString _forme = "default"_cnc;
|
||||
uint8_t _level;
|
||||
std::string _nickname = "";
|
||||
|
||||
Arbutils::CaseInsensitiveConstString _ability = ""_cnc;
|
||||
Arbutils::CaseInsensitiveConstString _nature;
|
||||
ArbUt::CaseInsensitiveConstString _ability = ""_cnc;
|
||||
ArbUt::CaseInsensitiveConstString _nature;
|
||||
CreatureLib::Library::Gender _gender = static_cast<CreatureLib::Library::Gender>(-1);
|
||||
Arbutils::CaseInsensitiveConstString _heldItem = ""_cnc;
|
||||
ArbUt::CaseInsensitiveConstString _heldItem = ""_cnc;
|
||||
uint32_t _identifier = 0;
|
||||
|
||||
struct ToLearnMethod {
|
||||
const Library::MoveData* Move;
|
||||
ArbUt::BorrowedPtr<const Library::MoveData> Move;
|
||||
CreatureLib::Battling::AttackLearnMethod LearnMethod;
|
||||
ToLearnMethod() : Move(nullptr), LearnMethod(CreatureLib::Battling::AttackLearnMethod::Unknown){};
|
||||
ToLearnMethod(const Library::MoveData* move, CreatureLib::Battling::AttackLearnMethod method)
|
||||
ToLearnMethod(ArbUt::BorrowedPtr<const Library::MoveData> move,
|
||||
CreatureLib::Battling::AttackLearnMethod method)
|
||||
: Move(move), LearnMethod(method){};
|
||||
};
|
||||
Arbutils::Collections::List<ToLearnMethod> _attacks;
|
||||
ArbUt::List<ToLearnMethod> _attacks;
|
||||
uint8_t _currentMove = 0;
|
||||
|
||||
uint8_t _ivHp = 0;
|
||||
@@ -47,18 +48,18 @@ namespace PkmnLib::Battling {
|
||||
bool _allowedExperienceGain = true;
|
||||
|
||||
public:
|
||||
CreatePokemon(const BattleLibrary* library, const Arbutils::CaseInsensitiveConstString& species, uint8_t level)
|
||||
CreatePokemon(const BattleLibrary* library, const ArbUt::CaseInsensitiveConstString& species, uint8_t level)
|
||||
: _library(library), _species(species), _level(level), _attacks(library->GetSettings()->GetMaximalMoves()) {
|
||||
}
|
||||
|
||||
CreatePokemon WithForme(const Arbutils::CaseInsensitiveConstString& forme);
|
||||
CreatePokemon WithForme(const ArbUt::CaseInsensitiveConstString& forme);
|
||||
CreatePokemon WithGender(CreatureLib::Library::Gender gender);
|
||||
CreatePokemon IsShiny(bool value);
|
||||
CreatePokemon WithHeldItem(const Arbutils::CaseInsensitiveConstString& item);
|
||||
CreatePokemon LearnMove(const Arbutils::CaseInsensitiveConstString& move,
|
||||
CreatePokemon WithHeldItem(const ArbUt::CaseInsensitiveConstString& item);
|
||||
CreatePokemon LearnMove(const ArbUt::CaseInsensitiveConstString& move,
|
||||
CreatureLib::Battling::AttackLearnMethod method);
|
||||
|
||||
CreatePokemon WithRandomIndividualValues(Arbutils::Random rand = Arbutils::Random());
|
||||
CreatePokemon WithRandomIndividualValues(ArbUt::Random rand = ArbUt::Random());
|
||||
CreatePokemon WithIndividualValue(CreatureLib::Library::Statistic stat, uint8_t value);
|
||||
CreatePokemon WithIndividualValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
|
||||
uint8_t speed);
|
||||
@@ -66,7 +67,7 @@ namespace PkmnLib::Battling {
|
||||
CreatePokemon WithEffortValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
|
||||
uint8_t speed);
|
||||
|
||||
CreatePokemon WithNature(const Arbutils::CaseInsensitiveConstString& nature);
|
||||
CreatePokemon WithNature(const ArbUt::CaseInsensitiveConstString& nature);
|
||||
CreatePokemon IsAllowedExperienceGain(bool value);
|
||||
|
||||
Pokemon* Build();
|
||||
|
||||
Reference in New Issue
Block a user