mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user