Made "DefaultForm_X" flag apply when changing a Pokémon's species

This commit is contained in:
Maruno17
2022-04-24 12:04:34 +01:00
parent a85ec1e51a
commit 8062b8ed6c
8 changed files with 18 additions and 4 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]