Fixed triggering a battle upon turning causing the player to take a step after it

This commit is contained in:
Maruno17
2020-10-28 21:04:37 +00:00
parent a28eadb9af
commit a28aa5b4ad
3 changed files with 3 additions and 1 deletions

View File

@@ -265,6 +265,7 @@ class Game_Character
@pattern = 0 if @walk_anime or @step_anime @pattern = 0 if @walk_anime or @step_anime
@anime_count = 0 @anime_count = 0
@prelock_direction = 0 @prelock_direction = 0
@moved_last_frame = false
end end
def force_move_route(move_route) def force_move_route(move_route)

View File

@@ -140,7 +140,7 @@ class PokeBattle_Battle
rate += @runCommand*30 rate += @runCommand*30
end end
if rate>=256 || @battleAI.pbAIRandom(256)<rate if rate>=256 || @battleAI.pbAIRandom(256)<rate
pbSEPlay("Battle flee") pbSEPlay("Battle flee")
pbDisplayPaused(_INTL("You got away safely!")) pbDisplayPaused(_INTL("You got away safely!"))
@decision = 3 @decision = 3
return 1 return 1

View File

@@ -563,6 +563,7 @@ def pbAfterBattle(decision,canLose)
end end
end end
Events.onEndBattle.trigger(nil,decision,canLose) Events.onEndBattle.trigger(nil,decision,canLose)
$game_player.straighten
end end
Events.onEndBattle += proc { |_sender,e| Events.onEndBattle += proc { |_sender,e|