Use PokeBattle_Battler#isSpecies? instead of isConst?

This commit is contained in:
jonisavo
2020-09-06 08:41:27 +03:00
parent 7fb1281eab
commit afd7b090b9
13 changed files with 53 additions and 55 deletions

View File

@@ -170,17 +170,17 @@ module PokeBattle_BattleCommon
rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesRareness)
end
# Modify rareness depending on the Poké Ball's effect
ultraBeast = (isConst?(battler.species,PBSpecies,:NIHILEGO) ||
isConst?(battler.species,PBSpecies,:BUZZWOLE) ||
isConst?(battler.species,PBSpecies,:PHEROMOSA) ||
isConst?(battler.species,PBSpecies,:XURKITREE) ||
isConst?(battler.species,PBSpecies,:CELESTEELA) ||
isConst?(battler.species,PBSpecies,:KARTANA) ||
isConst?(battler.species,PBSpecies,:GUZZLORD) ||
isConst?(battler.species,PBSpecies,:POIPOLE) ||
isConst?(battler.species,PBSpecies,:NAGANADEL) ||
isConst?(battler.species,PBSpecies,:STAKATAKA) ||
isConst?(battler.species,PBSpecies,:BLACEPHALON))
ultraBeast = (battler.isSpecies?(:NIHILEGO) ||
battler.isSpecies?(:BUZZWOLE) ||
battler.isSpecies?(:PHEROMOSA) ||
battler.isSpecies?(:XURKITREE) ||
battler.isSpecies?(:CELESTEELA) ||
battler.isSpecies?(:KARTANA) ||
battler.isSpecies?(:GUZZLORD) ||
battler.isSpecies?(:POIPOLE) ||
battler.isSpecies?(:NAGANADEL) ||
battler.isSpecies?(:STAKATAKA) ||
battler.isSpecies?(:BLACEPHALON))
if !ultraBeast || isConst?(ball,PBItems,:BEASTBALL)
rareness = BallHandlers.modifyCatchRate(ball,rareness,self,battler,ultraBeast)
else