mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fixed changing a Pokémon's form with an item not doing certain things, fixed alternate forms not inheriting certain properties from the base form
This commit is contained in:
@@ -139,6 +139,18 @@ class Pokemon
|
|||||||
end
|
end
|
||||||
|
|
||||||
def form=(value)
|
def form=(value)
|
||||||
|
oldForm = @form
|
||||||
|
@form = value
|
||||||
|
@ability = nil
|
||||||
|
MultipleForms.call("onSetForm", self, value, oldForm)
|
||||||
|
calc_stats
|
||||||
|
$Trainer.pokedex.register(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
# The same as def form=, but yields to a given block in the middle so that a
|
||||||
|
# message about the form changing can be shown before calling "onSetForm"
|
||||||
|
# which may have its own messages, e.g. learning a move.
|
||||||
|
def setForm(value)
|
||||||
oldForm = @form
|
oldForm = @form
|
||||||
@form = value
|
@form = value
|
||||||
@ability = nil
|
@ability = nil
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ class Pokemon
|
|||||||
deprecated_method_alias :isAble?, :able?, removal_in: 'v20'
|
deprecated_method_alias :isAble?, :able?, removal_in: 'v20'
|
||||||
deprecated_method_alias :isFainted?, :fainted?, removal_in: 'v20'
|
deprecated_method_alias :isFainted?, :fainted?, removal_in: 'v20'
|
||||||
deprecated_method_alias :isShiny?, :shiny?, removal_in: 'v20'
|
deprecated_method_alias :isShiny?, :shiny?, removal_in: 'v20'
|
||||||
deprecated_method_alias :setForm, :form=, removal_in: 'v20'
|
|
||||||
deprecated_method_alias :setGender, :gender=, removal_in: 'v20'
|
deprecated_method_alias :setGender, :gender=, removal_in: 'v20'
|
||||||
deprecated_method_alias :isMale?, :male?, removal_in: 'v20'
|
deprecated_method_alias :isMale?, :male?, removal_in: 'v20'
|
||||||
deprecated_method_alias :isFemale?, :female?, removal_in: 'v20'
|
deprecated_method_alias :isFemale?, :female?, removal_in: 'v20'
|
||||||
|
|||||||
@@ -662,6 +662,8 @@ module Compiler
|
|||||||
:base_stats => contents["BaseStats"] || base_data.base_stats,
|
:base_stats => contents["BaseStats"] || base_data.base_stats,
|
||||||
:evs => contents["EffortPoints"] || base_data.evs,
|
:evs => contents["EffortPoints"] || base_data.evs,
|
||||||
:base_exp => contents["BaseEXP"] || base_data.base_exp,
|
:base_exp => contents["BaseEXP"] || base_data.base_exp,
|
||||||
|
:growth_rate => base_data.growth_rate,
|
||||||
|
:gender_ratio => base_data.gender_ratio,
|
||||||
:catch_rate => contents["Rareness"] || base_data.catch_rate,
|
:catch_rate => contents["Rareness"] || base_data.catch_rate,
|
||||||
:happiness => contents["Happiness"] || base_data.happiness,
|
:happiness => contents["Happiness"] || base_data.happiness,
|
||||||
:moves => moves,
|
:moves => moves,
|
||||||
@@ -674,6 +676,7 @@ module Compiler
|
|||||||
:wild_item_rare => contents["WildItemRare"] || base_data.wild_item_rare,
|
:wild_item_rare => contents["WildItemRare"] || base_data.wild_item_rare,
|
||||||
:egg_groups => contents["Compatibility"] || base_data.egg_groups.clone,
|
:egg_groups => contents["Compatibility"] || base_data.egg_groups.clone,
|
||||||
:hatch_steps => contents["StepsToHatch"] || base_data.hatch_steps,
|
:hatch_steps => contents["StepsToHatch"] || base_data.hatch_steps,
|
||||||
|
:incense => base_data.incense,
|
||||||
:evolutions => evolutions,
|
:evolutions => evolutions,
|
||||||
:height => contents["Height"] || base_data.height,
|
:height => contents["Height"] || base_data.height,
|
||||||
:weight => contents["Weight"] || base_data.weight,
|
:weight => contents["Weight"] || base_data.weight,
|
||||||
|
|||||||
Reference in New Issue
Block a user