More AI function code rewrites themed around stat changes

This commit is contained in:
Maruno17
2022-12-25 00:39:25 +00:00
parent f33184d413
commit 1258e4b9c9
9 changed files with 114 additions and 167 deletions

View File

@@ -429,6 +429,9 @@ class Battle::AI::AIMove
target_battler = target.battler
# OHKO special calculation
if @ai.trainer.medium_skill?
# TODO: This is insufficient for OHKO moves, as they should also ignore
# effects like Telekinesis and Minimize but def rough_accuracy
# treats them as applying to OHKO moves.
case function
when "OHKO", "OHKOHitsUndergroundTarget"
modifiers[:base_accuracy] = self.accuracy + user.level - target.level