Rewrote AI calculations for move effects that raise the user's stats, fixed Sea of Fire effect lasting forever

This commit is contained in:
Maruno17
2022-09-04 17:46:59 +01:00
parent db215a71d6
commit b8c61a6038
15 changed files with 622 additions and 829 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.rough_type(@user.battler)
calc_type = @move.rough_type
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