Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/data/wild/probabilities.asm
1271 views
1
WildMonEncounterSlotChances:
2
; There are 10 slots for wild pokemon, and this is the table that defines how common each of
3
; those 10 slots is. A random number is generated and then the first byte of each pair in this
4
; table is compared against that random number. If the random number is less than or equal
5
; to the first byte, then that slot is chosen. The second byte is double the slot number.
6
db 50, $00 ; 51/256 = 19.9% chance of slot 0
7
db 101, $02 ; 51/256 = 19.9% chance of slot 1
8
db 140, $04 ; 39/256 = 15.2% chance of slot 2
9
db 165, $06 ; 25/256 = 9.8% chance of slot 3
10
db 190, $08 ; 25/256 = 9.8% chance of slot 4
11
db 215, $0A ; 25/256 = 9.8% chance of slot 5
12
db 228, $0C ; 13/256 = 5.1% chance of slot 6
13
db 241, $0E ; 13/256 = 5.1% chance of slot 7
14
db 252, $10 ; 11/256 = 4.3% chance of slot 8
15
db 255, $12 ; 3/256 = 1.2% chance of slot 9
16
17