mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Fixed regional form-exclusive species producing eggs of the wrong species, fixed eggs not being the appropriate form based on the region they were made in
This commit is contained in:
@@ -707,10 +707,39 @@ MultipleForms.register(:CALYREX, {
|
||||
})
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Regional forms
|
||||
# This code is for determining the form of a Pokémon in an egg created at the
|
||||
# Day Care, where that Pokémon's species has regional forms. The regional form
|
||||
# chosen depends on the region in which the egg was produced (not where it
|
||||
# hatches).
|
||||
#===============================================================================
|
||||
|
||||
# The code in this proc assumes that the appropriate regional form for a Pokémon
|
||||
# is equal to the region's number. This may not be true in your game.
|
||||
# Note that this proc only produces a non-zero form number if the species has a
|
||||
# defined form with that number, which means it can be used for both Alolan and
|
||||
# Galarian forms separately (and for Meowth which has both).
|
||||
MultipleForms.register(:RATTATA, {
|
||||
"getFormOnEggCreation" => proc { |pkmn|
|
||||
if $game_map
|
||||
map_pos = $game_map.metadata&.town_map_position
|
||||
next map_pos[0] if map_pos &&
|
||||
GameData::Species.get_species_form(pkmn.species, map_pos[0]).form == map_pos[0]
|
||||
end
|
||||
next 0
|
||||
}
|
||||
})
|
||||
|
||||
MultipleForms.copy(:RATTATA, :SANDSHREW, :VULPIX, :DIGLETT, :MEOWTH, :GEODUDE,
|
||||
:GRIMER, :PONYTA, :FARFETCHD, :CORSOLA, :ZIGZAGOON,
|
||||
:DARUMAKA, :YAMASK, :STUNFISK, :SLOWPOKE, :ARTICUNO, :ZAPDOS,
|
||||
:MOLTRES)
|
||||
|
||||
#===============================================================================
|
||||
# Regional forms
|
||||
# These species don't have visually different regional forms, but they need to
|
||||
# evolve into different forms depending on the location where they evolved.
|
||||
# evolve into different forms depending on the location where they evolve.
|
||||
#===============================================================================
|
||||
|
||||
# Alolan forms
|
||||
|
||||
Reference in New Issue
Block a user