Rename some script commands

like print_text_string -> print_npc_text etc, and change instances of 'battle' to 'duel'
This commit is contained in:
dannye 2021-01-16 10:46:08 -06:00
parent 09ac45cb24
commit 518e7d399c
10 changed files with 625 additions and 571 deletions

View File

@ -2,7 +2,7 @@
const EVENT_FLAG_00 ; $00
const EVENT_FLAG_01 ; $01
const EVENT_TEMP_TALKED_TO_IMAKUNI ; $02
const EVENT_TEMP_BATTLED_IMAKUNI ; $03
const EVENT_TEMP_DUELED_IMAKUNI ; $03
const EVENT_FLAG_04 ; $04
const EVENT_FLAG_05 ; $05
const EVENT_FLAG_06 ; $06

View File

@ -1,4 +1,4 @@
; NPC Map data. Note: pre-load functions also run after battles
; NPC Map data. Note: pre-load functions also run after duels
; Format:
; NPC, X position, Y Position, Direction,
; pre-load function. (Resets c flag if NPC should not be loaded)

View File

@ -188,29 +188,29 @@ MainDuelLoop: ; 40ee (1:40ee)
; load the correct music and animation depending on result
ld a, [wDuelFinished]
cp TURN_PLAYER_WON
jr z, .active_duelist_won_battle
jr z, .active_duelist_won_duel
cp TURN_PLAYER_LOST
jr z, .active_duelist_lost_battle
jr z, .active_duelist_lost_duel
ld a, DUEL_ANIM_DUEL_DRAW
ld c, MUSIC_MATCH_DRAW
ldtx hl, DuelWasADrawText
jr .handle_duel_finished
.active_duelist_won_battle
.active_duelist_won_duel
ldh a, [hWhoseTurn]
cp PLAYER_TURN
jr nz, .opponent_won_battle
.player_won_battle
jr nz, .opponent_won_duel
.player_won_duel
xor a ; DUEL_WIN
ld [wDuelResult], a
ld a, DUEL_ANIM_DUEL_WIN
ld c, MUSIC_MATCH_VICTORY
ldtx hl, WonDuelText
jr .handle_duel_finished
.active_duelist_lost_battle
.active_duelist_lost_duel
ldh a, [hWhoseTurn]
cp PLAYER_TURN
jr nz, .player_won_battle
.opponent_won_battle
jr nz, .player_won_duel
.opponent_won_duel
ld a, DUEL_LOSS
ld [wDuelResult], a
ld a, DUEL_ANIM_DUEL_LOSS
@ -232,7 +232,7 @@ MainDuelLoop: ; 40ee (1:40ee)
jr nz, .wait_song
ld a, [wDuelFinished]
cp TURN_PLAYER_TIED
jr z, .tied_battle
jr z, .tied_duel
call Func_39fc
call WaitForWideTextBoxInput
call Func_3b31
@ -241,7 +241,7 @@ MainDuelLoop: ; 40ee (1:40ee)
ldh [hWhoseTurn], a
ret
.tied_battle
.tied_duel
call WaitForWideTextBoxInput
call Func_3b31
ld a, [wDuelTheme]

File diff suppressed because it is too large Load Diff

View File

@ -337,7 +337,10 @@ Func_10cbb: ; 10cbb (4:4cbb)
INCROM $10cbb, $10cea
Func_10cea: ; 10cea (4:4cea)
INCROM $10cea, $10dba
INCROM $10cea, $10d98
Unknown_10d98: ; 10d98 (4:4d98)
INCROM $10d98, $10dba
Func_10dba: ; 10dba (4:4dba)
ld a, $1
@ -1002,13 +1005,13 @@ Func_11f4e: ; 11f4e (4:5f4e)
INCROM $11f4e, $1217b
OverworldScriptTable: ; 1217b (4:617b)
dw ScriptCommand_EndScriptLoop1
dw ScriptCommand_EndScript
dw ScriptCommand_CloseAdvancedTextBox
dw ScriptCommand_PrintTextString
dw ScriptCommand_PrintNPCText
dw Func_ccdc
dw ScriptCommand_AskQuestionJump
dw ScriptCommand_StartBattle
dw ScriptCommand_PrintVariableText
dw ScriptCommand_StartDuel
dw ScriptCommand_PrintVariableNPCText
dw Func_cda8
dw ScriptCommand_PrintTextQuitFully
dw Func_cdcb
@ -1085,11 +1088,11 @@ OverworldScriptTable: ; 1217b (4:617b)
dw ScriptCommand_ShowSamNormalMultichoice
dw ScriptCommand_ShowSamTutorialMultichoice
dw Func_d43d
dw ScriptCommand_EndScriptLoop2
dw ScriptCommand_EndScriptLoop3
dw ScriptCommand_EndScriptLoop4
dw ScriptCommand_EndScriptLoop5
dw ScriptCommand_EndScriptLoop6
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_SetFlagValue
dw ScriptCommand_JumpIfFlagZero1
dw ScriptCommand_JumpIfFlagNonzero1
@ -1102,10 +1105,10 @@ OverworldScriptTable: ; 1217b (4:617b)
dw ScriptCommand_JumpIfFlagNonzero2
dw ScriptCommand_JumpIfFlagZero2
dw ScriptCommand_IncrementFlagValue
dw ScriptCommand_EndScriptLoop7
dw ScriptCommand_EndScriptLoop8
dw ScriptCommand_EndScriptLoop9
dw ScriptCommand_EndScriptLoop10
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
dw ScriptCommand_EndScript
MultichoiceTextbox_ConfigTable_ChooseDeckToDuelAgainst: ;1224b

View File

@ -804,7 +804,7 @@ EstimateDamage_VersusDefendingCard: ; 143e5 (5:43e5)
push hl
ld [hl], $00
call CalculateDamage_VersusDefendingPokemon
; ...and subsequently recovered to continue the battle normally
; ...and subsequently recovered to continue the duel normally
pop hl
pop af
ld [hl], a
@ -1025,7 +1025,7 @@ EstimateDamage_FromDefendingPokemon: ; 1450b (5:450b)
push hl
ld [hl], $00
call CalculateDamage_FromDefendingPokemon
; ...and subsequently recovered to continue the battle normally
; ...and subsequently recovered to continue the duel normally
pop hl
pop af
ld [hl], a

View File

@ -5,13 +5,13 @@ run_command: MACRO
ENDM
const_def
const ScriptCommand_EndScriptLoop1_index ; $00
const ScriptCommand_EndScript_index ; $00
const ScriptCommand_CloseAdvancedTextBox_index ; $01
const ScriptCommand_PrintTextString_index ; $02
const ScriptCommand_PrintNPCText_index ; $02
const Func_ccdc_index ; $03
const ScriptCommand_AskQuestionJump_index ; $04
const ScriptCommand_StartBattle_index ; $05
const ScriptCommand_PrintVariableText_index ; $06
const ScriptCommand_StartDuel_index ; $05
const ScriptCommand_PrintVariableNPCText_index ; $06
const Func_cda8_index ; $07
const ScriptCommand_PrintTextQuitFully_index ; $08
const Func_cdcb_index ; $09
@ -88,11 +88,11 @@ ENDM
const ScriptCommand_ShowSamNormalMultichoice_index ; $50
const ScriptCommand_ShowSamTutorialMultichoice_index ; $51
const Func_d43d_index ; $52
const ScriptCommand_EndScriptLoop2_index ; $53
const ScriptCommand_EndScriptLoop3_index ; $54
const ScriptCommand_EndScriptLoop4_index ; $55
const ScriptCommand_EndScriptLoop5_index ; $56
const ScriptCommand_EndScriptLoop6_index ; $57
const ScriptCommand_EndScript2_index ; $53
const ScriptCommand_EndScript3_index ; $54
const ScriptCommand_EndScript4_index ; $55
const ScriptCommand_EndScript5_index ; $56
const ScriptCommand_EndScript6_index ; $57
const ScriptCommand_SetFlagValue_index ; $58
const ScriptCommand_JumpIfFlagZero1_index ; $59
const ScriptCommand_JumpIfFlagNonzero1_index ; $5a
@ -105,16 +105,16 @@ ENDM
const ScriptCommand_JumpIfFlagNonzero2_index ; $61
const ScriptCommand_JumpIfFlagZero2_index ; $62
const ScriptCommand_IncrementFlagValue_index ; $63
const ScriptCommand_EndScriptLoop7_index ; $64
const ScriptCommand_EndScriptLoop8_index ; $65
const ScriptCommand_EndScriptLoop9_index ; $66
const ScriptCommand_EndScriptLoop10_index ; $67
const ScriptCommand_EndScript7_index ; $64
const ScriptCommand_EndScript8_index ; $65
const ScriptCommand_EndScript9_index ; $66
const ScriptCommand_EndScript10_index ; $67
; Script Macros
; Stops the current script and returns control flow back to assembly
end_script_loop: MACRO
run_command ScriptCommand_EndScriptLoop1
end_script: MACRO
run_command ScriptCommand_EndScript
ENDM
; Closes current dialog window
@ -122,9 +122,9 @@ close_advanced_text_box: MACRO
run_command ScriptCommand_CloseAdvancedTextBox
ENDM
; Opens a new dialog window and displays the given text
print_text_string: MACRO
run_command ScriptCommand_PrintTextString
; Opens a new dialog window and displays the given text and active npc name
print_npc_text: MACRO
run_command ScriptCommand_PrintNPCText
tx \1 ; Text Pointer
ENDM
@ -140,17 +140,17 @@ ENDC
dw \2 ; Jump Location
ENDM
; Begins a battle with the NPC currently being spoken to
start_battle: MACRO
run_command ScriptCommand_StartBattle
; Begins a duel with the NPC currently being spoken to
start_duel: MACRO
run_command ScriptCommand_StartDuel
db \1 ; Prize Amount (ex PRIZES_2)
db \2 ; Deck ID (ex SAMS_PRACTICE_DECK_ID)
db \3 ; Duel Music (ex MUSIC_DUEL_THEME_1)
ENDM
; Prints the first or second text depending on if wScriptControlByte is nonzero or zero respectively
print_variable_text: MACRO
run_command ScriptCommand_PrintVariableText
print_variable_npc_text: MACRO
run_command ScriptCommand_PrintVariableNPCText
tx \1 ; Text Pointer
tx \2 ; Text Pointer
ENDM
@ -304,7 +304,7 @@ quit_script_fully: MACRO
run_command ScriptCommand_QuitScriptFully
ENDM
choose_deck_to_duel_against_multichoice: MACRO
choose_deck_to_duel_against: MACRO
run_command ScriptCommand_ChooseDeckToDuelAgainstMultichoice
ENDM
@ -314,7 +314,7 @@ open_deck_machine: MACRO
db \1 ; Deck Machine Type?
ENDM
choose_starter_deck_multichoice: MACRO
choose_starter_deck: MACRO
run_command ScriptCommand_ChooseStarterDeckMultichoice
ENDM
@ -329,7 +329,7 @@ enter_map: MACRO
ENDM
; Moves any NPC using an NPCMovement
move_arbitrary_npc: MACRO
move_npc: MACRO
run_command ScriptCommand_MoveArbitraryNPC
db \1 ; NPC (ex NPC_JOSHUA)
dw \2 ; NPCMovement (NPCMovement_e2ab)
@ -392,26 +392,6 @@ show_sam_tutorial_multichoice: MACRO
run_command ScriptCommand_ShowSamTutorialMultichoice
ENDM
end_script_loop_2: MACRO
run_command ScriptCommand_EndScriptLoop2
ENDM
end_script_loop_3: MACRO
run_command ScriptCommand_EndScriptLoop3
ENDM
end_script_loop_4: MACRO
run_command ScriptCommand_EndScriptLoop4
ENDM
end_script_loop_5: MACRO
run_command ScriptCommand_EndScriptLoop5
ENDM
end_script_loop_6: MACRO
run_command ScriptCommand_EndScriptLoop6
ENDM
; Sets a flag's value
script_set_flag_value: MACRO
run_command ScriptCommand_SetFlagValue
@ -497,20 +477,4 @@ increment_flag_value: MACRO
db \1 ; flag (ex EVENT_FLAG_11)
ENDM
end_script_loop_7: MACRO
run_command ScriptCommand_EndScriptLoop7
ENDM
end_script_loop_8: MACRO
run_command ScriptCommand_EndScriptLoop8
ENDM
end_script_loop_9: MACRO
run_command ScriptCommand_EndScriptLoop9
ENDM
end_script_loop_10: MACRO
run_command ScriptCommand_EndScriptLoop10
ENDM

View File

@ -2310,9 +2310,9 @@ wd3b9:: ; d3b9
ds $2
wd3bb:: ; d3bb
ds $1
ds $a
ds $14
ds $b
wd3d0:: ; d3d0
ds $1

View File

@ -332,7 +332,7 @@ events = [
"EVENT_FLAG_00",
"EVENT_FLAG_01",
"EVENT_TEMP_TALKED_TO_IMAKUNI",
"EVENT_TEMP_BATTLED_IMAKUNI",
"EVENT_TEMP_DUELED_IMAKUNI",
"EVENT_FLAG_04",
"EVENT_FLAG_05",
"EVENT_FLAG_06",

View File

@ -22,112 +22,112 @@ texts = None
# script command names and parameter lists
script_commands = {
0xe7: { "name": "start_script", "params": [] },
0xe7: { "name": "start_script", "params": [] },
0x00: { "name": "end_script_loop", "params": [] },
0x01: { "name": "close_advanced_text_box", "params": [] },
0x02: { "name": "print_text_string", "params": [ "text" ] },
0x03: { "name": "Func_ccdc", "params": [ "text" ] }, # print text and ???
0x04: { "name": "ask_question_jump", "params": [ "text", "label" ] },
0x05: { "name": "start_battle", "params": [ "prizes", "deck", "song" ] },
0x06: { "name": "print_variable_text", "params": [ "text", "text" ] },
0x07: { "name": "Func_cda8", "params": [ "text", "text" ] }, # print variable text and ???
0x08: { "name": "print_text_quit_fully", "params": [ "text" ] },
0x09: { "name": "Func_cdcb", "params": [] },
0x0a: { "name": "move_active_npc_by_direction", "params": [ "movement_table" ] },
0x0b: { "name": "close_text_box", "params": [] },
0x0c: { "name": "give_booster_packs", "params": [ "booster", "booster", "booster" ] },
0x0d: { "name": "jump_if_card_owned", "params": [ "card", "label" ] },
0x0e: { "name": "jump_if_card_in_collection", "params": [ "card", "label" ] },
0x0f: { "name": "give_card", "params": [ "card" ] },
0x10: { "name": "take_card", "params": [ "card" ] },
0x11: { "name": "Func_cf53", "params": [ "label" ] }, # jump if any energy cards in collection
0x12: { "name": "Func_cf7b", "params": [] }, # remove all energy cards from collection
0x13: { "name": "jump_if_enough_cards_owned", "params": [ "word_decimal", "label" ] },
0x14: { "name": "fight_club_pupil_jump", "params": [ "label", "label", "label", "label", "label" ] },
0x15: { "name": "Func_cfc6", "params": [ "byte" ] },
0x16: { "name": "Func_cfd4", "params": [] },
0x17: { "name": "Func_d00b", "params": [] }, # get card name for EVENT_FLAG_2B
0x18: { "name": "Func_d025", "params": [ "label" ] }, # jump if card in EVENT_FLAG_2B is in collection or decks
0x19: { "name": "Func_d032", "params": [ "label" ] }, # jump if card in EVENT_FLAG_2B is in collection
0x1a: { "name": "Func_d03f", "params": [] }, # remove card in EVENT_FLAG_2B from collection
0x1b: { "name": "script_jump", "params": [ "label" ] },
0x1c: { "name": "try_give_medal_pc_packs", "params": [] },
0x1d: { "name": "set_player_direction", "params": [ "direction" ] },
0x1e: { "name": "move_player", "params": [ "direction", "byte_decimal" ] },
0x1f: { "name": "show_card_received_screen", "params": [ "card" ] },
0x20: { "name": "set_dialog_npc", "params": [ "npc" ] },
0x21: { "name": "set_next_npc_and_script", "params": [ "npc", "label" ] },
0x22: { "name": "Func_d095", "params": [ "byte", "byte", "byte" ] }, # LOADED_NPC_FIELD_05 and LOADED_NPC_FIELD_06
0x23: { "name": "Func_d0be", "params": [ "byte", "byte" ] }, # coords
0x24: { "name": "do_frames", "params": [ "byte_decimal" ] },
0x25: { "name": "Func_d0d9", "params": [ "byte", "byte", "label" ] }, # coords, jump if npc coords match
0x26: { "name": "jump_if_player_coords_match", "params": [ "byte_decimal", "byte_decimal", "label" ] },
0x27: { "name": "move_active_npc", "params": [ "movement" ] },
0x28: { "name": "give_one_of_each_trainer_booster", "params": [] },
0x29: { "name": "Func_d103", "params": [ "npc", "label" ] }, # jump if npc loaded
0x2a: { "name": "Func_d125", "params": [ "event" ] }, # give medal
0x2b: { "name": "Func_d135", "params": [ "byte" ] }, # load current map name into tx ram slot
0x2c: { "name": "Func_d16b", "params": [ "byte" ] }, # load current npc name into tx ram slot
0x2d: { "name": "Func_cd4f", "params": [ "prizes", "deck", "song" ] },
0x2e: { "name": "Func_cd94", "params": [ "text", "text", "text" ] },
0x2f: { "name": "move_wram_npc", "params": [ "movement" ] },
0x30: { "name": "Func_cdd8", "params": [] },
0x31: { "name": "Func_cdf5", "params": [ "byte", "byte" ] }, # coords
0x32: { "name": "Func_d195", "params": [] }, # pick challenge hall opponent
0x33: { "name": "Func_d1ad", "params": [] }, # open menu
0x34: { "name": "Func_d1b3", "params": [] }, # pick trade card
0x35: { "name": "quit_script_fully", "params": [] },
0x36: { "name": "Func_d244", "params": [ "byte" ] },
0x37: { "name": "choose_deck_to_duel_against_multichoice", "params": [] },
0x38: { "name": "open_deck_machine", "params": [ "byte" ] },
0x39: { "name": "choose_starter_deck_multichoice", "params": [] },
0x3a: { "name": "enter_map", "params": [ "byte", "map", "byte_decimal", "byte_decimal", "direction" ] },
0x3b: { "name": "move_arbitrary_npc", "params": [ "npc", "movement" ] },
0x3c: { "name": "Func_d209", "params": [] }, # pick legendary card
0x3d: { "name": "Func_d38f", "params": [ "byte" ] },
0x3e: { "name": "Func_d396", "params": [ "byte" ] },
0x3f: { "name": "Func_cd76", "params": [] },
0x40: { "name": "Func_d39d", "params": [ "byte" ] },
0x41: { "name": "Func_d3b9", "params": [] },
0x42: { "name": "try_give_pc_pack", "params": [ "byte" ] },
0x43: { "name": "script_nop", "params": [] },
0x44: { "name": "Func_d3d4", "params": [] },
0x45: { "name": "Func_d3e0", "params": [] },
0x46: { "name": "Func_d3fe", "params": [ "song" ] },
0x47: { "name": "Func_d408", "params": [ "song" ] }, # set default song
0x48: { "name": "play_song", "params": [ "song" ] },
0x49: { "name": "play_sfx", "params": [ "sfx" ] },
0x4a: { "name": "pause_song", "params": [] },
0x4b: { "name": "resume_song", "params": [] },
0x4c: { "name": "Func_d41d", "params": [] }, # play default song
0x4d: { "name": "wait_for_song_to_finish", "params": [] },
0x4e: { "name": "Func_d435", "params": [ "byte" ] },
0x4f: { "name": "ask_question_jump_default_yes", "params": [ "text", "label" ] },
0x50: { "name": "show_sam_normal_multichoice", "params": [] },
0x51: { "name": "show_sam_tutorial_multichoice", "params": [] },
0x52: { "name": "Func_d43d", "params": [] },
0x53: { "name": "end_script_loop_2", "params": [] },
0x54: { "name": "end_script_loop_3", "params": [] },
0x55: { "name": "end_script_loop_4", "params": [] },
0x56: { "name": "end_script_loop_5", "params": [] },
0x57: { "name": "end_script_loop_6", "params": [] },
0x58: { "name": "script_set_flag_value", "params": [ "event", "byte" ] },
0x59: { "name": "jump_if_flag_zero_1", "params": [ "event", "label" ] },
0x5a: { "name": "jump_if_flag_nonzero_1", "params": [ "event", "label" ] },
0x5b: { "name": "jump_if_flag_equal", "params": [ "event", "byte", "label" ] },
0x5c: { "name": "jump_if_flag_not_equal", "params": [ "event", "byte", "label" ] },
0x5d: { "name": "jump_if_flag_not_less_than", "params": [ "event", "byte", "label" ] },
0x5e: { "name": "jump_if_flag_less_than", "params": [ "event", "byte", "label" ] },
0x5f: { "name": "max_out_flag_value", "params": [ "event" ] },
0x60: { "name": "zero_out_flag_value", "params": [ "event" ] },
0x61: { "name": "jump_if_flag_nonzero_2", "params": [ "event", "label"] },
0x62: { "name": "jump_if_flag_zero_2", "params": [ "event", "label" ] },
0x63: { "name": "increment_flag_value", "params": [ "event" ] },
0x64: { "name": "end_script_loop_7", "params": [] },
0x65: { "name": "end_script_loop_8", "params": [] },
0x66: { "name": "end_script_loop_9", "params": [] },
0x67: { "name": "end_script_loop_10", "params": [] },
0x00: { "name": "end_script", "params": [] },
0x01: { "name": "close_advanced_text_box", "params": [] },
0x02: { "name": "print_npc_text", "params": [ "text" ] },
0x03: { "name": "Func_ccdc", "params": [ "text" ] }, # print text without npc name
0x04: { "name": "ask_question_jump", "params": [ "text", "label" ] },
0x05: { "name": "start_duel", "params": [ "prizes", "deck", "song" ] },
0x06: { "name": "print_variable_npc_text", "params": [ "text", "text" ] },
0x07: { "name": "Func_cda8", "params": [ "text", "text" ] }, # print variable text without npc name
0x08: { "name": "print_text_quit_fully", "params": [ "text" ] },
0x09: { "name": "Func_cdcb", "params": [] }, # unload active npc
0x0a: { "name": "move_active_npc_by_direction", "params": [ "movement_table" ] },
0x0b: { "name": "close_text_box", "params": [] },
0x0c: { "name": "give_booster_packs", "params": [ "booster", "booster", "booster" ] },
0x0d: { "name": "jump_if_card_owned", "params": [ "card", "label" ] },
0x0e: { "name": "jump_if_card_in_collection", "params": [ "card", "label" ] },
0x0f: { "name": "give_card", "params": [ "card" ] },
0x10: { "name": "take_card", "params": [ "card" ] },
0x11: { "name": "Func_cf53", "params": [ "label" ] }, # jump if any energy cards in collection
0x12: { "name": "Func_cf7b", "params": [] }, # remove all energy cards from collection
0x13: { "name": "jump_if_enough_cards_owned", "params": [ "word_decimal", "label" ] },
0x14: { "name": "fight_club_pupil_jump", "params": [ "label", "label", "label", "label", "label" ] },
0x15: { "name": "Func_cfc6", "params": [ "direction" ] }, # set active npc direction
0x16: { "name": "Func_cfd4", "params": [] }, # pick next man1 requested card (EVENT_FLAG_2B)
0x17: { "name": "Func_d00b", "params": [] }, # get man1 requested card name text (EVENT_FLAG_2B)
0x18: { "name": "Func_d025", "params": [ "label" ] }, # jump if man1 requested card owned (EVENT_FLAG_2B)
0x19: { "name": "Func_d032", "params": [ "label" ] }, # jump if man1 requested card in collection (EVENT_FLAG_2B)
0x1a: { "name": "Func_d03f", "params": [] }, # remove man1 requested card from collection (EVENT_FLAG_2B)
0x1b: { "name": "script_jump", "params": [ "label" ] },
0x1c: { "name": "try_give_medal_pc_packs", "params": [] },
0x1d: { "name": "set_player_direction", "params": [ "direction" ] },
0x1e: { "name": "move_player", "params": [ "direction", "byte_decimal" ] },
0x1f: { "name": "show_card_received_screen", "params": [ "card" ] },
0x20: { "name": "set_dialog_npc", "params": [ "npc" ] },
0x21: { "name": "set_next_npc_and_script", "params": [ "npc", "label" ] },
0x22: { "name": "Func_d095", "params": [ "byte", "byte", "byte" ] }, # set sprite attributes LOADED_NPC_FIELD_05 and LOADED_NPC_FIELD_06
0x23: { "name": "Func_d0be", "params": [ "byte_decimal", "byte_decimal" ] }, # coords, set active npc coords
0x24: { "name": "do_frames", "params": [ "byte_decimal" ] },
0x25: { "name": "Func_d0d9", "params": [ "byte_decimal", "byte_decimal", "label" ] }, # coords, jump if active npc coords match
0x26: { "name": "jump_if_player_coords_match", "params": [ "byte_decimal", "byte_decimal", "label" ] },
0x27: { "name": "move_active_npc", "params": [ "movement" ] },
0x28: { "name": "give_one_of_each_trainer_booster", "params": [] },
0x29: { "name": "Func_d103", "params": [ "npc", "label" ] }, # jump if npc loaded
0x2a: { "name": "Func_d125", "params": [ "event" ] }, # show medal received screen ?
0x2b: { "name": "Func_d135", "params": [ "byte" ] }, # load current map name into tx ram slot
0x2c: { "name": "Func_d16b", "params": [ "byte" ] }, # load active npc name into tx ram slot
0x2d: { "name": "Func_cd4f", "params": [ "prizes", "deck", "song" ] }, # start challenge hall duel
0x2e: { "name": "Func_cd94", "params": [ "text", "text", "text" ] }, # print text based on challenge cup number
0x2f: { "name": "move_wram_npc", "params": [ "movement" ] },
0x30: { "name": "Func_cdd8", "params": [] }, # unload challenge hall npc
0x31: { "name": "Func_cdf5", "params": [ "byte", "byte" ] }, # coords, set challenge hall npc coords
0x32: { "name": "Func_d195", "params": [] }, # pick challenge hall opponent
0x33: { "name": "Func_d1ad", "params": [] }, # open menu
0x34: { "name": "Func_d1b3", "params": [] }, # pick challenge cup prize card
0x35: { "name": "quit_script_fully", "params": [] },
0x36: { "name": "Func_d244", "params": [ "byte" ] }, # replace map blocks (dech machines, pokemon dome doors, hall of honor doors, challenge machine)
0x37: { "name": "choose_deck_to_duel_against", "params": [] },
0x38: { "name": "open_deck_machine", "params": [ "byte" ] },
0x39: { "name": "choose_starter_deck", "params": [] },
0x3a: { "name": "enter_map", "params": [ "byte", "map", "byte_decimal", "byte_decimal", "direction" ] },
0x3b: { "name": "move_npc", "params": [ "npc", "movement" ] },
0x3c: { "name": "Func_d209", "params": [] }, # pick legendary card
0x3d: { "name": "Func_d38f", "params": [ "byte" ] }, # flash screen (bool arg, true to stay white)
0x3e: { "name": "Func_d396", "params": [ "byte" ] }, # save game (bool arg, true to go back to dr mason lab)
0x3f: { "name": "Func_cd76", "params": [] }, # battle center
0x40: { "name": "Func_d39d", "params": [ "byte" ] }, # gift center (bool arg, false for menu, true to executing selection)
0x41: { "name": "Func_d3b9", "params": [] }, # play credits
0x42: { "name": "try_give_pc_pack", "params": [ "byte" ] },
0x43: { "name": "script_nop", "params": [] },
0x44: { "name": "Func_d3d4", "params": [] }, # give starter deck
0x45: { "name": "Func_d3e0", "params": [] }, # walk player to dr mason lab
0x46: { "name": "Func_d3fe", "params": [ "song" ] }, # override song
0x47: { "name": "Func_d408", "params": [ "song" ] }, # set default song
0x48: { "name": "play_song", "params": [ "song" ] },
0x49: { "name": "play_sfx", "params": [ "sfx" ] },
0x4a: { "name": "pause_song", "params": [] },
0x4b: { "name": "resume_song", "params": [] },
0x4c: { "name": "Func_d41d", "params": [] }, # play default song
0x4d: { "name": "wait_for_song_to_finish", "params": [] },
0x4e: { "name": "Func_d435", "params": [ "byte" ] }, # record master win (8 clubs plus ronald card master)
0x4f: { "name": "ask_question_jump_default_yes", "params": [ "text", "label" ] },
0x50: { "name": "show_sam_normal_multichoice", "params": [] },
0x51: { "name": "show_sam_tutorial_multichoice", "params": [] },
0x52: { "name": "Func_d43d", "params": [] }, # challenge machine
0x53: { "name": "end_script_2", "params": [] },
0x54: { "name": "end_script_3", "params": [] },
0x55: { "name": "end_script_4", "params": [] },
0x56: { "name": "end_script_5", "params": [] },
0x57: { "name": "end_script_6", "params": [] },
0x58: { "name": "script_set_flag_value", "params": [ "event", "byte" ] },
0x59: { "name": "jump_if_flag_zero_1", "params": [ "event", "label" ] },
0x5a: { "name": "jump_if_flag_nonzero_1", "params": [ "event", "label" ] },
0x5b: { "name": "jump_if_flag_equal", "params": [ "event", "byte", "label" ] },
0x5c: { "name": "jump_if_flag_not_equal", "params": [ "event", "byte", "label" ] },
0x5d: { "name": "jump_if_flag_not_less_than", "params": [ "event", "byte", "label" ] },
0x5e: { "name": "jump_if_flag_less_than", "params": [ "event", "byte", "label" ] },
0x5f: { "name": "max_out_flag_value", "params": [ "event" ] },
0x60: { "name": "zero_out_flag_value", "params": [ "event" ] },
0x61: { "name": "jump_if_flag_nonzero_2", "params": [ "event", "label"] },
0x62: { "name": "jump_if_flag_zero_2", "params": [ "event", "label" ] },
0x63: { "name": "increment_flag_value", "params": [ "event" ] },
0x64: { "name": "end_script_7", "params": [] },
0x65: { "name": "end_script_8", "params": [] },
0x66: { "name": "end_script_9", "params": [] },
0x67: { "name": "end_script_10", "params": [] },
}
quit_commands = [