Male
Unova
Online now
Posted 3 Days Ago
144 posts
12 Years
You would need to check for badges in the Event:

Conditional Branch: Defeated Gym 1 == On
(battle with level 15 Rattata here)
else
(battle with level 5 Rattata here)
end

You aren't just limited to checking for 1 gym, you can create an event that has different battles based of if the player has all the badges if you wanted to.
Developing Pokémon: World Saga