mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 15:15:00 +00:00
Refactored AI switching code, added "UsePokemonInOrder" skill flag
This commit is contained in:
@@ -381,7 +381,7 @@ Battle::AbilityEffects::OnHPDroppedBelowHalf.add(:EMERGENCYEXIT,
|
||||
end
|
||||
# In trainer battles
|
||||
next false if battle.pbAllFainted?(battler.idxOpposingSide)
|
||||
next false if !battle.pbCanSwitch?(battler.index) # Battler can't switch out
|
||||
next false if !battle.pbCanSwitchOut?(battler.index) # Battler can't switch out
|
||||
next false if !battle.pbCanChooseNonActive?(battler.index) # No Pokémon can switch in
|
||||
battle.pbShowAbilitySplash(battler, true)
|
||||
battle.pbHideAbilitySplash(battler)
|
||||
|
||||
@@ -451,7 +451,7 @@ Battle::ItemEffects::OnStatLoss.add(:EJECTPACK,
|
||||
battler.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSkyTargetCannotAct") # Sky Drop
|
||||
next false if battle.pbAllFainted?(battler.idxOpposingSide)
|
||||
next false if battler.wild? # Wild Pokémon can't eject
|
||||
next false if !battle.pbCanSwitch?(battler.index) # Battler can't switch out
|
||||
next false if !battle.pbCanSwitchOut?(battler.index) # Battler can't switch out
|
||||
next false if !battle.pbCanChooseNonActive?(battler.index) # No Pokémon can switch in
|
||||
battle.pbCommonAnimation("UseItem", battler)
|
||||
battle.pbDisplay(_INTL("{1} is switched out by the {2}!", battler.pbThis, battler.itemName))
|
||||
|
||||
Reference in New Issue
Block a user