From de0eb8e4e12612c40ba0ac7f7fccf5917168636b Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 10 Oct 2021 19:09:36 +0100 Subject: [PATCH] Fixed pbOnStepTaken being called every frame if you open a menu immediately at the end of a step, fixed Sweet Veil being defined incorrectly --- Data/Scripts/004_Game classes/007_Game_Character.rb | 5 ++--- Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Data/Scripts/004_Game classes/007_Game_Character.rb b/Data/Scripts/004_Game classes/007_Game_Character.rb index 291409aa9..62c31f72b 100644 --- a/Data/Scripts/004_Game classes/007_Game_Character.rb +++ b/Data/Scripts/004_Game classes/007_Game_Character.rb @@ -852,6 +852,8 @@ class Game_Character def update @moved_last_frame = @moved_this_frame @stopped_last_frame = @stopped_this_frame + @moved_this_frame = false + @stopped_this_frame = false if !$game_temp.in_menu # Update command update_command @@ -921,7 +923,6 @@ class Game_Character @stopped_this_frame = true elsif !@moved_last_frame || @stopped_last_frame # Started a new step calculate_bush_depth - @stopped_this_frame = false end # Increment animation counter @anime_count += 1 if @walk_anime || @step_anime @@ -931,8 +932,6 @@ class Game_Character def update_stop @anime_count += 1 if @step_anime @stop_count += 1 if !@starting && !lock? - @moved_this_frame = false - @stopped_this_frame = false end def update_pattern diff --git a/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb b/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb index 66dcabc4a..886da3d49 100644 --- a/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb +++ b/Data/Scripts/011_Battle/003_BattleHandlers_Abilities.rb @@ -200,7 +200,7 @@ BattleHandlers::StatusImmunityAllyAbility.add(:FLOWERVEIL, } ) -BattleHandlers::StatusImmunityAbility.add(:SWEETVEIL, +BattleHandlers::StatusImmunityAllyAbility.add(:SWEETVEIL, proc { |ability,battler,status| next true if status == :SLEEP }