mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Fixed Symbiosis, fixed Roost not roosting, fixed Normalize not boosting damage, fixed crash in Bug Catching Contest, fixed old format moves.txt compiling, added cache size text to console
This commit is contained in:
@@ -346,11 +346,7 @@ class PokemonEncounters
|
||||
chance_total = 0
|
||||
enc_list.each { |a| chance_total += a[0] }
|
||||
# Choose a random entry in the encounter table based on entry probabilities
|
||||
rnd = 0
|
||||
chance_rolls.times do
|
||||
r = rand(chance_total)
|
||||
rnd = r if r > rnd # Prefer rarer entries if rolling repeatedly
|
||||
end
|
||||
rnd = rand(chance_total)
|
||||
encounter = nil
|
||||
enc_list.each do |enc|
|
||||
rnd -= enc[0]
|
||||
|
||||
Reference in New Issue
Block a user