Skip to content

Commit

Permalink
Fixed F9 skipping a turn in Safari battles, fixed Gym Leader attempts…
Browse files Browse the repository at this point in the history
… stat not working
  • Loading branch information
Maruno17 committed May 19, 2022
1 parent 47ad801 commit f5ee3b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Data/Scripts/004_Game classes/013_Game_Stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5ee3b9

Please sign in to comment.