mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 22:36:03 +00:00
Added class GameData::Evolution, moved evolution-related methods to more appropriate places
This commit is contained in:
@@ -861,8 +861,7 @@ BattleHandlers::DamageCalcTargetItem.add(:EVIOLITE,
|
||||
# means it also cares about the Pokémon's form. Some forms cannot
|
||||
# evolve even if the species generally can, and such forms are not
|
||||
# affected by Eviolite.
|
||||
evos = target.pokemon.species_data.evolutions
|
||||
if evos.any? { |e| e[1] != PBEvolution::None && !e[3] } # Not a "None", not a prevolution
|
||||
if target.pokemon.species_data.get_evolutions(true).length > 0
|
||||
mults[:defense_multiplier] *= 1.5
|
||||
end
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ BallHandlers::ModifyCatchRate.add(:MOONBALL,proc { |ball,catchRate,battle,battle
|
||||
# family can evolve with the Moon Stone, not whether the target itself
|
||||
# can immediately evolve with the Moon Stone.
|
||||
moon_stone = GameData::Item.try_get(:MOONSTONE)
|
||||
if moon_stone && EvolutionHelper.check_family_for_method_item(battler.species, moon_stone.id)
|
||||
if moon_stone && battler.pokemon.species_data.family_item_evolutions_use_item?(moon_stone.id)
|
||||
catchRate *= 4
|
||||
end
|
||||
next [catchRate, 255].min
|
||||
|
||||
Reference in New Issue
Block a user