Pass back CreatePokemon by reference.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-08-04 17:19:14 +02:00
parent 6ffcd4dcbc
commit 8290bf546a
2 changed files with 168 additions and 172 deletions

View File

@@ -52,22 +52,22 @@ namespace PkmnLib::Battling {
: _library(library), _species(species), _level(level), _attacks(library->GetSettings()->GetMaximalMoves()) {
}
CreatePokemon WithForme(const ArbUt::StringView& forme);
CreatePokemon WithGender(CreatureLib::Library::Gender gender);
CreatePokemon IsShiny(bool value);
CreatePokemon WithHeldItem(const ArbUt::StringView& item);
CreatePokemon LearnMove(const ArbUt::StringView& move, CreatureLib::Battling::AttackLearnMethod method);
CreatePokemon& WithForme(const ArbUt::StringView& forme);
CreatePokemon& WithGender(CreatureLib::Library::Gender gender);
CreatePokemon& IsShiny(bool value);
CreatePokemon& WithHeldItem(const ArbUt::StringView& item);
CreatePokemon& LearnMove(const ArbUt::StringView& move, CreatureLib::Battling::AttackLearnMethod method);
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);
CreatePokemon WithEffortValue(CreatureLib::Library::Statistic stat, uint8_t value);
CreatePokemon WithEffortValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
uint8_t speed);
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);
CreatePokemon& WithEffortValue(CreatureLib::Library::Statistic stat, uint8_t value);
CreatePokemon& WithEffortValues(uint8_t hp, uint8_t att, uint8_t def, uint8_t spAtt, uint8_t spDef,
uint8_t speed);
CreatePokemon WithNature(const ArbUt::StringView& nature);
CreatePokemon IsAllowedExperienceGain(bool value);
CreatePokemon& WithNature(const ArbUt::StringView& nature);
CreatePokemon& IsAllowedExperienceGain(bool value);
Pokemon* Build();
};