diff --git a/Data/Scripts/002_Save data/005_Game_SaveConversions.rb b/Data/Scripts/002_Save data/005_Game_SaveConversions.rb index c4b72f4e8..6edd277f5 100644 --- a/Data/Scripts/002_Save data/005_Game_SaveConversions.rb +++ b/Data/Scripts/002_Save data/005_Game_SaveConversions.rb @@ -364,12 +364,9 @@ SaveData.register_conversion(:v21_replace_phone_data) do @phoneNumbers.each do |contact| if contact.length > 4 # Trainer - # TODO: Is there any way to ensure the versions count (contact[5] - # is the next version to be battled) is accurate? Phone.add_silent(contact[6], contact[7], contact[1], contact[2], contact[5], 0) new_contact = Phone.get(contact[1], contact[2], 0) new_contact.visible = contact[0] - new_contact.version = [contact[5] - 1, 0].max new_contact.rematch_flag = [contact[4] - 1, 0].max else # Non-trainer diff --git a/Data/Scripts/004_Game classes/007_Game_Character.rb b/Data/Scripts/004_Game classes/007_Game_Character.rb index 90dde9c34..05eaa1011 100644 --- a/Data/Scripts/004_Game classes/007_Game_Character.rb +++ b/Data/Scripts/004_Game classes/007_Game_Character.rb @@ -940,9 +940,6 @@ class Game_Character end # End of a step, so perform events that happen at this time if !jumping? && !moving? - if was_jumping && !(self.is_a?(Game_Player) && $PokemonGlobal.surfing && !$game_temp.ending_surf) - $scene.spriteset.addUserAnimation(Settings::DUST_ANIMATION_ID, @x, @y, true, 1) - end EventHandlers.trigger(:on_step_taken, self) calculate_bush_depth @stopped_this_frame = true diff --git a/Data/Scripts/004_Game classes/008_Game_Event.rb b/Data/Scripts/004_Game classes/008_Game_Event.rb index 1f64074f3..0930bdd9a 100644 --- a/Data/Scripts/004_Game classes/008_Game_Event.rb +++ b/Data/Scripts/004_Game classes/008_Game_Event.rb @@ -271,4 +271,13 @@ class Game_Event < Game_Character @interpreter.update end end + + def update_move + was_jumping = jumping? + super + if was_jumping && !jumping? && !@transparent && (@tile_id > 0 || @character_name != "") + spriteset = $scene.spriteset(map_id) + spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1) + end + end end diff --git a/Data/Scripts/004_Game classes/009_Game_Player.rb b/Data/Scripts/004_Game classes/009_Game_Player.rb index 73110ae90..c97bc8d1f 100644 --- a/Data/Scripts/004_Game classes/009_Game_Player.rb +++ b/Data/Scripts/004_Game classes/009_Game_Player.rb @@ -461,7 +461,14 @@ class Game_Player < Game_Character end end end + was_jumping = jumping? super + if was_jumping && !jumping? && !@transparent && (@tile_id > 0 || @character_name != "") + if !$PokemonGlobal.surfing || $game_temp.ending_surf + spriteset = $scene.spriteset(map_id) + spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1) + end + end end def update_stop diff --git a/Data/Scripts/004_Game classes/011_Game_Follower.rb b/Data/Scripts/004_Game classes/011_Game_Follower.rb index 17c3bd899..5573c55df 100644 --- a/Data/Scripts/004_Game classes/011_Game_Follower.rb +++ b/Data/Scripts/004_Game classes/011_Game_Follower.rb @@ -148,17 +148,6 @@ class Game_Follower < Game_Event #----------------------------------------------------------------------------- - def update_move - was_jumping = jumping? - super - if was_jumping && !jumping? - spriteset = $scene.spriteset(map_id) - spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1) - end - end - - #----------------------------------------------------------------------------- - private def location_passable?(x, y, direction) diff --git a/Data/Scripts/010_Data/001_Hardcoded data/001_GrowthRate.rb b/Data/Scripts/010_Data/001_Hardcoded data/001_GrowthRate.rb index 6fa9c71a0..bd7bd15c3 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/001_GrowthRate.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/001_GrowthRate.rb @@ -94,8 +94,7 @@ GameData::GrowthRate.register({ # Erratic (600000): # For levels 0-50: n**3 * (100 - n) / 50 # For levels 51-68: n**3 * (150 - n) / 100 -# For levels 69-98: n**3 * 1.274 - (n / 150) - p(n mod 3) -# where p(x) = array(0.000, 0.008, 0.014)[x] +# For levels 69-98: n**3 * ((1911 - (10 * level)) / 3).floor / 500 # For levels 99-100: n**3 * (160 - n) / 100 GameData::GrowthRate.register({ :id => :Erratic, @@ -111,7 +110,7 @@ GameData::GrowthRate.register({ 286328, 296358, 305767, 316074, 326531, 336255, 346965, 357812, 367807, 378880, 390077, 400293, 411686, 423190, 433572, 445239, 457001, 467489, 479378, 491346, 501878, 513934, 526049, 536557, 548720, 560922, 571333, 583539, 591882, 600000], - :exp_formula => proc { |level| next (level**4) * 3 / 500 } + :exp_formula => proc { |level| next ((level**4) + ((level**3) * 2000)) / 3500 } }) # Fluctuating (1640000): @@ -133,8 +132,7 @@ GameData::GrowthRate.register({ 765275, 804997, 834809, 877201, 908905, 954084, 987754, 1035837, 1071552, 1122660, 1160499, 1214753, 1254796, 1312322, 1354652, 1415577, 1460276, 1524731, 1571884, 1640000], :exp_formula => proc { |level| - rate = [82 - ((level - 100) / 2.0), 40].max - next (level**4) * rate / 5000 + next ((level**3) + ((level / 2) + 32)) * 4 / (100 + level) } }) diff --git a/Data/Scripts/020_Debug/003_Debug menus/003_Debug_MenuExtraCode.rb b/Data/Scripts/020_Debug/003_Debug menus/003_Debug_MenuExtraCode.rb index 90fe84f9b..1970e131b 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/003_Debug_MenuExtraCode.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/003_Debug_MenuExtraCode.rb @@ -89,13 +89,18 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand code_parts[0].strip! code_parts[0].gsub!(/^\s*!/, "") val = nil - if code_parts[0][0].upcase == code_parts[0][0] && - (Kernel.const_defined?(code_parts[0]) rescue false) - val = (eval(code) rescue nil) # Code starts with a class/method name - elsif code_parts[0][0].downcase == code_parts[0][0] && - !(Interpreter.method_defined?(code_parts[0].to_sym) rescue false) && - !(Game_Event.method_defined?(code_parts[0].to_sym) rescue false) - val = (eval(code) rescue nil) # Code starts with a method name (that isn't in Interpreter/Game_Event) + if code_parts[0][0][/[a-z]/i] + if code_parts[0][0].upcase == code_parts[0][0] && + (Kernel.const_defined?(code_parts[0]) rescue false) + val = (eval(code) rescue nil) # Code starts with a class/method name + elsif code_parts[0][0].downcase == code_parts[0][0] && + !(Interpreter.method_defined?(code_parts[0].to_sym) rescue false) && + !(Game_Event.method_defined?(code_parts[0].to_sym) rescue false) + val = (eval(code) rescue nil) # Code starts with a method name (that isn't in Interpreter/Game_Event) + end + else + # Code doesn't start with a letter, probably $, just evaluate it + val = (eval(code) rescue nil) end else val = $game_switches[index + 1]