mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +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.
|
# and other such details. Of course, you don't HAVE to use this code.
|
||||||
EventHandlers.add(:on_wild_pokemon_created, :level_depends_on_party,
|
EventHandlers.add(:on_wild_pokemon_created, :level_depends_on_party,
|
||||||
proc { |pkmn|
|
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 = pbBalancedLevel($player.party) - 4 + rand(5) # For variety
|
||||||
new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
|
new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
|
||||||
pkmn.level = new_level
|
pkmn.level = new_level
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ MapPosition = 0,16,10
|
|||||||
Dungeon = true
|
Dungeon = true
|
||||||
BattleBack = cave2
|
BattleBack = cave2
|
||||||
Environment = Cave
|
Environment = Cave
|
||||||
Flags = Magnetic,DistortionWorld
|
Flags = Magnetic,DistortionWorld,ScaleWildEncounterLevels
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[052] # Battle Frontier
|
[052] # Battle Frontier
|
||||||
Name = Battle Frontier
|
Name = Battle Frontier
|
||||||
|
|||||||
Reference in New Issue
Block a user