Tweaks to encounter chance calculator and Rock Smash

This commit is contained in:
Maruno17
2021-03-02 22:09:27 +00:00
parent 47b164f0ab
commit 934e38662a
4 changed files with 19 additions and 16 deletions

View File

@@ -592,9 +592,7 @@ HiddenMoveHandlers::UseMove.add(:HEADBUTT,proc { |move,pokemon|
# Rock Smash
#===============================================================================
def pbRockSmashRandomEncounter
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
if $PokemonEncounters.encounter_triggered?(EncounterTypes::RockSmash, false, false)
pbEncounter(EncounterTypes::RockSmash)
end
end