This commit is contained in:
@@ -65,10 +65,9 @@ bool PkmnLib::Battling::MiscLibrary::CanEvolveFromLevelUp(
|
||||
case Library::EvolutionMethod::IsGenderAndLevel:
|
||||
return pokemon->GetLevel() >= evolution->GetData(1)->AsInt() &&
|
||||
pokemon->GetGender() == (CreatureLib::Library::Gender)evolution->GetData(0)->AsInt();
|
||||
case Library::EvolutionMethod::Custom:
|
||||
{
|
||||
case Library::EvolutionMethod::Custom: {
|
||||
auto script = dynamic_cast<ScriptResolver*>(pokemon->GetLibrary()->GetScriptResolver().get())
|
||||
->LoadEvolutionScript(evolution->GetData(0)->AsString());
|
||||
->LoadEvolutionScript(evolution->GetData(0)->AsString());
|
||||
if (!script.HasValue()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace PkmnLib::Battling {
|
||||
CreatureLib::Battling::CreatureIndex target) const override;
|
||||
|
||||
bool CanEvolveFromLevelUp(const ArbUt::BorrowedPtr<const PkmnLib::Library::EvolutionData>& evolution,
|
||||
const ArbUt::BorrowedPtr<const Pokemon>& pokemon);
|
||||
const ArbUt::BorrowedPtr<const Pokemon>& pokemon);
|
||||
|
||||
inline PkmnLib::Library::TimeOfDay GetTime() const noexcept { return _getTime(); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user