Add support for creating pokemon with passed Random parameter.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
a88719e2b3
commit
e8b86a20d1
|
@ -34,9 +34,7 @@ namespace PkmnLib::Battling {
|
|||
return *this;
|
||||
}
|
||||
|
||||
Pokemon* CreatePokemon::Build() {
|
||||
auto rand = ArbUt::Random();
|
||||
|
||||
Pokemon* CreatePokemon::Build(ArbUt::Random& rand) {
|
||||
auto species = this->_library->GetSpeciesLibrary()->TryGet(this->_species);
|
||||
if (!species.has_value()) {
|
||||
std::stringstream err;
|
||||
|
|
|
@ -67,7 +67,11 @@ namespace PkmnLib::Battling {
|
|||
CreatePokemon& WithNature(const ArbUt::StringView& nature);
|
||||
CreatePokemon& IsAllowedExperienceGain(bool value);
|
||||
|
||||
Pokemon* Build();
|
||||
Pokemon* Build() {
|
||||
auto rand = ArbUt::Random();
|
||||
return Build(rand);
|
||||
}
|
||||
Pokemon* Build(ArbUt::Random& rand);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue