Fixed AI accuracy calculation for OHKO moves, reviewed more AI function code score modifiers

This commit is contained in:
Maruno17
2022-09-02 21:36:31 +01:00
parent d870b027db
commit db215a71d6
10 changed files with 155 additions and 226 deletions

View File

@@ -133,7 +133,7 @@ class Battle::AI
# after all.
return true if @move.move.pbImmunityByAbility(@user.battler, @target.battler, false)
# Type immunity
calc_type = @move.pbCalcType(@user.battler)
calc_type = @move.rough_type(@user.battler)
typeMod = @move.move.pbCalcTypeMod(calc_type, @user.battler, @target.battler)
return true if @move.move.pbDamagingMove? && Effectiveness.ineffective?(typeMod)
# Dark-type immunity to moves made faster by Prankster