mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Tweaks to encounter chance calculator and Rock Smash
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user