More AI move effect calculation rewrites

This commit is contained in:
Maruno17
2022-08-31 19:02:54 +01:00
parent ecb5e2ffd1
commit 429068f3cb
8 changed files with 239 additions and 91 deletions

View File

@@ -383,7 +383,8 @@ class Battle::Move
target.effects[PBEffects::BideTarget] = user.index
end
target.damageState.fainted = true if target.fainted?
target.lastHPLost = damage # For Focus Punch
target.lastHPLost = damage
target.tookMoveDamageThisRound = true if damage > 0 && !target.damageState.substitute # For Focus Punch
target.tookDamageThisRound = true if damage > 0 # For Assurance
target.lastAttacker.push(user.index) # For Revenge
if target.opposes?(user)