mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed typos in def pbCalcTypeModPokemon, fixed party screen navigation errors when there are no Pokémon, advanced battle Debug functions now trigger modifiers, can now always change a Pokémon's form to 0
This commit is contained in:
@@ -83,12 +83,12 @@ class Battle::AI
|
||||
|
||||
# For switching. Determines the effectiveness of a potential switch-in against
|
||||
# an opposing battler.
|
||||
def pbCalcTypeModPokemon(battlerThis, _battlerOther)
|
||||
mod1 = Effectiveness.calculate(battlerThis.types[0], target.types[0], target.types[1])
|
||||
def pbCalcTypeModPokemon(battlerThis, battlerOther)
|
||||
mod1 = Effectiveness.calculate(battlerThis.types[0], battlerOther.types[0], battlerOther.types[1])
|
||||
mod2 = Effectiveness::NORMAL_EFFECTIVE
|
||||
if battlerThis.types.length > 1
|
||||
mod2 = Effectiveness.calculate(battlerThis.types[1], target.types[0], target.types[1])
|
||||
mod2 = mod2.to_f / Effectivenesss::NORMAL_EFFECTIVE
|
||||
mod2 = Effectiveness.calculate(battlerThis.types[1], battlerOther.types[0], battlerOther.types[1])
|
||||
mod2 = mod2.to_f / Effectiveness::NORMAL_EFFECTIVE
|
||||
end
|
||||
return mod1 * mod2
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user