Altered encounter chance calculation to be closer to Gen 3 (inc. Rock Smash), Pokémon's ball bug fix

This commit is contained in:
Maruno17
2021-03-01 23:28:43 +00:00
parent ec742ac5f2
commit 8b0796588f
9 changed files with 142 additions and 116 deletions

View File

@@ -592,7 +592,9 @@ HiddenMoveHandlers::UseMove.add(:HEADBUTT,proc { |move,pokemon|
# Rock Smash
#===============================================================================
def pbRockSmashRandomEncounter
if rand(100)<25
encounter_data = GameData::Encounter.get($game_map.map_id, $PokemonGlobal.encounter_version)
chance = (encounter_data) ? encounter_data.step_chances[EncounterTypes::RockSmash] || 50 : 50
if rand(100) < chance
pbEncounter(EncounterTypes::RockSmash)
end
end