Added class GameData::Evolution, moved evolution-related methods to more appropriate places

This commit is contained in:
Maruno17
2021-03-12 23:20:02 +00:00
parent ba1d225b83
commit d8bf4b7fda
37 changed files with 975 additions and 969 deletions

View File

@@ -596,7 +596,7 @@ def pbEvolutionCheck(currentLevels)
pkmn = $Trainer.party[i]
next if !pkmn || (pkmn.hp==0 && !Settings::CHECK_EVOLUTION_FOR_FAINTED_POKEMON)
next if currentLevels[i] && pkmn.level==currentLevels[i]
newSpecies = EvolutionCheck.check_level_up_methods(pkmn)
newSpecies = pkmn.check_evolution_on_level_up
next if !newSpecies
evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn,newSpecies)

View File

@@ -172,7 +172,7 @@ def pbDayCareGenerateEgg
babyspecies = (ditto1) ? father.species : mother.species
end
# Determine the egg's species
babyspecies = EvolutionHelper.baby_species(babyspecies, true, mother.item_id, father.item_id)
babyspecies = GameData::Species.get(babyspecies).get_bably_species(true, mother.item_id, father.item_id)
case babyspecies
when :MANAPHY
babyspecies = :PHIONE if GameData::Species.exists?(:PHIONE)
@@ -201,7 +201,7 @@ def pbDayCareGenerateEgg
if [:RATTATA, :SANDSHREW, :VULPIX, :DIGLETT, :MEOWTH, :GEODUDE, :GRIMER].include?(babyspecies)
if mother.form==1
egg.form = 1 if mother.hasItem?(:EVERSTONE)
elsif EvolutionHelper.baby_species(father.species, true, mother.item_id, father.item_id) == babyspecies
elsif father.species_data.get_baby_species(true, mother.item_id, father.item_id) == babyspecies
egg.form = 1 if father.form==1 && father.hasItem?(:EVERSTONE)
end
end