diff --git a/Data/Scripts/004_Game classes/013_Game_Stats.rb b/Data/Scripts/004_Game classes/013_Game_Stats.rb index a636243552..5bf86f6fb3 100644 --- a/Data/Scripts/004_Game classes/013_Game_Stats.rb +++ b/Data/Scripts/004_Game classes/013_Game_Stats.rb @@ -48,6 +48,7 @@ class GameStats attr_accessor :battle_points_won, :battle_points_spent # Currently unused attr_accessor :soot_collected # Special stats + attr_accessor :gym_leader_attempts # An array of integers attr_accessor :times_to_get_badges # An array of times in seconds attr_accessor :elite_four_attempts attr_accessor :hall_of_fame_entry_count # See also Game Variable 13 @@ -129,7 +130,7 @@ def initialize @battle_points_spent = 0 @soot_collected = 0 # Special stats - @gym_leader_attempts = [] # Incremented in Gym Leader events + @gym_leader_attempts = [0] * 50 # Incremented in Gym Leader events (50 is arbitrary but suitably large) @times_to_get_badges = [] # Set with set_time_to_badge(number) in Gym Leader events @elite_four_attempts = 0 # Incremented in door event leading to the first E4 member @hall_of_fame_entry_count = 0 # Incremented in Hall of Fame event diff --git a/Data/Scripts/011_Battle/007_Other battle types/001_SafariBattle.rb b/Data/Scripts/011_Battle/007_Other battle types/001_SafariBattle.rb index 1f3998f43c..684f3d4135 100644 --- a/Data/Scripts/011_Battle/007_Other battle types/001_SafariBattle.rb +++ b/Data/Scripts/011_Battle/007_Other battle types/001_SafariBattle.rb @@ -480,6 +480,8 @@ def pbStartBattle pbSEPlay("Battle flee") pbDisplayPaused(_INTL("You got away safely!")) @decision = 3 + else + next end catchFactor = [[catchFactor, 3].max, 20].min escapeFactor = [[escapeFactor, 2].max, 20].min