mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Made the example wild encounter modifier that scales Pokémon levels to match the player's party depend on a map metadata flag instead of a map number
This commit is contained in:
@@ -18,7 +18,7 @@ EventHandlers.add(:on_wild_pokemon_created, :make_shiny_switch,
|
||||
# and other such details. Of course, you don't HAVE to use this code.
|
||||
EventHandlers.add(:on_wild_pokemon_created, :level_depends_on_party,
|
||||
proc { |pkmn|
|
||||
next if $game_map.map_id != 51
|
||||
next if !$game_map.metadata&.has_flag?("ScaleWildEncounterLevels")
|
||||
new_level = pbBalancedLevel($player.party) - 4 + rand(5) # For variety
|
||||
new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
|
||||
pkmn.level = new_level
|
||||
|
||||
Reference in New Issue
Block a user