mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Refactored AI switching code, added "UsePokemonInOrder" skill flag
This commit is contained in:
@@ -35,6 +35,7 @@ class Battle::AI::AIBattler
|
||||
def stages; return @battler.stages; end
|
||||
def statStageAtMax?(stat); return @battler.statStageAtMax?(stat); end
|
||||
def statStageAtMin?(stat); return @battler.statStageAtMin?(stat); end
|
||||
def moves; return @battler.moves; end
|
||||
|
||||
def wild?
|
||||
return @ai.battle.wildBattle? && opposes?
|
||||
@@ -300,7 +301,7 @@ class Battle::AI::AIBattler
|
||||
def can_switch_lax?
|
||||
return false if wild?
|
||||
@ai.battle.eachInTeamFromBattlerIndex(@index) do |pkmn, i|
|
||||
return true if @ai.battle.pbCanSwitchLax?(@index, i)
|
||||
return true if @ai.battle.pbCanSwitchIn?(@index, i)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user