Rewrote evolution methods to make them modular

This commit is contained in:
Maruno17
2020-09-10 22:22:06 +01:00
parent aaf5949c13
commit 6f353ba813
9 changed files with 474 additions and 363 deletions

View File

@@ -207,9 +207,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.
if hasConst?(PBItems,:MOONSTONE) &&
pbCheckEvolutionFamilyForMethod(battler.species,
[PBEvolution::Item,PBEvolution::ItemMale,PBEvolution::ItemFemale],
getConst(PBItems,:MOONSTONE))
pbCheckEvolutionFamilyForItemMethodItem(battler.species,getConst(PBItems,:MOONSTONE))
catchRate *= 4
end
next [catchRate,255].min