Add NUM_TRAINERTYPES and assert the TrainerTypes table length (#1268)

This commit is contained in:
adrianrfreedman
2026-09-29 16:47:32 +03:00
committed by GitHub
parent 4ddd60433d
commit f7d15f0cfd
2 changed files with 3 additions and 0 deletions

View File

@@ -38,3 +38,4 @@ DEF NO_AI EQU 0
const TRAINERTYPE_MOVES
const TRAINERTYPE_ITEM
const TRAINERTYPE_ITEM_MOVES
DEF NUM_TRAINERTYPES EQU const_value

View File

@@ -82,10 +82,12 @@ ReadTrainerParty:
TrainerTypes:
; entries correspond to TRAINERTYPE_* constants
table_width 2
dw TrainerType1 ; level, species
dw TrainerType2 ; level, species, moves
dw TrainerType3 ; level, species, item
dw TrainerType4 ; level, species, item, moves
assert_table_length NUM_TRAINERTYPES
TrainerType1:
; normal (level, species)