mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
AI function code rewrites
This commit is contained in:
@@ -172,6 +172,7 @@ class Battle
|
||||
# Command phase
|
||||
#=============================================================================
|
||||
def pbCommandPhase
|
||||
@command_phase = true
|
||||
@scene.pbBeginCommandPhase
|
||||
# Reset choices if commands can be shown
|
||||
@battlers.each_with_index do |b, i|
|
||||
@@ -186,8 +187,12 @@ class Battle
|
||||
end
|
||||
# Choose actions for the round (player first, then AI)
|
||||
pbCommandPhaseLoop(true) # Player chooses their actions
|
||||
return if @decision != 0 # Battle ended, stop choosing actions
|
||||
if @decision != 0 # Battle ended, stop choosing actions
|
||||
@command_phase = false
|
||||
return
|
||||
end
|
||||
pbCommandPhaseLoop(false) # AI chooses their actions
|
||||
@command_phase = false
|
||||
end
|
||||
|
||||
def pbCommandPhaseLoop(isPlayer)
|
||||
|
||||
Reference in New Issue
Block a user