# Activates script when a wild pokemon is created
EventHandlers.add(:on_wild_pokemon_created, :automatic_level_scaling,
proc { |pokemon|
id = pbGet(LevelScalingSettings::WILD_VARIABLE)
next if id == 0
AutomaticLevelScaling.setTemporarySetting("automaticEvolutions", false)
AutomaticLevelScaling.difficulty = id
AutomaticLevelScaling.setNewLevel(pokemon)
}
)