mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Created and implemented GameData::Species
This commit is contained in:
@@ -128,7 +128,7 @@ def pbPokeRadarGetEncounter(rarity=0)
|
||||
map = $game_map.map_id rescue 0
|
||||
array = []
|
||||
for enc in POKE_RADAR_ENCOUNTERS
|
||||
array.push(enc) if enc.length>=4 && enc[0]==map && getID(PBSpecies,enc[2])>0
|
||||
array.push(enc) if enc.length>=4 && enc[0]==map && GameData::Species.exists?(enc[2])
|
||||
end
|
||||
# If there are any exclusives, first have a chance of encountering those
|
||||
if array.length>0
|
||||
@@ -137,9 +137,8 @@ def pbPokeRadarGetEncounter(rarity=0)
|
||||
for enc in array
|
||||
chance += enc[1]
|
||||
if rnd<chance
|
||||
upper = (enc[4]!=nil) ? enc[4] : enc[3]
|
||||
level = enc[3]+rand(1+upper-enc[3])
|
||||
return [getID(PBSpecies,enc[2]),level]
|
||||
level = (enc[4] && enc[4] > enc[3]) ? rand(enc[3], enc[4]) : enc[3]
|
||||
return [enc[2], level]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user