	const_def
	const EVENT_TEMP_TRADED_WITH_ISHIHARA              ; $00
	const EVENT_TEMP_GIFTED_TO_MAN1                    ; $01
	const EVENT_TEMP_TALKED_TO_IMAKUNI                 ; $02
	const EVENT_TEMP_DUELED_IMAKUNI                    ; $03
	const EVENT_TEMP_TRADED_WITH_LASS2                 ; $04
	const EVENT_TEMP_05                                ; $05
	const EVENT_TEMP_06                                ; $06
	const EVENT_TEMP_07                                ; $07
	const EVENT_BEAT_NIKKI                             ; $08
	const EVENT_BEAT_RICK                              ; $09
	const EVENT_BEAT_KEN                               ; $0a
	const EVENT_BEAT_AMY                               ; $0b
	const EVENT_BEAT_ISAAC                             ; $0c
	const EVENT_BEAT_MURRAY                            ; $0d
	const EVENT_BEAT_GENE                              ; $0e
	const EVENT_BEAT_MITCH                             ; $0f
	const EVENT_MEDAL_FLAGS                            ; $10
	const EVENT_PUPIL_MICHAEL_STATE                    ; $11
	const EVENT_GAL1_TRADE_STATE                       ; $12
	const EVENT_IMAKUNI_STATE                          ; $13
	const EVENT_LASS1_MENTIONED_IMAKUNI                ; $14
	const EVENT_BEAT_SARA                              ; $15
	const EVENT_BEAT_AMANDA                            ; $16
	const EVENT_PUPIL_CHRIS_STATE                      ; $17
	const EVENT_MATTHEW_STATE                          ; $18
	const EVENT_CHAP2_TRADE_STATE                      ; $19
	const EVENT_DAVID_STATE                            ; $1a
	const EVENT_BEAT_JOSEPH                            ; $1b
	const EVENT_ISHIHARA_MENTIONED                     ; $1c
	const EVENT_ISHIHARA_MET                           ; $1d
	const EVENT_ISHIHARAS_HOUSE_MENTIONED              ; $1e
	const EVENT_ISHIHARA_TRADE_STATE                   ; $1f
	const EVENT_PUPIL_JESSICA_STATE                    ; $20
	const EVENT_LAD2_STATE                             ; $21
	const EVENT_RECEIVED_LEGENDARY_CARDS               ; $22
	const EVENT_KEN_HAD_ENOUGH_CARDS                   ; $23
	const EVENT_KEN_TALKED                             ; $24
	const EVENT_BEAT_JENNIFER                          ; $25
	const EVENT_BEAT_NICHOLAS                          ; $26
	const EVENT_BEAT_BRANDON                           ; $27
	const EVENT_ISAAC_TALKED                           ; $28
	const EVENT_MAN1_TALKED                            ; $29
	const EVENT_MAN1_WAITING_FOR_CARD                  ; $2a
	const EVENT_MAN1_REQUESTED_CARD_ID                 ; $2b
	const EVENT_MAN1_GIFT_SEQUENCE_STATE               ; $2c
	const EVENT_MAN1_GIFTED_CARD_FLAGS                 ; $2d
	const EVENT_MEDAL_COUNT                            ; $2e
	const EVENT_DANIEL_TALKED                          ; $2f
	const EVENT_MURRAY_TALKED                          ; $30
	const EVENT_PAPPY1_STATE                           ; $31
	const EVENT_RONALD_PSYCHIC_CLUB_LOBBY_ENCOUNTER    ; $32
	const EVENT_JOSHUA_STATE                           ; $33
	const EVENT_IMAKUNI_ROOM                           ; $34
	const EVENT_NIKKI_STATE                            ; $35
	const EVENT_IMAKUNI_WIN_COUNT                      ; $36
	const EVENT_LASS2_TRADE_STATE                      ; $37
	const EVENT_ISHIHARA_WANTS_TO_TRADE                ; $38
	const EVENT_ISHIHARA_CONGRATULATED_PLAYER          ; $39
	const EVENT_BEAT_KRISTIN                           ; $3a
	const EVENT_BEAT_HEATHER                           ; $3b
	const EVENT_BEAT_BRITTANY                          ; $3c
	const EVENT_DRMASON_CONGRATULATED_PLAYER           ; $3d
	const EVENT_MASON_LAB_STATE                        ; $3e
	const EVENT_CHALLENGE_CUP_1_STATE                  ; $3f
	const EVENT_CHALLENGE_CUP_2_STATE                  ; $40
	const EVENT_CHALLENGE_CUP_3_STATE                  ; $41
	const EVENT_CHALLENGE_CUP_STARTING                 ; $42
	const EVENT_CHALLENGE_CUP_STAGE_VISITED            ; $43
	const EVENT_CHALLENGE_CUP_NUMBER                   ; $44
	const EVENT_CHALLENGE_CUP_OPPONENT_NUMBER          ; $45
	const EVENT_CHALLENGE_CUP_OPPONENT_CHOSEN          ; $46
	const EVENT_CHALLENGE_CUP_IN_MENU                  ; $47
	const EVENT_CHALLENGE_CUP_1_RESULT                 ; $48
	const EVENT_CHALLENGE_CUP_2_RESULT                 ; $49
	const EVENT_CHALLENGE_CUP_3_RESULT                 ; $4a
	const EVENT_RONALD_FIRST_CLUB_ENTRANCE_ENCOUNTER   ; $4b
	const EVENT_RONALD_FIRST_DUEL_STATE                ; $4c
	const EVENT_RONALD_SECOND_DUEL_STATE               ; $4d
	const EVENT_RONALD_TALKED                          ; $4e
	const EVENT_RONALD_POKEMON_DOME_ENTRANCE_ENCOUNTER ; $4f
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_1    ; $50
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_2    ; $51
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_3    ; $52
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_4    ; $53
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_5    ; $54
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_6    ; $55
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_7    ; $56
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_CONVO_8    ; $57
	const EVENT_RONALD_CHALLENGE_HALL_LOBBY_STATE      ; $58
	const EVENT_PLAYER_ENTERED_CHALLENGE_CUP           ; $59
	const EVENT_FIGHTING_DECK_MACHINE_ACTIVE           ; $5a
	const EVENT_ROCK_DECK_MACHINE_ACTIVE               ; $5b
	const EVENT_WATER_DECK_MACHINE_ACTIVE              ; $5c
	const EVENT_LIGHTNING_DECK_MACHINE_ACTIVE          ; $5d
	const EVENT_GRASS_DECK_MACHINE_ACTIVE              ; $5e
	const EVENT_PSYCHIC_DECK_MACHINE_ACTIVE            ; $5f
	const EVENT_SCIENCE_DECK_MACHINE_ACTIVE            ; $60
	const EVENT_FIRE_DECK_MACHINE_ACTIVE               ; $61
	const EVENT_ALL_DECK_MACHINE_FLAGS                 ; $62
	const EVENT_HALL_OF_HONOR_DOORS_OPEN               ; $63
	const EVENT_CHALLENGED_GRAND_MASTERS               ; $64
	const EVENT_POKEMON_DOME_STATE                     ; $65
	const EVENT_POKEMON_DOME_IN_MENU                   ; $66
	const EVENT_CHALLENGED_RONALD                      ; $67
	const EVENT_COURTNEY_STATE                         ; $68
	const EVENT_STEVE_STATE                            ; $69
	const EVENT_JACK_STATE                             ; $6a
	const EVENT_ROD_STATE                              ; $6b
	const EVENT_RONALD_POKEMON_DOME_STATE              ; $6c
	const EVENT_RECEIVED_ZAPDOS                        ; $6d
	const EVENT_RECEIVED_MOLTRES                       ; $6e
	const EVENT_RECEIVED_ARTICUNO                      ; $6f
	const EVENT_RECEIVED_DRAGONITE                     ; $70
	const EVENT_LEGENDARY_CARDS_RECEIVED_FLAGS         ; $71
	const EVENT_GIFT_CENTER_MENU_CHOICE                ; $72
	const EVENT_AARON_BOOSTER_REWARD                   ; $73
	const EVENT_CONSOLE                                ; $74
	const EVENT_SAM_MENU_CHOICE                        ; $75
	const EVENT_AARON_DECK_MENU_CHOICE                 ; $76
DEF NUM_EVENT_FLAGS EQU const_value

DEF EVENT_VAR_BYTES EQU $40

; EVENT_PUPIL_MICHAEL_STATE
; EVENT_PUPIL_CHRIS_STATE
; EVENT_PUPIL_JESSICA_STATE
DEF PUPIL_INACTIVE  EQU 0
DEF PUPIL_ACTIVE    EQU 1
DEF PUPIL_TALKED    EQU 2
DEF PUPIL_DEFEATED  EQU 8
DEF PUPIL_REVISITED EQU 9

; EVENT_GAL1_TRADE_STATE
DEF GAL1_TRADE_NOT_OFFERED EQU 0
DEF GAL1_TRADE_OFFERED     EQU 1
DEF GAL1_TRADE_COMPLETED   EQU 2

; EVENT_IMAKUNI_STATE
DEF IMAKUNI_NOT_MENTIONED EQU 0
DEF IMAKUNI_MENTIONED     EQU 1
DEF IMAKUNI_TALKED        EQU 2

; EVENT_MATTHEW_STATE
DEF MATTHEW_TALKED   EQU 1
DEF MATTHEW_DEFEATED EQU 2

; EVENT_CHAP2_TRADE_STATE
DEF CHAP2_TRADE_NOT_OFFERED EQU 0
DEF CHAP2_TRADE_OFFERED     EQU 1
DEF CHAP2_TRADE_COMPLETED   EQU 2

; EVENT_DAVID_STATE
DEF DAVID_TALKED   EQU 1
DEF DAVID_DEFEATED EQU 2

; EVENT_ISHIHARA_TRADE_STATE
DEF ISHIHARA_INTRODUCTION    EQU 0
DEF ISHIHARA_TRADE_1_RUMORED EQU 1
DEF ISHIHARA_TRADE_1_OFFERED EQU 2
DEF ISHIHARA_TRADE_2_RUMORED EQU 3
DEF ISHIHARA_TRADE_2_OFFERED EQU 4
DEF ISHIHARA_TRADE_3_RUMORED EQU 5
DEF ISHIHARA_TRADE_3_OFFERED EQU 6
DEF ISHIHARA_TRADES_COMPLETE EQU 7
DEF ISHIHARA_LEFT            EQU 8

; EVENT_LAD2_STATE
DEF LAD2_SLOWPOKE_AVAILABLE EQU 1
DEF LAD2_SLOWPOKE_GONE      EQU 2

; EVENT_MAN1_GIFT_SEQUENCE_STATE
DEF MAN1_GIFT_SEQUENCE_COMPLETE EQU 6

; EVENT_PAPPY1_STATE
DEF PAPPY1_TALKED             EQU 1
DEF PAPPY1_CHALLENGE_ACCEPTED EQU 2
DEF PAPPY1_CHALLENGE_COMPLETE EQU 3

; EVENT_JOSHUA_STATE
DEF JOSHUA_TALKED   EQU 1
DEF JOSHUA_DEFEATED EQU 2

; EVENT_IMAKUNI_ROOM
DEF IMAKUNI_FIGHTING_CLUB  EQU 0
DEF IMAKUNI_SCIENCE_CLUB   EQU 1
DEF IMAKUNI_LIGHTNING_CLUB EQU 2
DEF IMAKUNI_WATER_CLUB     EQU 3

; EVENT_NIKKI_STATE
DEF NIKKI_IN_ISHIHARAS_HOUSE EQU 1
DEF NIKKI_IN_GRASS_CLUB      EQU 2

; EVENT_LASS2_TRADE_STATE
DEF LASS2_TRADE_1_AVAILABLE EQU 0
DEF LASS2_TRADE_1_OFFERED   EQU 1
DEF LASS2_TRADE_2_AVAILABLE EQU 2
DEF LASS2_TRADE_2_OFFERED   EQU 3
DEF LASS2_TRADE_3_AVAILABLE EQU 4
DEF LASS2_TRADE_3_OFFERED   EQU 5
DEF LASS2_TRADES_COMPLETE   EQU 6

; EVENT_MASON_LAB_STATE
DEF MASON_LAB_IN_PRACTICE_DUEL      EQU 1
DEF MASON_LAB_RECEIVED_STARTER_DECK EQU 3

; EVENT_CHALLENGE_CUP_1_STATE
; EVENT_CHALLENGE_CUP_2_STATE
; EVENT_CHALLENGE_CUP_3_STATE
; EVENT_CHALLENGE_CUP_1_RESULT
; EVENT_CHALLENGE_CUP_2_RESULT
; EVENT_CHALLENGE_CUP_3_RESULT
DEF CHALLENGE_CUP_NOT_STARTED    EQU 0
DEF CHALLENGE_CUP_READY_TO_START EQU 1
DEF CHALLENGE_CUP_WON            EQU 2
DEF CHALLENGE_CUP_LOST           EQU 3
DEF CHALLENGE_CUP_OVER           EQU 7

; EVENT_RONALD_FIRST_DUEL_STATE
; EVENT_RONALD_SECOND_DUEL_STATE
DEF RONALD_DUEL_WON  EQU 1
DEF RONALD_DUEL_LOST EQU 2

; EVENT_POKEMON_DOME_STATE
DEF POKEMON_DOME_CHALLENGED EQU 1
DEF POKEMON_DOME_DEFEATED   EQU 2

; EVENT_COURTNEY_STATE
DEF COURTNEY_CHALLENGED EQU 1
DEF COURTNEY_DEFEATED   EQU 2

; EVENT_STEVE_STATE
DEF STEVE_CHALLENGED EQU 1
DEF STEVE_DEFEATED   EQU 2

; EVENT_JACK_STATE
DEF JACK_CHALLENGED EQU 1
DEF JACK_DEFEATED   EQU 2

; EVENT_ROD_STATE
DEF ROD_CHALLENGED EQU 1
DEF ROD_DEFEATED   EQU 2

; EVENT_RONALD_POKEMON_DOME_STATE
DEF RONALD_CHALLENGED EQU 1
DEF RONALD_DEFEATED   EQU 2

; EVENT_GIFT_CENTER_MENU_CHOICE
DEF GIFT_CENTER_MENU_SEND_CARD    EQU 0
DEF GIFT_CENTER_MENU_RECEIVE_CARD EQU 1
DEF GIFT_CENTER_MENU_SEND_DECK    EQU 2
DEF GIFT_CENTER_MENU_RECEIVE_DECK EQU 3
DEF GIFT_CENTER_MENU_EXIT         EQU 4

; EVENT_SAM_MENU_CHOICE
; normal menu
DEF SAM_MENU_NORMAL_DUEL   EQU 0
DEF SAM_MENU_PRACTICE_DUEL EQU 1
DEF SAM_MENU_RULES         EQU 2
DEF SAM_MENU_NOTHING       EQU 3
; rules menu
DEF SAM_MENU_ENERGY           EQU 0
DEF SAM_MENU_ATTACKING        EQU 1
DEF SAM_MENU_RETREATING       EQU 2
DEF SAM_MENU_EVOLVING         EQU 3
DEF SAM_MENU_POKEMON_POWER    EQU 4
DEF SAM_MENU_ENDING_YOUR_TURN EQU 5
DEF SAM_MENU_WIN_OR_LOSS      EQU 6
DEF SAM_MENU_NOTHING_TO_ASK   EQU 7

; EVENT_AARON_DECK_MENU_CHOICE
DEF AARON_DECK_MENU_CANCEL EQU 3

DEF NORTH    EQU $00
DEF EAST     EQU $01
DEF SOUTH    EQU $02
DEF WEST     EQU $03
DEF NO_MOVE  EQU %10000000 ; For rotations without movement
DEF DIRECTION_MASK EQU $ff ^ NO_MOVE

DEF VARIABLE_CARD	EQU 0 ; use the card located in wCardReceived instead of using the script's argument

; medal flags set in EVENT_MEDAL_FLAGS
	const_def
	const FIGHTING_MEDAL_F  ; 0
	const ROCK_MEDAL_F      ; 1
	const PSYCHIC_MEDAL_F   ; 2
	const LIGHTNING_MEDAL_F ; 3
	const WATER_MEDAL_F     ; 4
	const FIRE_MEDAL_F      ; 5
	const SCIENCE_MEDAL_F   ; 6
	const GRASS_MEDAL_F     ; 7
DEF NUM_MEDALS EQU const_value

DEF FIGHTING_MEDAL  EQU 1 << FIGHTING_MEDAL_F
DEF ROCK_MEDAL      EQU 1 << ROCK_MEDAL_F
DEF PSYCHIC_MEDAL   EQU 1 << PSYCHIC_MEDAL_F
DEF LIGHTNING_MEDAL EQU 1 << LIGHTNING_MEDAL_F
DEF WATER_MEDAL     EQU 1 << WATER_MEDAL_F
DEF FIRE_MEDAL      EQU 1 << FIRE_MEDAL_F
DEF SCIENCE_MEDAL   EQU 1 << SCIENCE_MEDAL_F
DEF GRASS_MEDAL     EQU 1 << GRASS_MEDAL_F

; total number of packs that are obtained through the PC
DEF NUM_PC_PACKS EQU 15
DEF PACK_UNOPENED_F EQU 7
DEF PACK_UNOPENED EQU 1 << PACK_UNOPENED_F
