Added Debug function to edit Repel steps, Flash/Strength usage and Black/White Flute effects; split old and new Black/White Flute effects

This commit is contained in:
Maruno17
2023-05-05 20:17:07 +01:00
parent 48fb8dae73
commit 72469bbf79
6 changed files with 146 additions and 41 deletions

View File

@@ -379,3 +379,28 @@ SaveData.register_conversion(:v21_replace_phone_data) do
end
end
end
SaveData.register_conversion(:v21_replace_flute_booleans) do
essentials_version 21
display_title "Updating Black/White Flute variables"
to_value :map_metadata do |metadata|
metadata.instance_eval do
if !@blackFluteUsed.nil?
if Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
@higher_level_wild_pokemon = @blackFluteUsed
else
@lower_encounter_rate = @blackFluteUsed
end
@blackFluteUsed = nil
end
if !@whiteFluteUsed.nil?
if Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
@lower_level_wild_pokemon = @whiteFluteUsed
else
@higher_encounter_rate = @whiteFluteUsed
end
@whiteFluteUsed = nil
end
end
end
end