mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-23 14:56:00 +00:00
More AI move effect calculation rewrites
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -174,11 +174,11 @@ class Battle::Move::FailsIfUserDamagedThisTurn < Battle::Move
|
||||
end
|
||||
|
||||
def pbDisplayUseMessage(user)
|
||||
super if !user.effects[PBEffects::FocusPunch] || user.lastHPLost == 0
|
||||
super if !user.effects[PBEffects::FocusPunch] || !user.tookMoveDamageThisRound
|
||||
end
|
||||
|
||||
def pbMoveFailed?(user, targets)
|
||||
if user.effects[PBEffects::FocusPunch] && user.lastHPLost > 0
|
||||
if user.effects[PBEffects::FocusPunch] && user.tookMoveDamageThisRound
|
||||
@battle.pbDisplay(_INTL("{1} lost its focus and couldn't move!", user.pbThis))
|
||||
return true
|
||||
end
|
||||
@@ -187,7 +187,7 @@ class Battle::Move::FailsIfUserDamagedThisTurn < Battle::Move
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Fails if the target didn't chose a damaging move to use this round, or has
|
||||
# Fails if the target didn't choose a damaging move to use this round, or has
|
||||
# already moved. (Sucker Punch)
|
||||
#===============================================================================
|
||||
class Battle::Move::FailsIfTargetActed < Battle::Move
|
||||
|
||||
Reference in New Issue
Block a user