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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user