mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Made "DefaultForm_X" flag apply when changing a Pokémon's species
This commit is contained in:
@@ -212,11 +212,16 @@ module GameData
|
||||
return GameData::GenderRatio.get(@gender_ratio).single_gendered?
|
||||
end
|
||||
|
||||
def base_form
|
||||
def default_form
|
||||
@flags.each do |flag|
|
||||
return $~[1].to_i if flag[/^DefaultForm_(\d+)$/i]
|
||||
end
|
||||
return @form
|
||||
return -1
|
||||
end
|
||||
|
||||
def base_form
|
||||
default = default_form
|
||||
return (default >= 0) ? default : @form
|
||||
end
|
||||
|
||||
def has_flag?(flag)
|
||||
|
||||
@@ -124,7 +124,12 @@ class Pokemon
|
||||
new_species_data = GameData::Species.get(species_id)
|
||||
return if @species == new_species_data.species
|
||||
@species = new_species_data.species
|
||||
@form = new_species_data.form if new_species_data.form != 0
|
||||
default_form = new_species_data.default_form
|
||||
if default_form >= 0
|
||||
@form = default_form
|
||||
elsif new_species_data.form > 0
|
||||
@form = new_species_data.form
|
||||
end
|
||||
@forced_form = nil
|
||||
@gender = nil if singleGendered?
|
||||
@level = nil # In case growth rate is different for the new species
|
||||
|
||||
@@ -598,7 +598,6 @@ class PokemonEvolutionScene
|
||||
pbEvolutionMethodAfterEvolution
|
||||
# Modify Pokémon to make it evolved
|
||||
@pokemon.species = @newspecies
|
||||
@pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM)
|
||||
@pokemon.calc_stats
|
||||
@pokemon.ready_to_evolve = false
|
||||
# See and own evolved species
|
||||
|
||||
@@ -10889,6 +10889,7 @@ Shape = MultiWinged
|
||||
Category = Moth
|
||||
Pokedex = It loves the honey of flowers and steals honey collected by Combee.
|
||||
Generation = 4
|
||||
Flags = DefaultForm_0
|
||||
WildItemUncommon = SILVERPOWDER
|
||||
#-------------------------------
|
||||
[COMBEE]
|
||||
|
||||
@@ -10878,6 +10878,7 @@ Shape = MultiWinged
|
||||
Category = Moth
|
||||
Pokedex = It loves the honey of flowers and steals honey collected by Combee.
|
||||
Generation = 4
|
||||
Flags = DefaultForm_0
|
||||
WildItemUncommon = SILVERPOWDER
|
||||
#-------------------------------
|
||||
[COMBEE]
|
||||
|
||||
@@ -10879,6 +10879,7 @@ Shape = MultiWinged
|
||||
Category = Moth
|
||||
Pokedex = It loves the honey of flowers and steals honey collected by Combee.
|
||||
Generation = 4
|
||||
Flags = DefaultForm_0
|
||||
WildItemUncommon = SILVERPOWDER
|
||||
#-------------------------------
|
||||
[COMBEE]
|
||||
|
||||
@@ -10885,6 +10885,7 @@ Shape = MultiWinged
|
||||
Category = Moth
|
||||
Pokedex = It loves the honey of flowers and steals honey collected by Combee.
|
||||
Generation = 4
|
||||
Flags = DefaultForm_0
|
||||
WildItemUncommon = SILVERPOWDER
|
||||
#-------------------------------
|
||||
[COMBEE]
|
||||
|
||||
@@ -10885,6 +10885,7 @@ Shape = MultiWinged
|
||||
Category = Moth
|
||||
Pokedex = It loves the honey of flowers and steals honey collected by Combee.
|
||||
Generation = 4
|
||||
Flags = DefaultForm_0
|
||||
WildItemUncommon = SILVERPOWDER
|
||||
#-------------------------------
|
||||
[COMBEE]
|
||||
|
||||
Reference in New Issue
Block a user