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

@@ -120,11 +120,12 @@ class PokemonEncounters
encounter_chance += @chance_accumulator / 200
encounter_chance *= 0.8 if $PokemonGlobal.bicycle
end
if !Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
encounter_chance /= 2 if $PokemonMap.blackFluteUsed
min_steps_needed *= 2 if $PokemonMap.blackFluteUsed
encounter_chance *= 1.5 if $PokemonMap.whiteFluteUsed
min_steps_needed /= 2 if $PokemonMap.whiteFluteUsed
if $PokemonMap.lower_encounter_rate
encounter_chance /= 2
min_steps_needed *= 2
elsif $PokemonMap.higher_encounter_rate
encounter_chance *= 1.5
min_steps_needed /= 2
end
first_pkmn = $player.first_pokemon
if first_pkmn
@@ -333,12 +334,10 @@ class PokemonEncounters
end
end
# Black Flute and White Flute alter the level of the wild Pokémon
if Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
if $PokemonMap.blackFluteUsed
level = [level + rand(1..4), GameData::GrowthRate.max_level].min
elsif $PokemonMap.whiteFluteUsed
level = [level - rand(1..4), 1].max
end
if $PokemonMap.lower_level_wild_pokemon
level = [level - rand(1..4), 1].max
elsif $PokemonMap.higher_level_wild_pokemon
level = [level + rand(1..4), GameData::GrowthRate.max_level].min
end
# Return [species, level]
return [encounter[1], level]