From 3e167b9357ccce680ab7681366325e8aa567e7cd Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Thu, 15 Feb 2024 21:16:15 +0000 Subject: [PATCH] Fixed type-resisting berries trying to be consumed twice when triggered by a move called by another move, fixed bad old phone data conversion, fixed events of even sizes moving endlessly when approaching the player --- .../002_Save data/005_Game_SaveConversions.rb | 6 +++--- .../004_Game classes/006_Game_Character.rb | 16 ++++++++++++---- .../002_Battler/007_Battler_UseMove.rb | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Data/Scripts/002_Save data/005_Game_SaveConversions.rb b/Data/Scripts/002_Save data/005_Game_SaveConversions.rb index 00c2ee627..083df61af 100644 --- a/Data/Scripts/002_Save data/005_Game_SaveConversions.rb +++ b/Data/Scripts/002_Save data/005_Game_SaveConversions.rb @@ -364,13 +364,13 @@ SaveData.register_conversion(:v21_replace_phone_data) do @phoneNumbers.each do |contact| if contact.length > 4 # Trainer - Phone.add_silent(contact[6], contact[7], contact[1], contact[2], contact[5], 0) - new_contact = Phone.get(contact[1], contact[2], 0) + @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.rematch_flag = [contact[4] - 1, 0].max else # Non-trainer - Phone.add_silent(contact[3], contact[2], contact[1]) + @phone.add_silent(contact[3], contact[2], contact[1]) end end @phoneNumbers = nil diff --git a/Data/Scripts/004_Game classes/006_Game_Character.rb b/Data/Scripts/004_Game classes/006_Game_Character.rb index a358b8422..c01fd9192 100644 --- a/Data/Scripts/004_Game classes/006_Game_Character.rb +++ b/Data/Scripts/004_Game classes/006_Game_Character.rb @@ -719,14 +719,22 @@ class Game_Character (rand(2) == 0) ? abs_sx += 1 : abs_sy += 1 end if abs_sx > abs_sy - (sx > 0) ? move_left : move_right + if abs_sx >= 1 + (sx > 0) ? move_left : move_right + end if !moving? && sy != 0 - (sy > 0) ? move_up : move_down + if abs_sy >= 1 + (sy > 0) ? move_up : move_down + end end else - (sy > 0) ? move_up : move_down + if abs_sy >= 1 + (sy > 0) ? move_up : move_down + end if !moving? && sx != 0 - (sx > 0) ? move_left : move_right + if abs_sx >= 1 + (sx > 0) ? move_left : move_right + end end end end diff --git a/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb b/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb index b6aa0c7f4..ece7f28e2 100644 --- a/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/011_Battle/002_Battler/007_Battler_UseMove.rb @@ -736,6 +736,7 @@ class Battle::Battler targets.each do |b| next if b.damageState.unaffected next if !b.damageState.berryWeakened + b.damageState.berryWeakened = false # Weakening only applies for one hit @battle.pbDisplay(_INTL("The {1} weakened the damage to {2}!", b.itemName, b.pbThis(true))) b.pbConsumeItem end