mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Moved species data constants into module SpeciesData
This commit is contained in:
@@ -167,7 +167,7 @@ module PokeBattle_BattleCommon
|
||||
return 4 if $DEBUG && Input.press?(Input::CTRL)
|
||||
# Get a rareness if one wasn't provided
|
||||
if !rareness
|
||||
rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesRareness)
|
||||
rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesData::RARENESS)
|
||||
end
|
||||
# Modify rareness depending on the Poké Ball's effect
|
||||
ultraBeast = (battler.isSpecies?(:NIHILEGO) ||
|
||||
|
||||
@@ -428,7 +428,7 @@ class PokeBattle_SafariZone
|
||||
@scene.pbSafariStart
|
||||
@scene.pbCommonAnimation(PBWeather.animationName(@weather))
|
||||
safariBall = getConst(PBItems,:SAFARIBALL)
|
||||
rareness = pbGetSpeciesData(wildpoke.species,wildpoke.form,SpeciesRareness)
|
||||
rareness = pbGetSpeciesData(wildpoke.species,wildpoke.form,SpeciesData::RARENESS)
|
||||
catchFactor = (rareness*100)/1275
|
||||
catchFactor = [[catchFactor,3].max,20].min
|
||||
escapeFactor = (pbEscapeRate(rareness)*100)/1275
|
||||
|
||||
@@ -147,7 +147,7 @@ BallHandlers::ModifyCatchRate.add(:QUICKBALL,proc { |ball,catchRate,battle,battl
|
||||
})
|
||||
|
||||
BallHandlers::ModifyCatchRate.add(:FASTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
baseStats = pbGetSpeciesData(battler.species,battler.form,SpeciesBaseStats)
|
||||
baseStats = pbGetSpeciesData(battler.species,battler.form,SpeciesData::BASE_STATS)
|
||||
baseSpeed = baseStats[PBStats::SPEED]
|
||||
catchRate *= 4 if baseSpeed>=100
|
||||
next [catchRate,255].min
|
||||
|
||||
Reference in New Issue
Block a user