Added Gen 9 forms code, evolution code, some item effects

This commit is contained in:
Maruno17
2024-06-08 19:35:45 +01:00
parent 6c3d9e77ad
commit 5e23984765
26 changed files with 678 additions and 495 deletions

View File

@@ -244,7 +244,8 @@ module GameData
:KYOGRE => [:BLUEORB],
:GROUDON => [:REDORB],
:ZACIAN => [:RUSTEDSWORD],
:ZAMAZENTA => [:RUSTEDSHIELD]
:ZAMAZENTA => [:RUSTEDSHIELD],
:OGERPON => [:WELLSPRINGMASK, :HEARTHFLAMEMASK, :CORNERSTONEMASK]
}
return combos[species]&.include?(@id)
end

View File

@@ -166,6 +166,10 @@ module GameData
DATA.each_value { |species| yield species if species.form == 0 }
end
def self.each_form_for_species(species)
DATA.each_value { |species| yield species if species.species == species }
end
def self.species_count
ret = 0
self.each_species { |species| ret += 1 }
@@ -381,7 +385,9 @@ module GameData
return 1 if !prevo_data.incense.nil?
prevo_min_level = prevo_data.minimum_level
evo_method_data = GameData::Evolution.get(evo[1])
return prevo_min_level if evo_method_data.level_up_proc.nil? && evo_method_data.id != :Shedinja
return prevo_min_level if evo_method_data.level_up_proc.nil? &&
evo_method_data.battle_level_up_proc.nil? &&
evo_method_data.id != :Shedinja
any_level_up = evo_method_data.any_level_up
return (any_level_up) ? prevo_min_level + 1 : evo[2]
end