pokecrystal-board/data/wild/probabilities.asm
Rangi 40902ffe24 Verify data table sizes with table_width and assert_table_length macros
This was discussed in #706

It also uncovered some off-by-one issues with defining some constants.

A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
2021-03-04 00:15:03 -05:00

23 lines
529 B
NASM

mon_prob: MACRO
; percent, index
db \1, \2 * 2
ENDM
GrassMonProbTable:
table_width 2, GrassMonProbTable
mon_prob 30, 0 ; 30% chance
mon_prob 60, 1 ; 30% chance
mon_prob 80, 2 ; 20% chance
mon_prob 90, 3 ; 10% chance
mon_prob 95, 4 ; 5% chance
mon_prob 99, 5 ; 4% chance
mon_prob 100, 6 ; 1% chance
assert_table_length NUM_GRASSMON
WaterMonProbTable:
table_width 2, WaterMonProbTable
mon_prob 60, 0 ; 60% chance
mon_prob 90, 1 ; 30% chance
mon_prob 100, 2 ; 10% chance
assert_table_length NUM_WATERMON