mirror of
https://github.com/pret/poketcg2.git
synced 2026-10-02 05:57:26 -05:00
Merge pull request #49 from earthoul/refactor-nov-25
Disassemble Auto Deck lists and identify Black Box and Promo prizes for Cups
This commit is contained in:
@@ -4,12 +4,14 @@ INCLUDE "constants/animation_constants.asm"
|
||||
INCLUDE "constants/attack_animation_constants.asm"
|
||||
INCLUDE "constants/card_constants.asm"
|
||||
INCLUDE "constants/card_data_constants.asm"
|
||||
INCLUDE "constants/challenge_cup_constants.asm"
|
||||
INCLUDE "constants/coin_constants.asm"
|
||||
INCLUDE "constants/credits_constants.asm"
|
||||
INCLUDE "constants/deck_ai_constants.asm"
|
||||
INCLUDE "constants/deck_constants.asm"
|
||||
INCLUDE "constants/duel_constants.asm"
|
||||
INCLUDE "constants/duel_interface_constants.asm"
|
||||
INCLUDE "constants/game_center_constants.asm"
|
||||
INCLUDE "constants/gfx_constants.asm"
|
||||
INCLUDE "constants/intro_constants.asm"
|
||||
INCLUDE "constants/map_constants.asm"
|
||||
|
||||
@@ -93,6 +93,7 @@ DEF PKMN_CARD_DATA_LENGTH EQU _RS ; $42
|
||||
const PSYCHIC ; $05
|
||||
DEF NUM_COLORED_TYPES EQU const_value
|
||||
const COLORLESS ; $06
|
||||
DEF NUM_PKMN_TYPES EQU const_value
|
||||
const RAINBOW ; $07
|
||||
DEF NUM_TYPES EQU const_value
|
||||
|
||||
@@ -163,20 +164,20 @@ DEF PRESENT_PACK EQU 7
|
||||
|
||||
; booster pack constants
|
||||
const_def
|
||||
const BOOSTER_BEGINNING_POKEMON ; $0
|
||||
const BOOSTER_LEGENDARY_POWER ; $1
|
||||
const BOOSTER_ISLAND_OF_FOSSIL ; $2
|
||||
const BOOSTER_PSYCHIC_BATTLE ; $3
|
||||
const BOOSTER_SKY_FLYING_POKEMON ; $4
|
||||
const BOOSTER_WE_ARE_TEAM_ROCKET ; $5
|
||||
const BOOSTER_TEAM_ROCKETS_AMBITION ; $6
|
||||
const BOOSTER_DEBUG_1 ; $7
|
||||
const BOOSTER_PRESENT_PACK_1 ; $8
|
||||
const BOOSTER_PRESENT_PACK_2 ; $9
|
||||
const BOOSTER_PRESENT_PACK_3 ; $a
|
||||
const BOOSTER_PRESENT_PACK_4 ; $b
|
||||
const BOOSTER_PRESENT_PACK_5 ; $c
|
||||
const BOOSTER_DEBUG_2 ; $d
|
||||
const BOOSTER_BEGINNING_POKEMON ; $0
|
||||
const BOOSTER_LEGENDARY_POWER ; $1
|
||||
const BOOSTER_ISLAND_OF_FOSSIL ; $2
|
||||
const BOOSTER_PSYCHIC_BATTLE ; $3
|
||||
const BOOSTER_SKY_FLYING_POKEMON ; $4
|
||||
const BOOSTER_WE_ARE_TEAM_ROCKET ; $5
|
||||
const BOOSTER_TEAM_ROCKETS_AMBITION ; $6
|
||||
const BOOSTER_DEBUG_10_STAR ; $7
|
||||
const BOOSTER_PRESENT_10_ENERGY ; $8
|
||||
const BOOSTER_PRESENT_FROM_ALL_SETS ; $9
|
||||
const BOOSTER_PRESENT_FROM_NON_ROCKET_SETS ; $a
|
||||
const BOOSTER_PRESENT_FROM_LATTER_4_SETS ; $b
|
||||
const BOOSTER_PRESENT_FROM_ROCKET_SETS ; $c
|
||||
const BOOSTER_DEBUG_2_STAR ; $d
|
||||
|
||||
; real card set constants
|
||||
const_def
|
||||
@@ -195,10 +196,12 @@ DEF PRESENT_PACK EQU 7
|
||||
DEF NUM_CARDS_IN_BOOSTER EQU 10
|
||||
|
||||
; CARD_DATA_STAGE constants
|
||||
DEF BASIC EQU $00
|
||||
DEF STAGE1 EQU $01
|
||||
DEF STAGE2 EQU $02
|
||||
DEF STAGE2_WITHOUT_STAGE1 EQU $03
|
||||
const_def
|
||||
const BASIC ; 0
|
||||
const STAGE1 ; 1
|
||||
const STAGE2 ; 2
|
||||
DEF NUM_REGULAR_EVO_STAGES EQU const_value
|
||||
const STAGE2_WITHOUT_STAGE1 ; 3
|
||||
|
||||
; CARD_DATA_WEAKNESS and CARD_DATA_RESISTANCE constants
|
||||
DEF WR_FIRE EQU $80
|
||||
@@ -313,3 +316,17 @@ DEF CARD_RECEIVE_STRUCT_ALT_RECEIVED_TEXT RW ; $9
|
||||
|
||||
DEF CARD_RECEIVE_STRUCT_TEXTS_SIZE EQU _RS - CARD_RECEIVE_STRUCT_TEXTS ; $9
|
||||
DEF CARD_RECEIVE_STRUCT_SIZE EQU _RS ; $b
|
||||
|
||||
; wDeckCheckCardCounts struct
|
||||
RSRESET
|
||||
DEF DECKCHECKSTRUCT_ENERGY RB ; $00
|
||||
DEF DECKCHECKSTRUCT_BASIC_PKMN RB ; $01
|
||||
DEF DECKCHECKSTRUCT_STAGE1_PKMN RB ; $02
|
||||
DEF DECKCHECKSTRUCT_STAGE2_PKMN RB ; $03
|
||||
DEF DECKCHECKSTRUCT_TRAINER RB ; $04
|
||||
DEF DECKCHECKSTRUCT_ENERGY_PER_TYPE RB NUM_TYPES ; $05
|
||||
DEF DECKCHECKSTRUCT_PKMN_PER_TYPE RB NUM_TYPES ; $0d
|
||||
DEF DECKCHECKSTRUCT_ENERGY_SURPLUS RB NUM_TYPES ; $15
|
||||
DEF DECKCHECKSTRUCT_RAINBOW_ENERGY RB ; $1d
|
||||
|
||||
DEF DECKCHECKSTRUCT_LENGTH EQU _RS ; $1e
|
||||
|
||||
27
src/constants/challenge_cup_constants.asm
Normal file
27
src/constants/challenge_cup_constants.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
; cup opponents
|
||||
const_def
|
||||
const GRANDMASTERCUP_GENE ; 0
|
||||
const GRANDMASTERCUP_MITCH ; 1
|
||||
const GRANDMASTERCUP_NIKKI ; 2
|
||||
const GRANDMASTERCUP_RICK ; 3
|
||||
const GRANDMASTERCUP_AMY ; 4
|
||||
const GRANDMASTERCUP_KEN ; 5
|
||||
const GRANDMASTERCUP_ISAAC ; 6
|
||||
const GRANDMASTERCUP_MURRAY ; 7
|
||||
const GRANDMASTERCUP_RONALD ; 8
|
||||
DEF NUM_GRANDMASTERCUP_OPPONENT_IDS EQU const_value
|
||||
|
||||
DEF NUM_GRANDMASTERCUP_DUELISTS EQU 8
|
||||
DEF NUM_GRANDMASTERCUP_OPPONENTS EQU NUM_GRANDMASTERCUP_DUELISTS - 1 ; 7
|
||||
|
||||
; cup prizes
|
||||
DEF NUM_GRANDMASTERCUP_PRIZE_POOL EQU 37
|
||||
|
||||
const_def
|
||||
const GRANDMASTERCUP_PRIZE_0 ; 0
|
||||
const GRANDMASTERCUP_PRIZE_1 ; 1
|
||||
const GRANDMASTERCUP_PRIZE_2 ; 2
|
||||
const GRANDMASTERCUP_PRIZE_3 ; 3
|
||||
|
||||
DEF NUM_TCG_CHALLENGE_CUP_PRIZE_POOL EQU 17
|
||||
DEF NUM_GR_CHALLENGE_CUP_PRIZE_POOL EQU 17
|
||||
32
src/constants/game_center_constants.asm
Normal file
32
src/constants/game_center_constants.asm
Normal file
@@ -0,0 +1,32 @@
|
||||
DEF MAX_CHIPS EQU 9999
|
||||
|
||||
; bet / chips per play
|
||||
DEF CHIPS_BET_BLACK_BOX EQU 5
|
||||
DEF CHIPS_BET_BILLS_PC EQU 20
|
||||
DEF CHIPS_BET_COIN_FLIP EQU 1
|
||||
DEF CHIPS_BET_SLOT_1 EQU 1
|
||||
DEF CHIPS_BET_SLOT_5 EQU 5
|
||||
DEF CHIPS_BET_DUNGEON_10 EQU 10
|
||||
DEF CHIPS_BET_DUNGEON_20 EQU 20
|
||||
DEF CHIPS_BET_DUNGEON_30 EQU 30
|
||||
DEF CHIPS_BET_DUNGEON_50 EQU 50
|
||||
DEF CHIPS_BET_DUNGEON_100 EQU 100
|
||||
|
||||
; coin flip
|
||||
DEF MIN_NUM_GAMECENTER_COIN_FLIP_STREAK EQU 3
|
||||
|
||||
DEF CHIPS_COIN_FLIP_STREAK_3 EQU 20
|
||||
DEF CHIPS_COIN_FLIP_STREAK_4 EQU 40
|
||||
DEF CHIPS_COIN_FLIP_STREAK_5 EQU 100
|
||||
DEF CHIPS_COIN_FLIP_STREAK_6 EQU 200
|
||||
DEF CHIPS_COIN_FLIP_STREAK_7 EQU 500
|
||||
DEF CHIPS_COIN_FLIP_STREAK_8 EQU 1000
|
||||
DEF CHIPS_COIN_FLIP_STREAK_9 EQU 3000
|
||||
|
||||
DEF MAX_NUM_GAMECENTER_COIN_FLIP_STREAK EQU 10
|
||||
|
||||
; black box
|
||||
; insert 5 promos -> +[1, 5] bonus cards
|
||||
DEF MAX_NUM_BLACK_BOX_INPUT EQU 5
|
||||
DEF MAX_NUM_BLACK_BOX_OUTPUT EQU 10
|
||||
DEF BLACK_BOX_OUTPUT_BYTES EQU 2 * MAX_NUM_BLACK_BOX_OUTPUT
|
||||
@@ -31,13 +31,50 @@
|
||||
const STARTMENU_NEW_GAME ; 2
|
||||
const STARTMENU_CONTINUE_DUEL ; 3
|
||||
|
||||
; debug menu options
|
||||
const_def
|
||||
const DEBUGMENU_POWER_ON ; 0
|
||||
const DEBUGMENU_COIN ; 1
|
||||
const DEBUGMENU_CONFIG ; 2
|
||||
const DEBUGMENU_EFFECT_VIEWER ; 3
|
||||
const DEBUGMENU_CREDITS ; 4
|
||||
const DEBUGMENU_DUEL ; 5
|
||||
const DEBUGMENU_SLOT ; 6
|
||||
|
||||
; pause menu options
|
||||
const_def
|
||||
const PAUSEMENU_STATUS ; 0
|
||||
const PAUSEMENU_DIARY ; 1
|
||||
const PAUSEMENU_DECK ; 2
|
||||
const PAUSEMENU_MINICOM ; 3
|
||||
const PAUSEMENU_COIN ; 4
|
||||
const PAUSEMENU_CONFIG ; 5
|
||||
|
||||
; pc menu options
|
||||
const_def
|
||||
const PCMENU_CARD_ALBUM ; 0
|
||||
const PCMENU_DECK_DIAGNOSIS ; 1
|
||||
const PCMENU_GLOSSARY ; 2
|
||||
const PCMENU_PRINTER ; 3
|
||||
|
||||
; minicom menu options
|
||||
const_def
|
||||
const MINICOMMENU_DECK_SAVE_MACHINE ; 0
|
||||
const MINICOMMENU_MAILBOX ; 1
|
||||
const MINICOMMENU_CARD_ALBUM ; 2
|
||||
|
||||
; mailbox options
|
||||
const_def
|
||||
const MAILBOXMENU_READ ; 0
|
||||
const MAILBOXMENU_DELETE ; 1
|
||||
|
||||
; constants for wGlossaryMenu
|
||||
const_def
|
||||
const GLOSSARY_GAME_BASICS ; $0
|
||||
const GLOSSARY_CARD_TYPE_EXPLANATIONS ; $1
|
||||
const GLOSSARY_STATUS_WINNING_LOSING ; $2
|
||||
const GLOSSARY_SPECIAL_DUEL_RULES ; $3
|
||||
const GLOSSARY_EXIT ; $4
|
||||
const GLOSSARY_GAME_BASICS ; 0
|
||||
const GLOSSARY_CARD_TYPE_EXPLANATIONS ; 1
|
||||
const GLOSSARY_STATUS_WINNING_LOSING ; 2
|
||||
const GLOSSARY_SPECIAL_DUEL_RULES ; 3
|
||||
const GLOSSARY_EXIT ; 4
|
||||
|
||||
; filter types for CardTypeFilters
|
||||
; used to categorise the different cards
|
||||
@@ -54,11 +91,17 @@ DEF FILTER_ENERGY EQU $20
|
||||
|
||||
DEF NUM_FILTERS EQU 9
|
||||
|
||||
; for FilterCardListInHL
|
||||
DEF FILTER_ONLY_PKMN EQU 0
|
||||
DEF FILTER_ONLY_TRAINER EQU FILTER_TRAINER >> 4 ; 1
|
||||
DEF FILTER_ONLY_ENERGY EQU FILTER_ENERGY >> 4 ; 2, or any number > 1
|
||||
|
||||
DEF NUM_DECK_CONFIRMATION_VISIBLE_CARDS EQU 7
|
||||
DEF NUM_FILTERED_LIST_VISIBLE_CARDS EQU 6
|
||||
|
||||
DEF NUM_DECK_SAVE_MACHINE_SLOTS EQU 50
|
||||
DEF NUM_DECK_SAVE_MACHINE_SLOTS EQU 50
|
||||
DEF NUM_DECK_MACHINE_VISIBLE_DECKS EQU 5
|
||||
DEF NUM_AUTO_DECK_MACHINE_SLOTS EQU 4
|
||||
|
||||
; deck flags
|
||||
const_def
|
||||
|
||||
@@ -26,8 +26,6 @@ DEF MAX_NUM_CARDPOP_RECORDS EQU 98
|
||||
DEF CARDPOP_RECORD_SIZE EQU $20
|
||||
DEF CARDPOP_RECORD_STATS_SIZE EQU $05
|
||||
|
||||
DEF MAX_CHIPS EQU 9999
|
||||
|
||||
; rJOYP constants to read IR signals
|
||||
DEF P15 EQU %00100000
|
||||
DEF P14 EQU %00010000
|
||||
|
||||
@@ -36,3 +36,9 @@
|
||||
const SCENE_COIN_TOSS_RESULT_1 ; $22
|
||||
const SCENE_COIN_TOSS_RESULT_2 ; $23
|
||||
const SCENE_GBC_ONLY_DISCLAIMER ; $24
|
||||
|
||||
; prologue scenes
|
||||
const_def
|
||||
const PROLOGUE_PLAYER_RECAP ; 0
|
||||
const PROLOGUE_GR_INVASION ; 1
|
||||
const PROLOGUE_PLAYER_TO_LAB ; 2
|
||||
|
||||
@@ -315,7 +315,7 @@ DEF MOVE_SPEED_WALK EQU 1
|
||||
DEF MOVE_SPEED_RUN EQU 2
|
||||
|
||||
; the true max is probably much lower. this is just the biggest 6-bit number.
|
||||
DEF MAX_MOVEMENT EQU $3F
|
||||
DEF MAX_MOVEMENT EQU $3f
|
||||
|
||||
; generate MOVE_x constants for use in NPCMovement data.
|
||||
; see also: script_extractor.py
|
||||
@@ -336,21 +336,22 @@ DEF MAIL_MAX_NUM EQU 8
|
||||
DEF MAIL_MAX_ON_SCREEN EQU 4
|
||||
DEF MAIL_BUFFER_SIZE EQU MAIL_MAX_NUM + 1
|
||||
DEF MAIL_QUEUE_BUFFER_SIZE EQU 25
|
||||
DEF BLACK_BOX_CARDS_BUFFER_SIZE EQU 20
|
||||
DEF NEW_MAIL EQU $ff
|
||||
|
||||
DEF B_MAIL_READ EQU 7
|
||||
DEF B_MAIL_PRIORITY_DELIVERY EQU 7
|
||||
|
||||
DEF B_MAIL_BOOSTER_PACK EQU 7
|
||||
DEF B_MAIL_GENERIC_CARD EQU 6
|
||||
DEF B_MAIL_BLACK_BOX EQU 5
|
||||
DEF B_MAIL_BILLS_PC EQU 4
|
||||
; mail attachments
|
||||
const_def 4
|
||||
const B_MAIL_BILLS_PC ; 4
|
||||
const B_MAIL_BLACK_BOX ; 5
|
||||
const B_MAIL_GENERIC_CARD ; 6
|
||||
const B_MAIL_BOOSTER_PACK ; 7
|
||||
|
||||
DEF MAIL_COMMAND_GIVE_BOOSTER EQU 1 << B_MAIL_BOOSTER_PACK
|
||||
DEF MAIL_COMMAND_GIVE_GENERIC_CARD EQU 1 << B_MAIL_GENERIC_CARD
|
||||
DEF MAIL_COMMAND_GIVE_BLACK_BOX EQU 1 << B_MAIL_BLACK_BOX
|
||||
DEF MAIL_COMMAND_GIVE_BILLS_PC EQU 1 << B_MAIL_BILLS_PC
|
||||
DEF MAIL_COMMAND_GIVE_BLACK_BOX EQU 1 << B_MAIL_BLACK_BOX
|
||||
DEF MAIL_COMMAND_GIVE_GENERIC_CARD EQU 1 << B_MAIL_GENERIC_CARD
|
||||
DEF MAIL_COMMAND_GIVE_BOOSTER EQU 1 << B_MAIL_BOOSTER_PACK
|
||||
DEF MAIL_TERMINATOR EQU $ffff
|
||||
|
||||
; TODO: Figure out why 2 is added in IngameCardPop
|
||||
@@ -359,7 +360,8 @@ DEF MAIL_TERMINATOR EQU $ffff
|
||||
const SCRIPTED_CARD_POP_IMAKUNI ; $1
|
||||
const SCRIPTED_RARE_CARD_POP_IMAKUNI ; $2
|
||||
|
||||
; duel requirement IDs. used in DuelRequirementFunctionMap, and duel_requirement_check script calls
|
||||
; duel requirement IDs
|
||||
; for DuelRequirementFunctionMap and duel_requirement_check script calls
|
||||
const_def
|
||||
const DUEL_REQUIREMENT_MIYUKI ; $00
|
||||
const DUEL_REQUIREMENT_RENNA ; $01
|
||||
|
||||
@@ -163,7 +163,6 @@
|
||||
|
||||
DEF NUM_SFX EQU const_value
|
||||
|
||||
; PlayConfirmOrCancelSFX args
|
||||
; PlaySFXConfirmOrCancel args
|
||||
DEF MENU_CANCEL EQU -1
|
||||
; doesn't have to be 1 but is often used as such in the code
|
||||
DEF MENU_CONFIRM EQU 1
|
||||
DEF MENU_CONFIRM EQU 1 ; != -1, but uses 1 most of the time
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
const_def
|
||||
const VAR_00 ; $00
|
||||
const VAR_01 ; $01
|
||||
const VAR_02 ; $02
|
||||
const VAR_03 ; $03
|
||||
const VAR_TIMES_MET_RONALD ; $04
|
||||
const VAR_05 ; $05
|
||||
const VAR_06 ; $06
|
||||
const VAR_07 ; $07
|
||||
const VAR_08 ; $08
|
||||
const VAR_09 ; $09
|
||||
const VAR_0A ; $0a
|
||||
const VAR_0B ; $0b
|
||||
const VAR_0C ; $0c
|
||||
const VAR_0D ; $0d
|
||||
const VAR_0E ; $0e
|
||||
const VAR_0F ; $0f
|
||||
const VAR_10 ; $10
|
||||
const VAR_11 ; $11
|
||||
const VAR_12 ; $12
|
||||
const VAR_13 ; $13
|
||||
const VAR_14 ; $14
|
||||
const VAR_15 ; $15
|
||||
const VAR_16 ; $16
|
||||
const VAR_17 ; $17
|
||||
const VAR_18 ; $18
|
||||
const VAR_19 ; $19
|
||||
const VAR_1A ; $1a
|
||||
const VAR_1B ; $1b
|
||||
const VAR_1C ; $1c
|
||||
const VAR_1D ; $1d
|
||||
const VAR_1E ; $1e
|
||||
const VAR_1F ; $1f
|
||||
const VAR_20 ; $20
|
||||
const VAR_21 ; $21
|
||||
const VAR_IMAKUNI_BLACK_WIN_COUNT ; $22
|
||||
const VAR_23 ; $23
|
||||
const VAR_24 ; $24
|
||||
const VAR_25 ; $25
|
||||
const VAR_26 ; $26
|
||||
const VAR_27 ; $27
|
||||
const VAR_28 ; $28
|
||||
const VAR_29 ; $29
|
||||
const VAR_2A ; $2a
|
||||
const VAR_2B ; $2b
|
||||
const VAR_2C ; $2c
|
||||
const VAR_2D ; $2d
|
||||
const VAR_2E ; $2e
|
||||
const VAR_2F ; $2f
|
||||
const VAR_30 ; $30
|
||||
const VAR_31 ; $31
|
||||
const VAR_32 ; $32
|
||||
const VAR_33 ; $33
|
||||
const VAR_34 ; $34
|
||||
const VAR_35 ; $35
|
||||
const VAR_36 ; $36
|
||||
const VAR_37 ; $37
|
||||
const VAR_38 ; $38
|
||||
const VAR_39 ; $39
|
||||
const VAR_3A ; $3a
|
||||
const VAR_3B ; $3b
|
||||
const VAR_NPC_DECK_ID ; $3c
|
||||
const VAR_DUEL_START_THEME ; $3d
|
||||
const VAR_3E ; $3e
|
||||
const VAR_00 ; $00
|
||||
const VAR_01 ; $01
|
||||
const VAR_02 ; $02
|
||||
const VAR_03 ; $03
|
||||
const VAR_TIMES_MET_RONALD ; $04
|
||||
const VAR_05 ; $05
|
||||
const VAR_06 ; $06
|
||||
const VAR_07 ; $07
|
||||
const VAR_08 ; $08
|
||||
const VAR_09 ; $09
|
||||
const VAR_0A ; $0a
|
||||
const VAR_0B ; $0b
|
||||
const VAR_0C ; $0c
|
||||
const VAR_0D ; $0d
|
||||
const VAR_0E ; $0e
|
||||
const VAR_0F ; $0f
|
||||
const VAR_GRANDMASTERCUP_PRIZE_INDEX_0 ; $10
|
||||
const VAR_GRANDMASTERCUP_PRIZE_INDEX_1 ; $11
|
||||
const VAR_GRANDMASTERCUP_PRIZE_INDEX_2 ; $12
|
||||
const VAR_GRANDMASTERCUP_PRIZE_INDEX_3 ; $13
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_0 ; $14
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_1 ; $15
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_2 ; $16
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_3 ; $17
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_4 ; $18
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_5 ; $19
|
||||
const VAR_GRANDMASTERCUP_OPPONENT_DECK_6 ; $1a
|
||||
const VAR_1B ; $1b
|
||||
const VAR_1C ; $1c
|
||||
const VAR_1D ; $1d
|
||||
const VAR_1E ; $1e
|
||||
const VAR_1F ; $1f
|
||||
const VAR_20 ; $20
|
||||
const VAR_21 ; $21
|
||||
const VAR_IMAKUNI_BLACK_WIN_COUNT ; $22
|
||||
const VAR_23 ; $23
|
||||
const VAR_24 ; $24
|
||||
const VAR_25 ; $25
|
||||
const VAR_26 ; $26
|
||||
const VAR_27 ; $27
|
||||
const VAR_28 ; $28
|
||||
const VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX ; $29
|
||||
const VAR_2A ; $2a
|
||||
const VAR_2B ; $2b
|
||||
const VAR_2C ; $2c
|
||||
const VAR_2D ; $2d
|
||||
const VAR_2E ; $2e
|
||||
const VAR_2F ; $2f
|
||||
const VAR_30 ; $30
|
||||
const VAR_GR_CHALLENGE_CUP_PRIZE_INDEX ; $31
|
||||
const VAR_32 ; $32
|
||||
const VAR_33 ; $33
|
||||
const VAR_34 ; $34
|
||||
const VAR_35 ; $35
|
||||
const VAR_36 ; $36
|
||||
const VAR_37 ; $37
|
||||
const VAR_38 ; $38
|
||||
const VAR_39 ; $39
|
||||
const VAR_3A ; $3a
|
||||
const VAR_3B ; $3b
|
||||
const VAR_NPC_DECK_ID ; $3c
|
||||
const VAR_DUEL_START_THEME ; $3d
|
||||
const VAR_3E ; $3e
|
||||
|
||||
1785
src/data/auto_deck_list.asm
Normal file
1785
src/data/auto_deck_list.asm
Normal file
File diff suppressed because it is too large
Load Diff
274
src/data/auto_deck_machine.asm
Normal file
274
src/data/auto_deck_machine.asm
Normal file
@@ -0,0 +1,274 @@
|
||||
; each Auto Deck Machine section has 4 deck entries
|
||||
; each entry consists of
|
||||
; its card list (see data/auto_deck_card_lists.asm) and
|
||||
; two text IDs for its name and description (flavor) text
|
||||
|
||||
MACRO auto_deck
|
||||
dw \1 ; deck list
|
||||
tx \2 ; deck name text ID
|
||||
tx \3 ; deck description text ID
|
||||
ENDM
|
||||
|
||||
AutoDeckMachine1Entries:
|
||||
; basic
|
||||
auto_deck MachineStarterDeckList, \
|
||||
MachineStarterDeckText, \
|
||||
MachineStarterDeckDescriptionText
|
||||
auto_deck MachineElectricFireDeckList, \
|
||||
MachineElectricFireDeckText, \
|
||||
MachineElectricFireDeckDescriptionText
|
||||
auto_deck MachineBattleWaterDeckList, \
|
||||
MachineBattleWaterDeckText, \
|
||||
MachineBattleWaterDeckDescriptionText
|
||||
auto_deck MachineEsperGreenDeckList, \
|
||||
MachineEsperGreenDeckText, \
|
||||
MachineEsperGreenDeckDescriptionText
|
||||
; gifts
|
||||
auto_deck MachineSweatAntiGR1DeckList, \
|
||||
MachineSweatAntiGR1DeckText, \
|
||||
MachineSweatAntiGR1DeckDescriptionText
|
||||
auto_deck MachineGiveInAntiGR2DeckList, \
|
||||
MachineGiveInAntiGR2DeckText, \
|
||||
MachineGiveInAntiGR2DeckDescriptionText
|
||||
auto_deck MachineVengefulAntiGR3DeckList, \
|
||||
MachineVengefulAntiGR3DeckText, \
|
||||
MachineVengefulAntiGR3DeckDescriptionText
|
||||
auto_deck MachineUnforgivingAntiGR4DeckList, \
|
||||
MachineUnforgivingAntiGR4DeckText, \
|
||||
MachineUnforgivingAntiGR4DeckDescriptionText
|
||||
; fighting
|
||||
auto_deck MachineAwesomeFossilsDeckList, \
|
||||
MachineAwesomeFossilsDeckText, \
|
||||
MachineAwesomeFossilsDeckDescriptionText
|
||||
auto_deck MachineNewMachokeDeckList, \
|
||||
MachineNewMachokeDeckText, \
|
||||
MachineNewMachokeDeckDescriptionText
|
||||
auto_deck MachineRockFestivalDeckList, \
|
||||
MachineRockFestivalDeckText, \
|
||||
MachineRockFestivalDeckDescriptionText
|
||||
auto_deck MachineJabHookDeckList, \
|
||||
MachineJabHookDeckText, \
|
||||
MachineJabHookDeckDescriptionText
|
||||
; grass
|
||||
auto_deck MachineSteadyIncreaseDeckList, \
|
||||
MachineSteadyIncreaseDeckText, \
|
||||
MachineSteadyIncreaseDeckDescriptionText
|
||||
auto_deck MachineGatheringNidoranDeckList, \
|
||||
MachineGatheringNidoranDeckText, \
|
||||
MachineGatheringNidoranDeckDescriptionText
|
||||
auto_deck MachineNationalParkDeckList, \
|
||||
MachineNationalParkDeckText, \
|
||||
MachineNationalParkDeckDescriptionText
|
||||
auto_deck MachineSelectiveBreedingDeckList, \
|
||||
MachineSelectiveBreedingDeckText, \
|
||||
MachineSelectiveBreedingDeckDescriptionText
|
||||
; water
|
||||
auto_deck MachineSplashingAboutDeckList, \
|
||||
MachineSplashingAboutDeckText, \
|
||||
MachineSplashingAboutDeckDescriptionText
|
||||
auto_deck MachineBeachDeckList, \
|
||||
MachineBeachDeckText, \
|
||||
MachineBeachDeckDescriptionText
|
||||
auto_deck MachineInsulationDeckList, \
|
||||
MachineInsulationDeckText, \
|
||||
MachineInsulationDeckDescriptionText
|
||||
auto_deck MachineAntarcticDeckList, \
|
||||
MachineAntarcticDeckText, \
|
||||
MachineAntarcticDeckDescriptionText
|
||||
; fire
|
||||
auto_deck MachineFlameFestivalDeckList, \
|
||||
MachineFlameFestivalDeckText, \
|
||||
MachineFlameFestivalDeckDescriptionText
|
||||
auto_deck MachineElectricCurrentShockDeckList, \
|
||||
MachineElectricCurrentShockDeckText, \
|
||||
MachineElectricCurrentShockDeckDescriptionText
|
||||
auto_deck MachineRiskyBlazeDeckList, \
|
||||
MachineRiskyBlazeDeckText, \
|
||||
MachineRiskyBlazeDeckDescriptionText
|
||||
auto_deck MachineRagingCharizardDeckList, \
|
||||
MachineRagingCharizardDeckText, \
|
||||
MachineRagingCharizardDeckDescriptionText
|
||||
; lightning
|
||||
auto_deck MachineZapdosPowerPlantDeckList, \
|
||||
MachineZapdosPowerPlantDeckText, \
|
||||
MachineZapdosPowerPlantDeckDescriptionText
|
||||
auto_deck MachineElectricShockDeckList, \
|
||||
MachineElectricShockDeckText, \
|
||||
MachineElectricShockDeckDescriptionText
|
||||
auto_deck MachineOverflowDeckList, \
|
||||
MachineOverflowDeckText, \
|
||||
MachineOverflowDeckDescriptionText
|
||||
auto_deck MachineTripleZapdosDeckList, \
|
||||
MachineTripleZapdosDeckText, \
|
||||
MachineTripleZapdosDeckDescriptionText
|
||||
; psychic
|
||||
auto_deck MachineSpecialBarrierDeckList, \
|
||||
MachineSpecialBarrierDeckText, \
|
||||
MachineSpecialBarrierDeckDescriptionText
|
||||
auto_deck MachineEvolutionProhibitedDeckList, \
|
||||
MachineEvolutionProhibitedDeckText, \
|
||||
MachineEvolutionProhibitedDeckDescriptionText
|
||||
auto_deck MachineGhostDeckList, \
|
||||
MachineGhostDeckText, \
|
||||
MachineGhostDeckDescriptionText
|
||||
auto_deck MachinePuppetMasterDeckList, \
|
||||
MachinePuppetMasterDeckText, \
|
||||
MachinePuppetMasterDeckDescriptionText
|
||||
; special
|
||||
auto_deck MachineMewLv15DeckList, \
|
||||
MachineMewLv15DeckText, \
|
||||
MachineMewLv15DeckDescriptionText
|
||||
auto_deck MachineVenusaurLv64DeckList, \
|
||||
MachineVenusaurLv64DeckText, \
|
||||
MachineVenusaurLv64DeckDescriptionText
|
||||
auto_deck MachineMutualDestructionDeckList, \
|
||||
MachineMutualDestructionDeckText, \
|
||||
MachineMutualDestructionDeckDescriptionText
|
||||
auto_deck MachineEverybodySurfDeckList, \
|
||||
MachineEverybodySurfDeckText, \
|
||||
MachineEverybodySurfDeckDescriptionText
|
||||
; legendary
|
||||
auto_deck MachineGrandFireDeckList, \
|
||||
MachineGrandFireDeckText, \
|
||||
MachineGrandFireDeckDescriptionText
|
||||
auto_deck MachineLegendaryFossilDeckList, \
|
||||
MachineLegendaryFossilDeckText, \
|
||||
MachineLegendaryFossilDeckDescriptionText
|
||||
auto_deck MachineWaterLegendDeckList, \
|
||||
MachineWaterLegendDeckText, \
|
||||
MachineWaterLegendDeckDescriptionText
|
||||
auto_deck MachineGreatDragonDeckList, \
|
||||
MachineGreatDragonDeckText, \
|
||||
MachineGreatDragonDeckDescriptionText
|
||||
|
||||
AutoDeckMachine2Entries:
|
||||
; dark grass
|
||||
auto_deck MachineInsectCollectionDeckList, \
|
||||
MachineInsectCollectionDeckText, \
|
||||
MachineInsectCollectionDeckDescriptionText
|
||||
auto_deck MachineCaveExplorationDeckList, \
|
||||
MachineCaveExplorationDeckText, \
|
||||
MachineCaveExplorationDeckDescriptionText
|
||||
auto_deck MachineOminousMeadowDeckList, \
|
||||
MachineOminousMeadowDeckText, \
|
||||
MachineOminousMeadowDeckDescriptionText
|
||||
auto_deck MachineAtrociousWeezingDeckList, \
|
||||
MachineAtrociousWeezingDeckText, \
|
||||
MachineAtrociousWeezingDeckDescriptionText
|
||||
; dark lightning
|
||||
auto_deck MachineTheBenchIsAlsoASurpriseDeckList, \
|
||||
MachineTheBenchIsAlsoASurpriseDeckText, \
|
||||
MachineTheBenchIsAlsoASurpriseDeckDescriptionText
|
||||
auto_deck MachineEnergyConservationDeckList, \
|
||||
MachineEnergyConservationDeckText, \
|
||||
MachineEnergyConservationDeckDescriptionText
|
||||
auto_deck MachineSonicboomDeckList, \
|
||||
MachineSonicboomDeckText, \
|
||||
MachineSonicboomDeckDescriptionText
|
||||
auto_deck MachineRageOfTheHeavensDeckList, \
|
||||
MachineRageOfTheHeavensDeckText, \
|
||||
MachineRageOfTheHeavensDeckDescriptionText
|
||||
; dark water
|
||||
auto_deck MachineDarkWaterDeckList, \
|
||||
MachineDarkWaterDeckText, \
|
||||
MachineDarkWaterDeckDescriptionText
|
||||
auto_deck MachineQuickFreezeDeckList, \
|
||||
MachineQuickFreezeDeckText, \
|
||||
MachineQuickFreezeDeckDescriptionText
|
||||
auto_deck MachineWhirlpoolShowerDeckList, \
|
||||
MachineWhirlpoolShowerDeckText, \
|
||||
MachineWhirlpoolShowerDeckDescriptionText
|
||||
auto_deck MachineWaterGangDeckList, \
|
||||
MachineWaterGangDeckText, \
|
||||
MachineWaterGangDeckDescriptionText
|
||||
; dark fire
|
||||
auto_deck MachineFireballDeckList, \
|
||||
MachineFireballDeckText, \
|
||||
MachineFireballDeckDescriptionText
|
||||
auto_deck MachineCompleteCombustionDeckList, \
|
||||
MachineCompleteCombustionDeckText, \
|
||||
MachineCompleteCombustionDeckDescriptionText
|
||||
auto_deck MachineOminousSpiritFlamesDeckList, \
|
||||
MachineOminousSpiritFlamesDeckText, \
|
||||
MachineOminousSpiritFlamesDeckDescriptionText
|
||||
auto_deck MachineEternalFireDeckList, \
|
||||
MachineEternalFireDeckText, \
|
||||
MachineEternalFireDeckDescriptionText
|
||||
; dark fighting
|
||||
auto_deck MachineBewareTheTrapDeckList, \
|
||||
MachineBewareTheTrapDeckText, \
|
||||
MachineBewareTheTrapDeckDescriptionText
|
||||
auto_deck MachineOgresKickDeckList, \
|
||||
MachineOgresKickDeckText, \
|
||||
MachineOgresKickDeckDescriptionText
|
||||
auto_deck MachineRockBlastDeckList, \
|
||||
MachineRockBlastDeckText, \
|
||||
MachineRockBlastDeckDescriptionText
|
||||
auto_deck MachineHeavyWorkDeckList, \
|
||||
MachineHeavyWorkDeckText, \
|
||||
MachineHeavyWorkDeckDescriptionText
|
||||
; dark psychic
|
||||
auto_deck MachineSlowbrosFishingDeckList, \
|
||||
MachineSlowbrosFishingDeckText, \
|
||||
MachineSlowbrosFishingDeckDescriptionText
|
||||
auto_deck MachineDirectHitDeckList, \
|
||||
MachineDirectHitDeckText, \
|
||||
MachineDirectHitDeckDescriptionText
|
||||
auto_deck MachineBadDreamDeckList, \
|
||||
MachineBadDreamDeckText, \
|
||||
MachineBadDreamDeckDescriptionText
|
||||
auto_deck MachineBenchPanicDeckList, \
|
||||
MachineBenchPanicDeckText, \
|
||||
MachineBenchPanicDeckDescriptionText
|
||||
; colorless
|
||||
auto_deck MachineSnorlaxGuardDeckList, \
|
||||
MachineSnorlaxGuardDeckText, \
|
||||
MachineSnorlaxGuardDeckDescriptionText
|
||||
auto_deck MachineEyeOfTheStormDeckList, \
|
||||
MachineEyeOfTheStormDeckText, \
|
||||
MachineEyeOfTheStormDeckDescriptionText
|
||||
auto_deck MachineSuddenGrowthDeckList, \
|
||||
MachineSuddenGrowthDeckText, \
|
||||
MachineSuddenGrowthDeckDescriptionText
|
||||
auto_deck MachineKingDragoniteDeckList, \
|
||||
MachineKingDragoniteDeckText, \
|
||||
MachineKingDragoniteDeckDescriptionText
|
||||
; dark special
|
||||
auto_deck MachineDarkCharizardDeckList, \
|
||||
MachineDarkCharizardDeckText, \
|
||||
MachineDarkCharizardDeckDescriptionText
|
||||
auto_deck MachineDarkBlastoiseDeckList, \
|
||||
MachineDarkBlastoiseDeckText, \
|
||||
MachineDarkBlastoiseDeckDescriptionText
|
||||
auto_deck MachineDarkVenusaurDeckList, \
|
||||
MachineDarkVenusaurDeckText, \
|
||||
MachineDarkVenusaurDeckDescriptionText
|
||||
auto_deck MachineDarkDragoniteDeckList, \
|
||||
MachineDarkDragoniteDeckText, \
|
||||
MachineDarkDragoniteDeckDescriptionText
|
||||
; rare
|
||||
auto_deck MachinePerfectHealthDeckList, \
|
||||
MachinePerfectHealthDeckText, \
|
||||
MachinePerfectHealthDeckDescriptionText
|
||||
auto_deck MachineSuperSoakerDeckList, \
|
||||
MachineSuperSoakerDeckText, \
|
||||
MachineSuperSoakerDeckDescriptionText
|
||||
auto_deck MachineHellsDemonDeckList, \
|
||||
MachineHellsDemonDeckText, \
|
||||
MachineHellsDemonDeckDescriptionText
|
||||
auto_deck MachinePremiumThunderDeckList, \
|
||||
MachinePremiumThunderDeckText, \
|
||||
MachinePremiumThunderDeckDescriptionText
|
||||
; mysterious
|
||||
auto_deck MachineMysteriousMewtwoDeckList, \
|
||||
MachineMysteriousMewtwoDeckText, \
|
||||
MachineMysteriousMewtwoDeckDescriptionText
|
||||
auto_deck MachineHeavenlyLugiaDeckList, \
|
||||
MachineHeavenlyLugiaDeckText, \
|
||||
MachineHeavenlyLugiaDeckDescriptionText
|
||||
auto_deck MachineBrutalTrainersDeckList, \
|
||||
MachineBrutalTrainersDeckText, \
|
||||
MachineBrutalTrainersDeckDescriptionText
|
||||
auto_deck MachineDreadfulParalysisDeckList, \
|
||||
MachineDreadfulParalysisDeckText, \
|
||||
MachineDreadfulParalysisDeckDescriptionText
|
||||
133
src/data/black_box_promos.asm
Normal file
133
src/data/black_box_promos.asm
Normal file
@@ -0,0 +1,133 @@
|
||||
MACRO blackbox_promo
|
||||
dw \1 ; recipe pointer
|
||||
db \2 ; whether locked to post-game (EVENT_MASONS_LAB_CHALLENGE_MACHINE_STATE)
|
||||
dw \3 ; output promo card id
|
||||
ENDM
|
||||
|
||||
MACRO blackbox_promo_recipe
|
||||
dw \# ; input card ids
|
||||
dw 0 ; end of list
|
||||
ENDM
|
||||
|
||||
BlackboxPromoCards:
|
||||
blackbox_promo .dugtrio_lv40, FALSE, DUGTRIO_LV40
|
||||
blackbox_promo .mankey_alt_lv7, TRUE, MANKEY_ALT_LV7
|
||||
blackbox_promo .diglett_lv16, TRUE, DIGLETT_LV16
|
||||
blackbox_promo .moltres_lv40, FALSE, MOLTRES_LV40
|
||||
blackbox_promo .arcanine_lv34, TRUE, ARCANINE_LV34
|
||||
; bug, CHARIZARD_LV76 should be CHARIZARD_ALT_LV76
|
||||
blackbox_promo .nonpromo_charizard_lv76, FALSE, CHARIZARD_LV76
|
||||
blackbox_promo .pikachu_lv13, TRUE, PIKACHU_LV13
|
||||
blackbox_promo .pikachu_lv16, FALSE, PIKACHU_LV16
|
||||
blackbox_promo .zapdos_lv68, FALSE, ZAPDOS_LV68
|
||||
blackbox_promo .pikachu_alt_lv16, FALSE, PIKACHU_ALT_LV16
|
||||
blackbox_promo .electabuzz_lv20, TRUE, ELECTABUZZ_LV20
|
||||
blackbox_promo .articuno_lv37, FALSE, ARTICUNO_LV37
|
||||
blackbox_promo .magikarp_lv10, TRUE, MAGIKARP_LV10
|
||||
blackbox_promo .blastoise_alt_lv52, FALSE, BLASTOISE_ALT_LV52
|
||||
blackbox_promo .venusaur_alt_lv67, FALSE, VENUSAUR_ALT_LV67
|
||||
blackbox_promo .grs_mewtwo, TRUE, GRS_MEWTWO
|
||||
blackbox_promo .mewtwo_alt_lv60, FALSE, MEWTWO_ALT_LV60
|
||||
blackbox_promo .mewtwo_lv60, FALSE, MEWTWO_LV60
|
||||
blackbox_promo .mewtwo_lv30, TRUE, MEWTWO_LV30
|
||||
blackbox_promo .slowpoke_lv9, TRUE, SLOWPOKE_LV9
|
||||
blackbox_promo .super_energy_retrieval, TRUE, SUPER_ENERGY_RETRIEVAL
|
||||
blackbox_promo .dark_persian_alt_lv28, TRUE, DARK_PERSIAN_ALT_LV28
|
||||
blackbox_promo .jigglypuff_lv12, FALSE, JIGGLYPUFF_LV12
|
||||
blackbox_promo .kangaskhan_lv38, FALSE, KANGASKHAN_LV38
|
||||
blackbox_promo .farfetchd_alt_lv20, TRUE, FARFETCHD_ALT_LV20
|
||||
blackbox_promo .dragonite_lv41, FALSE, DRAGONITE_LV41
|
||||
; bug, DRAGONITE_LV45 should be DRAGONITE_LV43
|
||||
blackbox_promo .nonpromo_dragonite_lv45, TRUE, DRAGONITE_LV45
|
||||
blackbox_promo .meowth_lv14, FALSE, MEOWTH_LV14
|
||||
blackbox_promo .hungry_snorlax, TRUE, HUNGRY_SNORLAX
|
||||
blackbox_promo .cool_porygon, TRUE, COOL_PORYGON
|
||||
dw 0 ; end
|
||||
|
||||
.dugtrio_lv40
|
||||
blackbox_promo_recipe DUGTRIO_LV36, HITMONLEE_LV30, HITMONCHAN_LV23
|
||||
.mankey_alt_lv7
|
||||
blackbox_promo_recipe HITMONLEE_LV30, HITMONCHAN_LV23
|
||||
.diglett_lv16
|
||||
blackbox_promo_recipe DUGTRIO_LV36, DARK_DUGTRIO
|
||||
.moltres_lv40
|
||||
blackbox_promo_recipe NINETALES_LV32, DARK_NINETALES, MOLTRES_LV35
|
||||
.arcanine_lv34
|
||||
blackbox_promo_recipe NINETALES_LV32, ARCANINE_LV45
|
||||
.nonpromo_charizard_lv76
|
||||
blackbox_promo_recipe DARK_CHARIZARD, DARK_NINETALES
|
||||
.pikachu_lv13
|
||||
blackbox_promo_recipe RAICHU_LV40, RAICHU_LV45, RAICHU_LV32, DARK_RAICHU
|
||||
.pikachu_lv16
|
||||
blackbox_promo_recipe RAICHU_LV40, RAICHU_LV45, RAICHU_LV32
|
||||
.zapdos_lv68
|
||||
blackbox_promo_recipe RAICHU_LV40, DARK_RAICHU, ZAPDOS_LV64
|
||||
.pikachu_alt_lv16
|
||||
blackbox_promo_recipe ELECTRODE_LV35, ELECTRODE_LV42, MAGNETON_LV28, MAGNETON_LV35
|
||||
.electabuzz_lv20
|
||||
blackbox_promo_recipe ELECTABUZZ_LV35, MAGNETON_LV30, MAGNETON_LV28, MAGNETON_LV35
|
||||
.articuno_lv37
|
||||
blackbox_promo_recipe POLIWRATH_LV40, KINGLER_LV33, ARTICUNO_LV35
|
||||
.magikarp_lv10
|
||||
blackbox_promo_recipe GYARADOS, DARK_GYARADOS
|
||||
.blastoise_alt_lv52
|
||||
blackbox_promo_recipe DARK_BLASTOISE, DARK_GYARADOS
|
||||
.venusaur_alt_lv67
|
||||
blackbox_promo_recipe DARK_VILEPLUME, DARK_VENUSAUR
|
||||
.grs_mewtwo
|
||||
blackbox_promo_recipe MEW_LV23, MEWTWO_LV53, MEWTWO_LV67
|
||||
.mewtwo_alt_lv60
|
||||
blackbox_promo_recipe MEW_LV23, MEWTWO_LV67
|
||||
.mewtwo_lv60
|
||||
blackbox_promo_recipe MEW_LV23, MEWTWO_LV53
|
||||
.mewtwo_lv30
|
||||
blackbox_promo_recipe MEWTWO_LV53, MEWTWO_LV67
|
||||
.slowpoke_lv9
|
||||
blackbox_promo_recipe ALAKAZAM_LV42, GENGAR_LV38, MR_MIME_LV28
|
||||
.super_energy_retrieval
|
||||
blackbox_promo_recipe POLIWRATH_LV40, DRAGONAIR
|
||||
.dark_persian_alt_lv28
|
||||
blackbox_promo_recipe CHANSEY_LV55, CLEFABLE, WIGGLYTUFF_LV36
|
||||
.jigglypuff_lv12
|
||||
blackbox_promo_recipe CHANSEY_LV55, CLEFAIRY_LV14
|
||||
.kangaskhan_lv38
|
||||
blackbox_promo_recipe KANGASKHAN_LV40, DRAGONAIR
|
||||
.farfetchd_alt_lv20
|
||||
blackbox_promo_recipe PIDGEOT_LV38, CLEFAIRY_LV14, DITTO
|
||||
.dragonite_lv41
|
||||
blackbox_promo_recipe DRAGONITE_LV45, DARK_DRAGONITE, DRAGONAIR
|
||||
; impossible, recipes mustn't require promos
|
||||
.nonpromo_dragonite_lv45
|
||||
blackbox_promo_recipe DRAGONITE_LV45, DARK_DRAGONITE, DRAGONITE_LV41
|
||||
.meowth_lv14
|
||||
blackbox_promo_recipe DITTO, SNORLAX_LV20
|
||||
.hungry_snorlax
|
||||
blackbox_promo_recipe SNORLAX_LV20, SNORLAX_LV35
|
||||
.cool_porygon
|
||||
blackbox_promo_recipe DITTO, CLEFABLE
|
||||
|
||||
; phantoms, ishihara tradings, and game center prizes (but a few exceptions)
|
||||
; used as special cases in black box, but actually redundant
|
||||
; could've been intended for non-recipe promos?
|
||||
SpecialPromoCards:
|
||||
dw VENUSAUR_LV64
|
||||
dw MARILL
|
||||
dw OMASTAR_LV36
|
||||
dw GOLEM_LV37
|
||||
dw MACHAMP_LV54
|
||||
dw ALAKAZAM_LV45
|
||||
dw GENGAR_LV40
|
||||
dw MEWTWO_LV30 ; not as special as the others
|
||||
dw MEW_LV15
|
||||
dw MEW_LV8
|
||||
dw SURFING_PIKACHU_LV13
|
||||
dw SURFING_PIKACHU_ALT_LV13
|
||||
dw FLYING_PIKACHU_LV12
|
||||
dw FLYING_PIKACHU_ALT_LV12
|
||||
dw DRAGONITE_LV43 ; not as special as the others
|
||||
dw TOGEPI
|
||||
dw LUGIA
|
||||
dw HERE_COMES_TEAM_ROCKET
|
||||
dw IMAKUNI_CARD
|
||||
dw COMPUTER_ERROR
|
||||
dw 0
|
||||
@@ -10,10 +10,10 @@ MACRO booster_list
|
||||
ENDM
|
||||
|
||||
BoosterList_cc9b:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_1
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_10_ENERGY
|
||||
|
||||
BoosterList_cc9e:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_1
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_10_ENERGY
|
||||
|
||||
BoosterList_cca1:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_BEGINNING_POKEMON
|
||||
@@ -22,7 +22,7 @@ BoosterList_cca4:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_LEGENDARY_POWER
|
||||
|
||||
BoosterList_cca7:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_2
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
|
||||
BoosterList_ccaa:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_ISLAND_OF_FOSSIL, BOOSTER_BEGINNING_POKEMON
|
||||
@@ -250,7 +250,7 @@ BoosterList_cdba:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_TEAM_ROCKETS_AMBITION, BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
|
||||
BoosterList_cdbe:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_2
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
|
||||
BoosterList_cdc1:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PSYCHIC_BATTLE, BOOSTER_ISLAND_OF_FOSSIL, BOOSTER_BEGINNING_POKEMON
|
||||
@@ -292,22 +292,22 @@ BoosterList_ce0d:
|
||||
booster_list BOOSTERS_GIVE_RANDOM, 4, BOOSTER_BEGINNING_POKEMON, BOOSTER_LEGENDARY_POWER, BOOSTER_ISLAND_OF_FOSSIL, BOOSTER_PSYCHIC_BATTLE, BOOSTER_SKY_FLYING_POKEMON, BOOSTER_WE_ARE_TEAM_ROCKET, BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
|
||||
BoosterList_ce17:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_3, BOOSTER_PRESENT_PACK_3, BOOSTER_PRESENT_PACK_3
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
|
||||
BoosterList_ce1c:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_4, BOOSTER_PRESENT_PACK_3, BOOSTER_PRESENT_PACK_3
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_LATTER_4_SETS, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
|
||||
BoosterList_ce21:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_5, BOOSTER_PRESENT_PACK_4, BOOSTER_PRESENT_PACK_3
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_ROCKET_SETS, BOOSTER_PRESENT_FROM_LATTER_4_SETS, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
|
||||
BoosterList_ce26:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_3
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
|
||||
BoosterList_ce29:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_4
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_LATTER_4_SETS
|
||||
|
||||
BoosterList_ce2c:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_5
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_ROCKET_SETS
|
||||
|
||||
BoosterList_ce2f:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_BEGINNING_POKEMON
|
||||
@@ -325,4 +325,4 @@ BoosterList_ce3b:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
|
||||
BoosterList_ce3e:
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_PACK_2
|
||||
booster_list BOOSTERS_GIVE_ALL, BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
|
||||
39
src/data/challenge_cup.asm
Normal file
39
src/data/challenge_cup.asm
Normal file
@@ -0,0 +1,39 @@
|
||||
; exclude Legendaries, GR Mewtwo, Phantoms, Bill's Computer and related ones
|
||||
|
||||
TCGChallengeCupPromoPrizes:
|
||||
dw ARCANINE_LV34
|
||||
dw PIKACHU_LV16
|
||||
dw PIKACHU_ALT_LV16
|
||||
dw SURFING_PIKACHU_LV13
|
||||
dw SURFING_PIKACHU_ALT_LV13
|
||||
dw ELECTABUZZ_LV20
|
||||
dw SLOWPOKE_LV9
|
||||
dw MEWTWO_ALT_LV60
|
||||
dw MEWTWO_LV60
|
||||
dw MEW_LV8
|
||||
dw JIGGLYPUFF_LV12
|
||||
dw FLYING_PIKACHU_LV12
|
||||
dw IMAKUNI_CARD
|
||||
dw SUPER_ENERGY_RETRIEVAL
|
||||
dw MEWTWO_LV30
|
||||
dw PIKACHU_LV13
|
||||
dw FLYING_PIKACHU_ALT_LV12
|
||||
|
||||
GRChallengeCupPromoPrizes:
|
||||
dw DARK_PERSIAN_ALT_LV28
|
||||
dw MEOWTH_LV14
|
||||
dw COMPUTER_ERROR
|
||||
dw COOL_PORYGON
|
||||
dw HUNGRY_SNORLAX
|
||||
dw VENUSAUR_ALT_LV67
|
||||
dw CHARIZARD_ALT_LV76
|
||||
dw BLASTOISE_ALT_LV52
|
||||
dw FARFETCHD_ALT_LV20
|
||||
dw KANGASKHAN_LV38
|
||||
dw DIGLETT_LV16
|
||||
dw DUGTRIO_LV40
|
||||
dw DRAGONITE_LV43
|
||||
dw MAGIKARP_LV10
|
||||
dw TOGEPI
|
||||
dw MARILL
|
||||
dw MANKEY_ALT_LV7
|
||||
52
src/data/grand_master_cup.asm
Normal file
52
src/data/grand_master_cup.asm
Normal file
@@ -0,0 +1,52 @@
|
||||
; deck id and bitmask for SetGrandMasterCupOpponents
|
||||
GrandMasterCupOpps:
|
||||
db EVEN3_YEARS_ON_A_ROCK_DECK_ID, %01111111 ; GRANDMASTERCUP_GENE
|
||||
db RAGING_BILLOW_OF_FISTS_DECK_ID, %01111111 ; GRANDMASTERCUP_MITCH
|
||||
db MAX_ENERGY_DECK_ID, %01111111 ; GRANDMASTERCUP_NIKKI
|
||||
db DARK_SCIENCE_DECK_ID, %01111111 ; GRANDMASTERCUP_RICK
|
||||
db RAIN_DANCE_CONFUSION_DECK_ID, %01111111 ; GRANDMASTERCUP_AMY
|
||||
db GO_ARCANINE_DECK_ID, %01111111 ; GRANDMASTERCUP_KEN
|
||||
db ELECTRIC_SELFDESTRUCT_DECK_ID, %01111111 ; GRANDMASTERCUP_ISAAC
|
||||
db PSYCHIC_ELITE_DECK_ID, %01111111 ; GRANDMASTERCUP_MURRAY
|
||||
db RONALDS_ULTRA_DECK_ID, %01000000 ; GRANDMASTERCUP_RONALD
|
||||
|
||||
; 37 promos
|
||||
; challenge cup prizes + legendaries - IMAKUNI_CARD
|
||||
GrandMasterCupPromoPrizes:
|
||||
dw ARCANINE_LV34
|
||||
dw PIKACHU_LV16
|
||||
dw PIKACHU_ALT_LV16
|
||||
dw SURFING_PIKACHU_LV13
|
||||
dw SURFING_PIKACHU_ALT_LV13
|
||||
dw ELECTABUZZ_LV20
|
||||
dw SLOWPOKE_LV9
|
||||
dw MEWTWO_ALT_LV60
|
||||
dw MEWTWO_LV60
|
||||
dw MEW_LV8
|
||||
dw JIGGLYPUFF_LV12
|
||||
dw FLYING_PIKACHU_LV12
|
||||
dw FLYING_PIKACHU_ALT_LV12
|
||||
dw DARK_PERSIAN_ALT_LV28
|
||||
dw MEOWTH_LV14
|
||||
dw COOL_PORYGON
|
||||
dw HUNGRY_SNORLAX
|
||||
dw VENUSAUR_ALT_LV67
|
||||
dw CHARIZARD_ALT_LV76
|
||||
dw BLASTOISE_ALT_LV52
|
||||
dw MEWTWO_LV30
|
||||
dw PIKACHU_LV13
|
||||
dw FARFETCHD_ALT_LV20
|
||||
dw KANGASKHAN_LV38
|
||||
dw DIGLETT_LV16
|
||||
dw DUGTRIO_LV40
|
||||
dw DRAGONITE_LV43
|
||||
dw MAGIKARP_LV10
|
||||
dw TOGEPI
|
||||
dw MARILL
|
||||
dw MANKEY_ALT_LV7
|
||||
dw COMPUTER_ERROR
|
||||
dw SUPER_ENERGY_RETRIEVAL
|
||||
dw MOLTRES_LV40
|
||||
dw ARTICUNO_LV37
|
||||
dw ZAPDOS_LV68
|
||||
dw DRAGONITE_LV41
|
||||
@@ -66,7 +66,7 @@ Mail:
|
||||
tx MailMailboxIntroSubjectText
|
||||
mail MailMailboxIntroBody1Text
|
||||
mail MailMailboxIntroBody2Text
|
||||
mail MailMailboxIntroBody3Text, BOOSTER_PRESENT_PACK_1, MAIL_COMMAND_GIVE_BOOSTER
|
||||
mail MailMailboxIntroBody3Text, BOOSTER_PRESENT_10_ENERGY, MAIL_COMMAND_GIVE_BOOSTER
|
||||
end_mail
|
||||
|
||||
.MailDeckDiagnosis1
|
||||
|
||||
@@ -616,13 +616,13 @@ Func_87d3:
|
||||
and PAD_A
|
||||
jr nz, .asm_8863
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
scf
|
||||
ret
|
||||
.asm_8863
|
||||
call .asm_88a3
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
scf
|
||||
ret
|
||||
.asm_886d
|
||||
@@ -814,13 +814,13 @@ HandleMultiDirectionalMenu:
|
||||
jr nz, .a_btn
|
||||
; b btn
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
scf
|
||||
ret
|
||||
.a_btn
|
||||
call .DrawCursor
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wd0c1]
|
||||
scf
|
||||
ret
|
||||
@@ -884,8 +884,8 @@ OpenPrizeCardPageIfFaceUp:
|
||||
or a
|
||||
ret z ; not face-up
|
||||
|
||||
ld a, SFX_CURSOR
|
||||
call PlayConfirmOrCancelSFX
|
||||
ld a, MENU_CONFIRM
|
||||
call PlaySFXConfirmOrCancel
|
||||
|
||||
ld a, [wd0c1]
|
||||
ld c, a
|
||||
@@ -1183,14 +1183,14 @@ HandleStartButtonInDeckSelectionMenu:
|
||||
call CheckIfCurDeckIsEmpty
|
||||
jp nc, .valid_deck ; can be jr
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
call PrintThereIsNoDeckHereText
|
||||
scf
|
||||
ret
|
||||
|
||||
.valid_deck
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
call GetSRAMPointerToCurDeckCards
|
||||
push hl
|
||||
call GetSRAMPointerToCurDeck
|
||||
@@ -1623,14 +1623,14 @@ HandleCheckMenuInput:
|
||||
and PAD_A
|
||||
jr nz, .a_press
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
scf
|
||||
ret
|
||||
|
||||
.a_press
|
||||
call DisplayCheckMenuCursor
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
scf
|
||||
ret
|
||||
.no_input
|
||||
@@ -1683,7 +1683,7 @@ DisplayCheckMenuCursor:
|
||||
|
||||
; if a = MENU_CANCEL (-1), play SFX_CANCEL (usually following B button)
|
||||
; else SFX_CONFIRM (usually following A button)
|
||||
PlayConfirmOrCancelSFX:
|
||||
PlaySFXConfirmOrCancel:
|
||||
push af
|
||||
inc a
|
||||
jr z, .cancel
|
||||
@@ -2052,7 +2052,9 @@ AppendDeckName:
|
||||
katakana "デ"
|
||||
katakana "ッ"
|
||||
katakana "キ"
|
||||
db "<SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE>"
|
||||
REPT 10
|
||||
db "<SPACE>"
|
||||
ENDR
|
||||
.text_end
|
||||
|
||||
; returns carry if the deck in hl
|
||||
@@ -2124,7 +2126,7 @@ HandleDeckBuildScreen:
|
||||
and PAD_START
|
||||
jr z, .no_start_btn_1
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
call ConfirmDeckConfiguration
|
||||
ld a, [wCurCardTypeFilter]
|
||||
ld [wTempCardTypeFilter], a
|
||||
@@ -2191,7 +2193,7 @@ HandleDeckBuildScreen:
|
||||
and PAD_START
|
||||
jr z, .no_start_btn_2
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
|
||||
; temporarily store current cursor position
|
||||
; to retrieve it later
|
||||
@@ -2212,7 +2214,7 @@ HandleDeckBuildScreen:
|
||||
ld a, $ff
|
||||
ld [hCurMenuItem], a
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
jr .asm_96f3
|
||||
|
||||
.asm_96a0
|
||||
@@ -2224,7 +2226,7 @@ HandleDeckBuildScreen:
|
||||
|
||||
.asm_96ac
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wNumMenuItems]
|
||||
ld [wTempScrollMenuNumVisibleItems], a
|
||||
ld a, [wTempCardTypeFilter]
|
||||
@@ -3482,26 +3484,9 @@ PrintDeckBuildingCardList:
|
||||
ret
|
||||
|
||||
Text_9e48:
|
||||
REPT 20
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
db "<SPACE>"
|
||||
ENDR
|
||||
done
|
||||
|
||||
; returns carry if card ID in de is $0000
|
||||
@@ -3630,7 +3615,7 @@ HandleCardSelectionInput:
|
||||
; b button
|
||||
ld a, -1
|
||||
ld [hCurMenuItem], a
|
||||
call PlayConfirmOrCancelSFX ; MENU_CANCEL
|
||||
call PlaySFXConfirmOrCancel ; MENU_CANCEL
|
||||
scf
|
||||
ret
|
||||
|
||||
@@ -3638,7 +3623,7 @@ HandleCardSelectionInput:
|
||||
ConfirmSelectionAndReturnCarry:
|
||||
call DrawHorizontalListCursor_Visible
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wCurScrollMenuItem]
|
||||
ld e, a
|
||||
ld a, [hCurMenuItem]
|
||||
@@ -3802,7 +3787,7 @@ HandleScrollListInput:
|
||||
.selected
|
||||
call DrawListCursor_Visible
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wCurScrollMenuItem]
|
||||
ld e, a
|
||||
ld a, [hCurMenuItem]
|
||||
@@ -3817,7 +3802,7 @@ HandleScrollListInput:
|
||||
jr nz, .selected
|
||||
ld a, -1
|
||||
ld [hCurMenuItem], a
|
||||
call PlayConfirmOrCancelSFX ; MENU_CANCEL
|
||||
call PlaySFXConfirmOrCancel ; MENU_CANCEL
|
||||
scf
|
||||
ret
|
||||
|
||||
@@ -4324,7 +4309,7 @@ HandleDeckConfirmationMenu:
|
||||
|
||||
.selected_card
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wCurScrollMenuItem]
|
||||
ld [wced7], a
|
||||
|
||||
@@ -4460,7 +4445,7 @@ ShowDeckInfoHeaderAndWaitForBButton:
|
||||
and PAD_B
|
||||
jr z, .wait_input
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ret
|
||||
|
||||
ShowConfirmationCardScreen:
|
||||
@@ -5034,7 +5019,7 @@ Func_a786:
|
||||
jr z, .asm_a80c
|
||||
.asm_a835
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wNumMenuItems]
|
||||
ld [wTempScrollMenuNumVisibleItems], a
|
||||
ld a, [wTempCardTypeFilter]
|
||||
@@ -6297,7 +6282,7 @@ CardAlbum:
|
||||
and PAD_B
|
||||
jr z, .loop_input_empty_list
|
||||
ld a, MENU_CANCEL
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wTempScrollMenuScrollOffset]
|
||||
ld [wScrollMenuScrollOffset], a
|
||||
ld a, [wTempScrollMenuItem]
|
||||
@@ -6334,7 +6319,7 @@ CardAlbum:
|
||||
jr z, .loop
|
||||
.open_card_page
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wNumMenuItems]
|
||||
ld [wTempScrollMenuNumVisibleItems], a
|
||||
ld a, [wCurScrollMenuItem]
|
||||
@@ -6761,7 +6746,7 @@ PrinterMenu_PokemonCards:
|
||||
jr z, .loop_frame_2
|
||||
; start btn
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wNumMenuItems]
|
||||
ld [wTempScrollMenuNumVisibleItems], a
|
||||
ld a, [wTempCardTypeFilter]
|
||||
@@ -7064,7 +7049,7 @@ Func_b5b1:
|
||||
jr z, .asm_b5ed
|
||||
.asm_b600
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wTempCardTypeFilter]
|
||||
ld [wced7], a
|
||||
ld de, wUniqueDeckCardList
|
||||
@@ -7321,7 +7306,7 @@ DeckDiagnosisResult:
|
||||
jr z, .loop_input
|
||||
.open_card_page
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX
|
||||
call PlaySFXConfirmOrCancel
|
||||
ld a, [wNumMenuItems]
|
||||
ld [wTempScrollMenuNumVisibleItems], a
|
||||
ld a, [wCurScrollMenuItem]
|
||||
@@ -7515,11 +7500,19 @@ Func_baec:
|
||||
farcall Func_3ada1
|
||||
ret
|
||||
|
||||
Func_baf1:
|
||||
farcall Func_2bc9f
|
||||
HandleAutoDeckMenu:
|
||||
farcall _HandleAutoDeckMenu
|
||||
ret
|
||||
|
||||
PrinterMenu_DeckConfiguration:
|
||||
farcall _PrinterMenu_DeckConfiguration
|
||||
ret
|
||||
; 0xbafb
|
||||
|
||||
AutoDeckMachineMenuParams:
|
||||
db 4, 2 ; cursor x, cursor y
|
||||
db 2 ; y separation
|
||||
db 0 ; x separation
|
||||
db NUM_DECK_MACHINE_VISIBLE_DECKS ; number of items
|
||||
db SYM_CURSOR_R ; cursor tile number
|
||||
db SYM_SPACE ; tile behind cursor
|
||||
dw NULL ; function pointer if non-0
|
||||
|
||||
@@ -144,11 +144,7 @@ StartMenu_CardPop:
|
||||
Func_c12e::
|
||||
sla a
|
||||
ld hl, .PointerTable
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -624,10 +620,10 @@ Func_c439:
|
||||
call SetVarValue
|
||||
ld a, VAR_2B
|
||||
call ZeroOutVarValue
|
||||
ld a, $11
|
||||
ld a, NUM_TCG_CHALLENGE_CUP_PRIZE_POOL
|
||||
call Random
|
||||
ld c, a
|
||||
ld a, VAR_29
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX
|
||||
call SetVarValue
|
||||
.skip
|
||||
ret
|
||||
@@ -657,10 +653,10 @@ Func_c477:
|
||||
call SetVarValue
|
||||
ld a, VAR_33
|
||||
call ZeroOutVarValue
|
||||
ld a, $11
|
||||
ld a, NUM_GR_CHALLENGE_CUP_PRIZE_POOL
|
||||
call Random
|
||||
ld c, a
|
||||
ld a, VAR_31
|
||||
ld a, VAR_GR_CHALLENGE_CUP_PRIZE_INDEX
|
||||
call SetVarValue
|
||||
.asm_c4b4
|
||||
ret
|
||||
@@ -701,7 +697,9 @@ LoadNPCDuelist:
|
||||
pop af
|
||||
ret
|
||||
|
||||
LoadNPCDuelistDeck:
|
||||
; for a = deck id,
|
||||
; return a = NPC_* constant corresponding to that deck
|
||||
GetNPCByDeck:
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
@@ -719,14 +717,11 @@ LoadNPCDuelistDeck:
|
||||
ld c, MAX_NPC_DUELIST_DECKS
|
||||
push hl
|
||||
ld a, NPC_DUELIST_STRUCT_DECKS
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .loop_decks
|
||||
inc h
|
||||
add_hl_a
|
||||
.loop_decks
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr z, .got_deck
|
||||
jr z, .get_npc_id
|
||||
dec c
|
||||
jr nz, .loop_decks
|
||||
pop hl
|
||||
@@ -734,7 +729,7 @@ LoadNPCDuelistDeck:
|
||||
.not_found
|
||||
debug_nop
|
||||
jr .done
|
||||
.got_deck
|
||||
.get_npc_id
|
||||
pop hl
|
||||
ld a, [hl]
|
||||
.done
|
||||
@@ -764,7 +759,8 @@ CountGRCoinPiecesObtained:
|
||||
pop bc
|
||||
ret
|
||||
|
||||
; return the location name in hl, using c == island and a == location
|
||||
; for c = island and a = location,
|
||||
; return the location name in hl
|
||||
GetLocationName:
|
||||
push af
|
||||
push bc
|
||||
@@ -777,11 +773,7 @@ GetLocationName:
|
||||
.got_island
|
||||
ld a, b
|
||||
sla a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_location
|
||||
inc h
|
||||
.got_location
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -801,7 +793,7 @@ GetCurrentLocationName:
|
||||
pop af
|
||||
ret
|
||||
|
||||
; using de == receiving card, return its long name in hl
|
||||
; for de = receiving card id, return its long name in hl
|
||||
; the first half of this function and the next two are identical
|
||||
GetReceivingCardLongName:
|
||||
push af
|
||||
@@ -813,28 +805,12 @@ GetReceivingCardLongName:
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, b
|
||||
cp $ff
|
||||
jr c, .ok
|
||||
jr nz, .ok ; redundant
|
||||
ld a, c
|
||||
cp $ff
|
||||
.ok
|
||||
cp16bc_long $ffff
|
||||
jr z, .not_found
|
||||
ld a, b
|
||||
cp d
|
||||
jr c, .next
|
||||
jr nz, .next
|
||||
ld a, c
|
||||
cp e
|
||||
.next
|
||||
cp16bc_long de
|
||||
jr z, .load_name
|
||||
ld a, CARD_RECEIVE_STRUCT_TEXTS_SIZE
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
jr .loop_cards
|
||||
.not_found
|
||||
call LoadCardDataToBuffer1_FromCardID
|
||||
@@ -859,7 +835,7 @@ GetReceivingCardLongName:
|
||||
pop af
|
||||
ret
|
||||
|
||||
; using de == receiving card, return its short name in hl
|
||||
; for de = receiving card id, return its short name in hl
|
||||
GetReceivingCardShortName:
|
||||
push af
|
||||
push bc
|
||||
@@ -870,28 +846,12 @@ GetReceivingCardShortName:
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, b
|
||||
cp $ff
|
||||
jr c, .ok
|
||||
jr nz, .ok ; redundant
|
||||
ld a, c
|
||||
cp $ff
|
||||
.ok
|
||||
cp16bc_long $ffff
|
||||
jr z, .not_found
|
||||
ld a, b
|
||||
cp d
|
||||
jr c, .next
|
||||
jr nz, .next
|
||||
ld a, c
|
||||
cp e
|
||||
.next
|
||||
cp16bc_long de
|
||||
jr z, .load_short_name
|
||||
ld a, CARD_RECEIVE_STRUCT_TEXTS_SIZE
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
jr .loop_cards
|
||||
.not_found
|
||||
call LoadCardDataToBuffer1_FromCardID
|
||||
@@ -918,7 +878,7 @@ GetReceivingCardShortName:
|
||||
pop af
|
||||
ret
|
||||
|
||||
; using de == receiving card, return its "received" text in hl
|
||||
; for de = receiving card id, return its "received" text in hl
|
||||
GetReceivedCardText:
|
||||
push af
|
||||
push bc
|
||||
@@ -929,28 +889,12 @@ GetReceivedCardText:
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, b
|
||||
cp $ff
|
||||
jr c, .ok
|
||||
jr nz, .ok ; redundant
|
||||
ld a, c
|
||||
cp $ff
|
||||
.ok
|
||||
cp16bc_long $ffff
|
||||
jr z, .not_found
|
||||
ld a, b
|
||||
cp d
|
||||
jr c, .next
|
||||
jr nz, .next
|
||||
ld a, c
|
||||
cp e
|
||||
.next
|
||||
cp16bc_long de
|
||||
jr z, .load_received_text
|
||||
ld a, CARD_RECEIVE_STRUCT_TEXTS_SIZE
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
jr .loop_cards
|
||||
.not_found
|
||||
push hl
|
||||
@@ -1161,43 +1105,7 @@ GRIslandLocationNamePointers:
|
||||
tx MapGRColorlessAltarText ; OWMAP_COLORLESS_ALTAR
|
||||
tx MapGRCastleText ; OWMAP_GR_CASTLE
|
||||
|
||||
; 34 promo cards
|
||||
; just excluding Legendaries, Phantoms, Bill's Computer and related ones, and GR Mewtwo
|
||||
NonSpecialPromoCards:
|
||||
dw ARCANINE_LV34
|
||||
dw PIKACHU_LV16
|
||||
dw PIKACHU_ALT_LV16
|
||||
dw SURFING_PIKACHU_LV13
|
||||
dw SURFING_PIKACHU_ALT_LV13
|
||||
dw ELECTABUZZ_LV20
|
||||
dw SLOWPOKE_LV9
|
||||
dw MEWTWO_ALT_LV60
|
||||
dw MEWTWO_LV60
|
||||
dw MEW_LV8
|
||||
dw JIGGLYPUFF_LV12
|
||||
dw FLYING_PIKACHU_LV12
|
||||
dw IMAKUNI_CARD
|
||||
dw SUPER_ENERGY_RETRIEVAL
|
||||
dw MEWTWO_LV30
|
||||
dw PIKACHU_LV13
|
||||
dw FLYING_PIKACHU_ALT_LV12
|
||||
dw DARK_PERSIAN_ALT_LV28
|
||||
dw MEOWTH_LV14
|
||||
dw COMPUTER_ERROR
|
||||
dw COOL_PORYGON
|
||||
dw HUNGRY_SNORLAX
|
||||
dw VENUSAUR_ALT_LV67
|
||||
dw CHARIZARD_ALT_LV76
|
||||
dw BLASTOISE_ALT_LV52
|
||||
dw FARFETCHD_ALT_LV20
|
||||
dw KANGASKHAN_LV38
|
||||
dw DIGLETT_LV16
|
||||
dw DUGTRIO_LV40
|
||||
dw DRAGONITE_LV43
|
||||
dw MAGIKARP_LV10
|
||||
dw TOGEPI
|
||||
dw MARILL
|
||||
dw MANKEY_ALT_LV7
|
||||
INCLUDE "data/challenge_cup.asm"
|
||||
; 0xd1ed
|
||||
|
||||
SECTION "Bank 3@5299", ROMX[$5299], BANK[$3]
|
||||
@@ -1366,11 +1274,7 @@ Func_d3e9::
|
||||
ld a, b
|
||||
rlca
|
||||
ld hl, .data
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
add d
|
||||
ld d, a
|
||||
@@ -2249,17 +2153,17 @@ GeneralVarMasks:
|
||||
db $06, %00011100 ; VAR_0D
|
||||
db $06, %11100000 ; VAR_0E
|
||||
db $07, %00001111 ; VAR_0F
|
||||
db $08, %11111111 ; VAR_10
|
||||
db $09, %11111111 ; VAR_11
|
||||
db $0a, %11111111 ; VAR_12
|
||||
db $0b, %11111111 ; VAR_13
|
||||
db $0c, %11111111 ; VAR_14
|
||||
db $0d, %11111111 ; VAR_15
|
||||
db $0e, %11111111 ; VAR_16
|
||||
db $0f, %11111111 ; VAR_17
|
||||
db $10, %11111111 ; VAR_18
|
||||
db $11, %11111111 ; VAR_19
|
||||
db $12, %11111111 ; VAR_1A
|
||||
db $08, %11111111 ; VAR_GRANDMASTERCUP_PRIZE_INDEX_0
|
||||
db $09, %11111111 ; VAR_GRANDMASTERCUP_PRIZE_INDEX_1
|
||||
db $0a, %11111111 ; VAR_GRANDMASTERCUP_PRIZE_INDEX_2
|
||||
db $0b, %11111111 ; VAR_GRANDMASTERCUP_PRIZE_INDEX_3
|
||||
db $0c, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_0
|
||||
db $0d, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_1
|
||||
db $0e, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_2
|
||||
db $0f, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_3
|
||||
db $10, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_4
|
||||
db $11, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_5
|
||||
db $12, %11111111 ; VAR_GRANDMASTERCUP_OPPONENT_DECK_6
|
||||
db $13, %11111111 ; VAR_1B
|
||||
db $14, %11111111 ; VAR_1C
|
||||
db $15, %11111111 ; VAR_1D
|
||||
@@ -2274,7 +2178,7 @@ GeneralVarMasks:
|
||||
db $1a, %11110000 ; VAR_26
|
||||
db $1b, %00001111 ; VAR_27
|
||||
db $1b, %01110000 ; VAR_28
|
||||
db $1c, %00011111 ; VAR_29
|
||||
db $1c, %00011111 ; VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX
|
||||
db $1d, %00001111 ; VAR_2A
|
||||
db $1d, %00110000 ; VAR_2B
|
||||
db $1d, %11000000 ; VAR_2C
|
||||
@@ -2282,7 +2186,7 @@ GeneralVarMasks:
|
||||
db $1f, %11111111 ; VAR_2E
|
||||
db $20, %11111111 ; VAR_2F
|
||||
db $21, %00000111 ; VAR_30
|
||||
db $21, %11111000 ; VAR_31
|
||||
db $21, %11111000 ; VAR_GR_CHALLENGE_CUP_PRIZE_INDEX
|
||||
db $22, %00001111 ; VAR_32
|
||||
db $22, %00110000 ; VAR_33
|
||||
db $23, %00000111 ; VAR_34
|
||||
@@ -2311,7 +2215,7 @@ ENDR
|
||||
pop af
|
||||
ret
|
||||
|
||||
; for the bit offset a = 8m + n, set bit n at (wd606 + m)
|
||||
; set n, [wd606 + m], where a = 8m + n
|
||||
SetBit_wd606:
|
||||
push af
|
||||
push bc
|
||||
@@ -2321,11 +2225,7 @@ SetBit_wd606:
|
||||
REPT 3
|
||||
srl a
|
||||
ENDR
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_byte
|
||||
inc h
|
||||
.got_byte
|
||||
add_hl_a
|
||||
pop af
|
||||
and 7
|
||||
inc a
|
||||
@@ -2333,10 +2233,10 @@ ENDR
|
||||
ld b, 1
|
||||
.loop_bitmask
|
||||
dec c
|
||||
jr z, .got_bit
|
||||
jr z, .got_bitmask
|
||||
sla b
|
||||
jr .loop_bitmask
|
||||
.got_bit
|
||||
.got_bitmask
|
||||
ld a, [hl]
|
||||
or b
|
||||
ld [hl], a
|
||||
@@ -2345,7 +2245,7 @@ ENDR
|
||||
pop af
|
||||
ret
|
||||
|
||||
; for the bit offset a = 8m + n, clear bit n at (wd606 + m)
|
||||
; res n, [wd606 + m], where a = 8m + n
|
||||
ClearBit_wd606:
|
||||
push af
|
||||
push bc
|
||||
@@ -2355,11 +2255,7 @@ ClearBit_wd606:
|
||||
REPT 3
|
||||
srl a
|
||||
ENDR
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_byte
|
||||
inc h
|
||||
.got_byte
|
||||
add_hl_a
|
||||
pop af
|
||||
and 7
|
||||
inc a
|
||||
@@ -2367,10 +2263,10 @@ ENDR
|
||||
ld b, 1
|
||||
.loop_bitmask
|
||||
dec c
|
||||
jr z, .got_bit
|
||||
jr z, .got_bitmask
|
||||
sla b
|
||||
jr .loop_bitmask
|
||||
.got_bit
|
||||
.got_bitmask
|
||||
ld a, b
|
||||
cpl
|
||||
and [hl]
|
||||
@@ -2380,9 +2276,7 @@ ENDR
|
||||
pop af
|
||||
ret
|
||||
|
||||
; for the bit offset a = 8m + n, return in the z flag whether bit n at (wd606 + m) is empty
|
||||
; z: empty, nz: set
|
||||
; then restore bc and load b from it into a
|
||||
; bit n, [wd606 + m], where a = 8m + n
|
||||
CheckBit_wd606:
|
||||
push bc
|
||||
push hl
|
||||
@@ -2392,11 +2286,7 @@ CheckBit_wd606:
|
||||
REPT 3
|
||||
srl a
|
||||
ENDR
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_byte
|
||||
inc h
|
||||
.got_byte
|
||||
add_hl_a
|
||||
pop af
|
||||
and 7
|
||||
inc a
|
||||
@@ -2404,10 +2294,10 @@ ENDR
|
||||
ld b, 1
|
||||
.loop_bitmask
|
||||
dec c
|
||||
jr z, .got_bit
|
||||
jr z, .got_bitmask
|
||||
sla b
|
||||
jr .loop_bitmask
|
||||
.got_bit
|
||||
.got_bitmask
|
||||
ld a, [hl]
|
||||
and b
|
||||
pop bc
|
||||
@@ -2423,11 +2313,7 @@ CheckTCGIslandMilestoneEvents:
|
||||
push hl
|
||||
sla a
|
||||
ld hl, .check_pointers
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -2570,11 +2456,7 @@ CheckGRIslandMilestoneEvents:
|
||||
push hl
|
||||
sla a
|
||||
ld hl, .check_pointers
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -2711,25 +2593,13 @@ RunOverworldScript::
|
||||
ld hl, wScriptBufferIndex
|
||||
ld a, [hl]
|
||||
ld hl, wScriptBuffer
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_offset
|
||||
inc h
|
||||
.got_offset
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
ld hl, OverworldScriptTable
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .next
|
||||
inc h
|
||||
.next
|
||||
add_hl_a
|
||||
ld a, d
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -2869,11 +2739,7 @@ OverworldScriptTable:
|
||||
IncreaseScriptPointer:
|
||||
ld c, a
|
||||
ld hl, wScriptPointer
|
||||
add [hl]
|
||||
ld [hli], a
|
||||
jr nc, .next
|
||||
inc [hl]
|
||||
.next
|
||||
add_at_hl_a
|
||||
ld a, c
|
||||
ld hl, wScriptBufferIndex
|
||||
add [hl]
|
||||
@@ -2923,11 +2789,7 @@ Get2ScriptArgs:
|
||||
pop bc
|
||||
dec a
|
||||
ld hl, wScriptBuffer
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld b, [hl]
|
||||
ld c, a
|
||||
@@ -2963,11 +2825,7 @@ Get1ScriptArg:
|
||||
jr nc, .fallback
|
||||
pop bc
|
||||
ld hl, wScriptBuffer
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
or a
|
||||
ret
|
||||
@@ -4005,11 +3863,7 @@ ScriptCommand_PushVar:
|
||||
ld a, [wScriptStackOffset]
|
||||
dec a
|
||||
ld [wScriptStackOffset], a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [wScriptLoadedVar]
|
||||
ld [hl], a
|
||||
jp IncreaseScriptPointerBy1
|
||||
@@ -4018,11 +3872,7 @@ ScriptCommand_PopVar:
|
||||
ld hl, wScriptStack
|
||||
ld a, [wScriptStackOffset]
|
||||
push af
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
ld [wScriptLoadedVar], a
|
||||
pop af
|
||||
@@ -4068,11 +3918,7 @@ ScriptCommand_ScriptCall:
|
||||
dec a
|
||||
dec a
|
||||
ld [wScriptStackOffset], a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [wScriptPointer]
|
||||
ld [hli], a
|
||||
ld a, [wScriptPointer + 1]
|
||||
@@ -4091,11 +3937,7 @@ ScriptCommand_ScriptRet:
|
||||
inc a
|
||||
inc a
|
||||
ld [wScriptStackOffset], a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
dec hl
|
||||
ld a, [hld]
|
||||
ld [wScriptPointer + 1], a
|
||||
@@ -4194,11 +4036,7 @@ ScriptCommand_GiveBoosterPacks:
|
||||
ld a, [wBoosterPackCount]
|
||||
call Random
|
||||
ld hl, wBoosterPackList
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
ld [de], a
|
||||
inc de
|
||||
@@ -4296,11 +4134,7 @@ ScriptCommand_ScriptCallfar:
|
||||
dec a
|
||||
dec a
|
||||
ld [wScriptStackOffset], a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [wScriptPointer]
|
||||
ld [hli], a
|
||||
ld a, [wScriptPointer + 1]
|
||||
@@ -4324,11 +4158,7 @@ ScriptCommand_ScriptRetfar:
|
||||
inc a
|
||||
inc a
|
||||
ld [wScriptStackOffset], a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
dec hl
|
||||
ld a, [hld]
|
||||
ld [wScriptBank], a
|
||||
@@ -4543,14 +4373,7 @@ ScriptCommand_CompareLoadedVarWord:
|
||||
ld hl, wScriptFlags
|
||||
res 0, [hl]
|
||||
res 1, [hl]
|
||||
ld a, d
|
||||
cp b
|
||||
jr c, .high_byte_not_equal
|
||||
jr nz, .high_byte_not_equal
|
||||
; high byte equal
|
||||
ld a, e
|
||||
cp c
|
||||
.high_byte_not_equal
|
||||
cp16_long bc
|
||||
jr nz, .not_equal
|
||||
set 0, [hl]
|
||||
.not_equal
|
||||
@@ -5132,25 +4955,13 @@ Func_ebc6:
|
||||
ld e, a
|
||||
ld a, [wde15 + 1]
|
||||
ld d, a
|
||||
ld a, d
|
||||
cp $00
|
||||
jr c, .asm_ec1d
|
||||
jr nz, .asm_ec1d
|
||||
ld a, e
|
||||
cp $00
|
||||
.asm_ec1d
|
||||
cp16_long 0
|
||||
jr z, .asm_ec36
|
||||
ld a, [wde15 + 2]
|
||||
ld e, a
|
||||
ld a, [wde15 + 3]
|
||||
ld d, a
|
||||
ld a, d
|
||||
cp $00
|
||||
jr c, .asm_ec31
|
||||
jr nz, .asm_ec31
|
||||
ld a, e
|
||||
cp $00
|
||||
.asm_ec31
|
||||
cp16_long 0
|
||||
jr z, .asm_ec36
|
||||
scf
|
||||
ccf
|
||||
@@ -5475,7 +5286,7 @@ Func_ef40:
|
||||
ret
|
||||
|
||||
Func_ef97:
|
||||
.asm_ef97
|
||||
.loop
|
||||
ld a, [wFilteredListPtr]
|
||||
ld l, a
|
||||
ld a, [wFilteredListPtr+1]
|
||||
@@ -5483,21 +5294,17 @@ Func_ef97:
|
||||
ld a, [wRemainingIntroCards]
|
||||
call Random
|
||||
sla a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .asm_efac
|
||||
inc h
|
||||
.asm_efac
|
||||
add_hl_a
|
||||
inc hl
|
||||
ld a, [hld]
|
||||
and b
|
||||
jr z, .asm_ef97
|
||||
jr z, .loop
|
||||
ld a, [hl]
|
||||
ret
|
||||
|
||||
Func_efb3:
|
||||
ld d, a
|
||||
call LoadNPCDuelistDeck
|
||||
call GetNPCByDeck
|
||||
ld l, a
|
||||
ld e, VAR_35
|
||||
.asm_efba
|
||||
@@ -5505,7 +5312,7 @@ Func_efb3:
|
||||
call GetVarValue
|
||||
cp $ff
|
||||
jr z, .asm_efcc
|
||||
call LoadNPCDuelistDeck
|
||||
call GetNPCByDeck
|
||||
inc e
|
||||
cp l
|
||||
jr nz, .asm_efba
|
||||
@@ -5525,7 +5332,7 @@ Func_efd0:
|
||||
.asm_efd7
|
||||
push af
|
||||
call GetVarValue
|
||||
call LoadNPCDuelistDeck
|
||||
call GetNPCByDeck
|
||||
call LoadNPCDuelist
|
||||
ld de, wCurrentNPCDuelistData + NPC_DUELIST_STRUCT_TITLE_NAME
|
||||
ld a, [de]
|
||||
@@ -5559,18 +5366,16 @@ Func_eff7:
|
||||
set 1, [hl]
|
||||
ret
|
||||
|
||||
Func_f010:
|
||||
; return bc = prize card id
|
||||
; at TCGChallengeCupPromoPrizes[VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX]
|
||||
GetTCGChallengeCupPrizeCardID:
|
||||
push af
|
||||
push hl
|
||||
ld a, VAR_29
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX
|
||||
call GetVarValue
|
||||
sla a
|
||||
ld hl, NonSpecialPromoCards
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .asm_f021
|
||||
inc h
|
||||
.asm_f021
|
||||
ld hl, TCGChallengeCupPromoPrizes
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld b, [hl]
|
||||
ld c, a
|
||||
@@ -5578,11 +5383,13 @@ Func_f010:
|
||||
pop af
|
||||
ret
|
||||
|
||||
Func_f027:
|
||||
; return hl = prize card name
|
||||
; at TCGChallengeCupPromoPrizes[VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX]
|
||||
GetTCGChallengeCupPrizeCardName:
|
||||
push af
|
||||
push bc
|
||||
push de
|
||||
call Func_f010
|
||||
call GetTCGChallengeCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
call GetReceivingCardShortName
|
||||
@@ -5591,18 +5398,16 @@ Func_f027:
|
||||
pop af
|
||||
ret
|
||||
|
||||
Func_f036:
|
||||
; return bc = prize card id
|
||||
; at GRChallengeCupPromoPrizes[VAR_GR_CHALLENGE_CUP_PRIZE_INDEX]
|
||||
GetGRChallengeCupPrizeCardID:
|
||||
push af
|
||||
push hl
|
||||
ld a, VAR_31
|
||||
ld a, VAR_GR_CHALLENGE_CUP_PRIZE_INDEX
|
||||
call GetVarValue
|
||||
sla a
|
||||
ld hl, $51cb
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .asm_f047
|
||||
inc h
|
||||
.asm_f047
|
||||
ld hl, GRChallengeCupPromoPrizes
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld b, [hl]
|
||||
ld c, a
|
||||
@@ -5610,11 +5415,13 @@ Func_f036:
|
||||
pop af
|
||||
ret
|
||||
|
||||
Func_f04d:
|
||||
; return hl = prize card name
|
||||
; at GRChallengeCupPromoPrizes[VAR_GR_CHALLENGE_CUP_PRIZE_INDEX]
|
||||
GetGRChallengeCupPrizeCardName:
|
||||
push af
|
||||
push bc
|
||||
push de
|
||||
call Func_f036
|
||||
call GetGRChallengeCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
call GetReceivingCardLongName
|
||||
|
||||
@@ -88,14 +88,14 @@ HandleStartupDebugMenuOption:
|
||||
call CallMappedFunction
|
||||
ret
|
||||
|
||||
.FunctionMap: ; boot up debug menu options
|
||||
key_func $00, _CoreGameLoop ; power on
|
||||
key_func $01, SetAllCoinsObtainedAndShowCoinMenu ; coins
|
||||
key_func $02, DebugShowConfigMenu ; config
|
||||
key_func $03, DebugMenuEffectViewer ; effect viewer
|
||||
key_func $04, _PlayCredits ; staff roll
|
||||
key_func $05, StartDebugDuelVsRandomOpponent ; duel
|
||||
key_func $06, DebugSlotMachine ; slot machine
|
||||
.FunctionMap
|
||||
key_func DEBUGMENU_POWER_ON, _CoreGameLoop
|
||||
key_func DEBUGMENU_COIN, SetAllCoinsObtainedAndShowCoinMenu
|
||||
key_func DEBUGMENU_CONFIG, DebugShowConfigMenu
|
||||
key_func DEBUGMENU_EFFECT_VIEWER, DebugMenuEffectViewer
|
||||
key_func DEBUGMENU_CREDITS, _PlayCredits
|
||||
key_func DEBUGMENU_DUEL, StartDebugDuelVsRandomOpponent
|
||||
key_func DEBUGMENU_SLOT, DebugSlotMachine
|
||||
db $ff
|
||||
|
||||
SetAllCoinsObtainedAndShowCoinMenu:
|
||||
@@ -1268,12 +1268,12 @@ Func_10836:
|
||||
ret
|
||||
|
||||
.function_map: ; pause menu
|
||||
key_func $00, PauseMenuStatusScreen
|
||||
key_func $01, PauseMenuDiaryScreen
|
||||
key_func $02, PauseMenuDeckScreen
|
||||
key_func $03, PauseMenuMinicomScreen
|
||||
key_func $04, PauseMenuCoinScreen
|
||||
key_func $05, PauseMenuConfigScreen
|
||||
key_func PAUSEMENU_STATUS, PauseMenuStatusScreen
|
||||
key_func PAUSEMENU_DIARY, PauseMenuDiaryScreen
|
||||
key_func PAUSEMENU_DECK, PauseMenuDeckScreen
|
||||
key_func PAUSEMENU_MINICOM, PauseMenuMinicomScreen
|
||||
key_func PAUSEMENU_COIN, PauseMenuCoinScreen
|
||||
key_func PAUSEMENU_CONFIG, PauseMenuConfigScreen
|
||||
db $ff
|
||||
|
||||
Func_10856:
|
||||
@@ -3098,10 +3098,10 @@ _PCMenu:
|
||||
ret
|
||||
|
||||
.function_map
|
||||
key_func $0, .CardAlbum
|
||||
key_func $1, .DeckDiagnosis
|
||||
key_func $2, .Glossary
|
||||
key_func $3, .Printer
|
||||
key_func PCMENU_CARD_ALBUM, .CardAlbum
|
||||
key_func PCMENU_DECK_DIAGNOSIS, .DeckDiagnosis
|
||||
key_func PCMENU_GLOSSARY, .Glossary
|
||||
key_func PCMENU_PRINTER, .Printer
|
||||
db $ff ; end
|
||||
|
||||
.Func_11181:
|
||||
@@ -7338,17 +7338,17 @@ ShowProloguePortraitAndText:
|
||||
ret
|
||||
|
||||
.FunctionMap:
|
||||
key_func $00, .Func_13bd8
|
||||
key_func $01, .Func_13bdf
|
||||
key_func $02, .Func_13bd8
|
||||
key_func PROLOGUE_PLAYER_RECAP, .Player
|
||||
key_func PROLOGUE_GR_INVASION, .GR
|
||||
key_func PROLOGUE_PLAYER_TO_LAB, .Player
|
||||
db $ff ; end
|
||||
|
||||
.Func_13bd8:
|
||||
.Player:
|
||||
lb bc, 7, 3
|
||||
call DrawPlayerPortrait
|
||||
ret
|
||||
|
||||
.Func_13bdf:
|
||||
.GR:
|
||||
ld a, GR_1_PIC
|
||||
lb bc, 7, 3
|
||||
ld e, EMOTION_NORMAL
|
||||
@@ -7369,30 +7369,30 @@ ShowProloguePortraitAndText:
|
||||
ret
|
||||
|
||||
.TextListPointers:
|
||||
dw .text_list1
|
||||
dw .text_list2
|
||||
dw .text_list3
|
||||
dw .PlayerRecap
|
||||
dw .GRInvasion
|
||||
dw .PlayerToLab
|
||||
|
||||
.text_list1
|
||||
tx PrologueScene1Line1Text
|
||||
tx PrologueScene1Line2Text
|
||||
tx PrologueScene1Line3Text
|
||||
tx PrologueScene1Line4Text
|
||||
tx PrologueScene1Line5Text
|
||||
tx PrologueScene1Line6Text
|
||||
tx PrologueScene1Line7Text
|
||||
.PlayerRecap
|
||||
tx ProloguePlayerRecapLine1Text
|
||||
tx ProloguePlayerRecapLine2Text
|
||||
tx ProloguePlayerRecapLine3Text
|
||||
tx ProloguePlayerRecapLine4Text
|
||||
tx ProloguePlayerRecapLine5Text
|
||||
tx ProloguePlayerRecapLine6Text
|
||||
tx ProloguePlayerRecapLine7Text
|
||||
dw $ffff
|
||||
|
||||
.text_list2
|
||||
tx PrologueScene2Line1Text
|
||||
tx PrologueScene2Line2Text
|
||||
tx PrologueScene2Line3Text
|
||||
.GRInvasion
|
||||
tx PrologueGRInvasionLine1Text
|
||||
tx PrologueGRInvasionLine2Text
|
||||
tx PrologueGRInvasionLine3Text
|
||||
dw $ffff
|
||||
|
||||
.text_list3
|
||||
tx PrologueScene3Line1Text
|
||||
tx PrologueScene3Line2Text
|
||||
tx PrologueScene3Line3Text
|
||||
.PlayerToLab
|
||||
tx ProloguePlayerToLabLine1Text
|
||||
tx ProloguePlayerToLabLine2Text
|
||||
tx ProloguePlayerToLabLine3Text
|
||||
dw $ffff
|
||||
; 0x13c22
|
||||
|
||||
|
||||
@@ -6094,10 +6094,10 @@ Deck5RenameText:
|
||||
textitem 14, 1, DeckText
|
||||
db $ff
|
||||
|
||||
; dupe of PlayConfirmOrCancelSFX in bank 2
|
||||
; dupe of PlaySFXConfirmOrCancel in bank 2
|
||||
; if a = MENU_CANCEL (-1), play SFX_CANCEL (usually following B button)
|
||||
; else SFX_CONFIRM (usually following A button)
|
||||
PlayConfirmOrCancelSFX_Bank06:
|
||||
PlaySFXConfirmOrCancel_Bank06:
|
||||
push af
|
||||
inc a
|
||||
jr z, .cancel
|
||||
@@ -6167,7 +6167,7 @@ InputName:
|
||||
and PAD_START
|
||||
jr z, .check_select
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX_Bank06
|
||||
call PlaySFXConfirmOrCancel_Bank06
|
||||
call HideCursorAtCharPosition
|
||||
ld a, 6
|
||||
ld [wNamingScreenCursorY], a
|
||||
@@ -6181,7 +6181,7 @@ InputName:
|
||||
and PAD_SELECT
|
||||
jr z, .asm_1af3b
|
||||
ld a, MENU_CONFIRM
|
||||
call PlayConfirmOrCancelSFX_Bank06
|
||||
call PlaySFXConfirmOrCancel_Bank06
|
||||
ld a, [wNamingScreenMode]
|
||||
inc a
|
||||
cp NUM_NAME_MODES
|
||||
@@ -6579,7 +6579,7 @@ HandleNamingScreenInput:
|
||||
jr nz, .got_sfx ; MENU_CONFIRM
|
||||
ld a, MENU_CANCEL
|
||||
.got_sfx
|
||||
call PlayConfirmOrCancelSFX_Bank06
|
||||
call PlaySFXConfirmOrCancel_Bank06
|
||||
push af
|
||||
call ShowCursorAtCharPosition
|
||||
pop af
|
||||
|
||||
@@ -5654,9 +5654,9 @@ CallMinicomMenuFunction:
|
||||
ret
|
||||
|
||||
.minicom_functions:
|
||||
key_func $00, MinicomDeckSaveMachine
|
||||
key_func $01, MinicomMailbox
|
||||
key_func $02, MinicomCardAlbum
|
||||
key_func MINICOMMENU_DECK_SAVE_MACHINE, MinicomDeckSaveMachine
|
||||
key_func MINICOMMENU_MAILBOX, MinicomMailbox
|
||||
key_func MINICOMMENU_CARD_ALBUM, MinicomCardAlbum
|
||||
db $ff
|
||||
|
||||
MinicomDeckSaveMachine:
|
||||
@@ -5678,7 +5678,7 @@ Func_1e849:
|
||||
Func_1e855:
|
||||
farcall Func_1022a
|
||||
farcall ClearSpriteAnimsAndSetInitialGraphicsConfiguration
|
||||
farcall Func_baf1
|
||||
farcall HandleAutoDeckMenu
|
||||
farcall Func_10252
|
||||
ret
|
||||
|
||||
@@ -5790,13 +5790,13 @@ _GiveBoosterPack:
|
||||
tx BoosterPack5Text, BoosterPackFlyingPokemonText ; BOOSTER_SKY_FLYING_POKEMON
|
||||
tx BoosterPack6Text, BoosterPackWeAreTeamRocketText ; BOOSTER_WE_ARE_TEAM_ROCKET
|
||||
tx BoosterPack7Text, BoosterPackTeamRocketsAmbitionText ; BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
tx SingleSpaceText, DebugUnregisteredText ; BOOSTER_DEBUG_1
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_PACK_1
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_PACK_2
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_PACK_3
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_PACK_4
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_PACK_5
|
||||
tx SingleSpaceText, DebugUnregisteredText ; BOOSTER_DEBUG_2
|
||||
tx SingleSpaceText, DebugUnregisteredText ; BOOSTER_DEBUG_10_STAR
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_10_ENERGY
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_FROM_LATTER_4_SETS
|
||||
tx SingleSpaceText, PresentPackText ; BOOSTER_PRESENT_FROM_ROCKET_SETS
|
||||
tx SingleSpaceText, DebugUnregisteredText ; BOOSTER_DEBUG_2_STAR
|
||||
|
||||
.DrawScreen:
|
||||
ld a, [wCurBoosterPack]
|
||||
@@ -5820,13 +5820,13 @@ _GiveBoosterPack:
|
||||
db SKY_FLYING_POKEMON ; BOOSTER_SKY_FLYING_POKEMON
|
||||
db WE_ARE_TEAM_ROCKET ; BOOSTER_WE_ARE_TEAM_ROCKET
|
||||
db TEAM_ROCKETS_AMBITION ; BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
db BEGINNING_POKEMON ; BOOSTER_DEBUG_1
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_PACK_1
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_PACK_2
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_PACK_3
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_PACK_4
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_PACK_5
|
||||
db BEGINNING_POKEMON ; BOOSTER_DEBUG_2
|
||||
db BEGINNING_POKEMON ; BOOSTER_DEBUG_10_STAR
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_10_ENERGY
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_FROM_LATTER_4_SETS
|
||||
db PRESENT_PACK ; BOOSTER_PRESENT_FROM_ROCKET_SETS
|
||||
db BEGINNING_POKEMON ; BOOSTER_DEBUG_2_STAR
|
||||
|
||||
.GetPack:
|
||||
call DoFrame
|
||||
@@ -6608,8 +6608,8 @@ MailboxSelectedMail_CallMappedFunction:
|
||||
ret
|
||||
|
||||
.function_map:
|
||||
key_func $00, ReadMail
|
||||
key_func $01, DeleteMail
|
||||
key_func MAILBOXMENU_READ, ReadMail
|
||||
key_func MAILBOXMENU_DELETE, DeleteMail
|
||||
db $ff
|
||||
|
||||
ReadMail:
|
||||
|
||||
@@ -2748,7 +2748,7 @@ CheckDeck:
|
||||
.asm_25461
|
||||
push hl
|
||||
ld hl, wDeckCheckCardCounts
|
||||
ld c, wDeckCheckCardCountsEnd - wDeckCheckCardCounts
|
||||
ld c, DECKCHECKSTRUCT_LENGTH
|
||||
xor a
|
||||
.loop_clear
|
||||
ld [hli], a
|
||||
@@ -2771,22 +2771,22 @@ CheckDeck:
|
||||
inc [hl]
|
||||
.not_rainbow
|
||||
ld a, [wLoadedCard1Type]
|
||||
ld e, $4
|
||||
ld e, DECKCHECKSTRUCT_TRAINER
|
||||
cp TYPE_TRAINER
|
||||
jr z, .got_type
|
||||
ld e, $0
|
||||
ld e, DECKCHECKSTRUCT_ENERGY
|
||||
cp TYPE_ENERGY
|
||||
jr nc, .got_type
|
||||
ld e, $1
|
||||
ld e, DECKCHECKSTRUCT_BASIC_PKMN
|
||||
ld a, [wLoadedCard1Stage]
|
||||
or a
|
||||
jr z, .got_type
|
||||
ld e, $2
|
||||
ld e, DECKCHECKSTRUCT_STAGE1_PKMN
|
||||
cp STAGE1
|
||||
jr z, .got_type
|
||||
ld e, $3
|
||||
ld e, DECKCHECKSTRUCT_STAGE2_PKMN
|
||||
.got_type
|
||||
ld d, $00
|
||||
ld d, 0
|
||||
ld hl, wDeckCheckCardCounts
|
||||
add hl, de
|
||||
inc [hl]
|
||||
@@ -3507,13 +3507,13 @@ GenerateBoosterContent:
|
||||
db SKY_FLYING_POKEMON, SKY_FLYING_POKEMON, 1, 3, 6, 0 ; BOOSTER_SKY_FLYING_POKEMON
|
||||
db WE_ARE_TEAM_ROCKET, WE_ARE_TEAM_ROCKET, 1, 3, 6, 0 ; BOOSTER_WE_ARE_TEAM_ROCKET
|
||||
db TEAM_ROCKETS_AMBITION, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_TEAM_ROCKETS_AMBITION
|
||||
db BEGINNING_POKEMON, PROMOTIONAL, 10, 0, 0, 0 ; BOOSTER_DEBUG_1
|
||||
db BEGINNING_POKEMON, BEGINNING_POKEMON, 0, 0, 0, 10 ; BOOSTER_PRESENT_PACK_1
|
||||
db BEGINNING_POKEMON, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_PACK_2
|
||||
db BEGINNING_POKEMON, SKY_FLYING_POKEMON, 1, 3, 6, 0 ; BOOSTER_PRESENT_PACK_3
|
||||
db PSYCHIC_BATTLE, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_PACK_4
|
||||
db WE_ARE_TEAM_ROCKET, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_PACK_5
|
||||
db BEGINNING_POKEMON, TEAM_ROCKETS_AMBITION, 2, 3, 5, 0 ; BOOSTER_DEBUG_2
|
||||
db BEGINNING_POKEMON, PROMOTIONAL, 10, 0, 0, 0 ; BOOSTER_DEBUG_10_STAR
|
||||
db BEGINNING_POKEMON, BEGINNING_POKEMON, 0, 0, 0, 10 ; BOOSTER_PRESENT_10_ENERGY
|
||||
db BEGINNING_POKEMON, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_FROM_ALL_SETS
|
||||
db BEGINNING_POKEMON, SKY_FLYING_POKEMON, 1, 3, 6, 0 ; BOOSTER_PRESENT_FROM_NON_ROCKET_SETS
|
||||
db PSYCHIC_BATTLE, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_FROM_LATTER_4_SETS
|
||||
db WE_ARE_TEAM_ROCKET, TEAM_ROCKETS_AMBITION, 1, 3, 6, 0 ; BOOSTER_PRESENT_FROM_ROCKET_SETS
|
||||
db BEGINNING_POKEMON, TEAM_ROCKETS_AMBITION, 2, 3, 5, 0 ; BOOSTER_DEBUG_2_STAR
|
||||
|
||||
; fills wCardPopCandidateList with cards that satisfy
|
||||
; certain criteria:
|
||||
@@ -5337,52 +5337,59 @@ CountIfListedCardsInDeck:
|
||||
or a
|
||||
ret
|
||||
|
||||
Func_260e7:
|
||||
; for a card in de,
|
||||
; create in wDuelTempList a list of its unique evo cards
|
||||
; also set carry if at least 1
|
||||
_ListUniqueEvoCardsFromDE:
|
||||
call LoadCardDataToBuffer1_FromCardID
|
||||
ld hl, wLoadedCard1Name
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
ld hl, wDuelTempList
|
||||
ld de, $0
|
||||
.asm_260f6
|
||||
ld de, GRASS_ENERGY - 1 ; 0
|
||||
.loop_cards
|
||||
inc de
|
||||
push hl
|
||||
push de
|
||||
call LoadCardDataToBuffer1_FromCardID
|
||||
jr c, .asm_2611d
|
||||
jr c, .exit
|
||||
ld a, [wLoadedCard1Type]
|
||||
cp $08
|
||||
jr nc, .asm_26119
|
||||
cp TYPE_ENERGY
|
||||
jr nc, .next_card
|
||||
ld hl, wLoadedCard1PreEvoName
|
||||
ld a, c
|
||||
cp [hl]
|
||||
jr nz, .asm_26119
|
||||
jr nz, .next_card
|
||||
inc hl
|
||||
ld a, b
|
||||
cp [hl]
|
||||
jr nz, .asm_26119
|
||||
jr nz, .next_card
|
||||
; found evo
|
||||
pop de
|
||||
pop hl
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
inc hl
|
||||
jr .asm_260f6
|
||||
.asm_26119
|
||||
jr .loop_cards
|
||||
.next_card
|
||||
pop de
|
||||
pop hl
|
||||
jr .asm_260f6
|
||||
.asm_2611d
|
||||
jr .loop_cards
|
||||
|
||||
.exit
|
||||
pop de
|
||||
pop hl
|
||||
; append $0000 terminator
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld hl, wDuelTempList
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
ret z
|
||||
ret z ; empty
|
||||
; not empty
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
@@ -3312,27 +3312,28 @@ AIDeckSpecificBenchScore:
|
||||
; at least 2 GR's Mewtwo in Play Area
|
||||
ld a, 28
|
||||
ret
|
||||
; 0x2a72f
|
||||
|
||||
SECTION "Bank a@7b32", ROMX[$7b32], BANK[$a]
|
||||
INCLUDE "src/data/auto_deck_list.asm"
|
||||
INCLUDE "src/data/auto_deck_machine.asm"
|
||||
|
||||
Func_2bb32:
|
||||
call EnableSRAM
|
||||
ld a, [wd4b3]
|
||||
ld l, a
|
||||
ld h, $18
|
||||
ld h, 24
|
||||
call HtimesL
|
||||
ld a, [wd548]
|
||||
or a
|
||||
jr nz, .asm_2bb49
|
||||
ld bc, $7952
|
||||
jr .asm_2bb4c
|
||||
.asm_2bb49
|
||||
ld bc, $7a42
|
||||
.asm_2bb4c
|
||||
jr nz, .machine_2
|
||||
; machine 1
|
||||
ld bc, AutoDeckMachine1Entries
|
||||
jr .got_addr
|
||||
.machine_2
|
||||
ld bc, AutoDeckMachine2Entries
|
||||
.got_addr
|
||||
add hl, bc
|
||||
ld bc, $0
|
||||
.asm_2bb50
|
||||
.loop
|
||||
call Func_2bb7f
|
||||
call Func_2bbbb
|
||||
inc hl
|
||||
@@ -3341,7 +3342,7 @@ Func_2bb32:
|
||||
push hl
|
||||
ld de, wd4b4
|
||||
ld h, c
|
||||
ld l, $02
|
||||
ld l, 2
|
||||
call HtimesL
|
||||
add hl, de
|
||||
ld d, h
|
||||
@@ -3355,8 +3356,9 @@ Func_2bb32:
|
||||
call Func_2bb8e
|
||||
inc b
|
||||
ld a, b
|
||||
cp $04
|
||||
jr nz, .asm_2bb50
|
||||
cp 4
|
||||
jr nz, .loop
|
||||
|
||||
ld a, c
|
||||
ld [wNumDeckMachineEntries], a
|
||||
call DisableSRAM
|
||||
@@ -3365,9 +3367,9 @@ Func_2bb32:
|
||||
Func_2bb7f:
|
||||
push hl
|
||||
ld l, c
|
||||
ld h, $60
|
||||
ld h, DECK_COMPRESSED_STRUCT_SIZE
|
||||
call HtimesL
|
||||
ld de, wd40e
|
||||
ld de, wAutoDecks
|
||||
add hl, de
|
||||
ld d, h
|
||||
ld e, l
|
||||
@@ -3574,17 +3576,17 @@ Func_2bc4f:
|
||||
db SYM_SPACE ; tile behind cursor
|
||||
dw NULL ; function pointer if non-0
|
||||
|
||||
Func_2bc9f:
|
||||
_HandleAutoDeckMenu:
|
||||
ld [wd548], a
|
||||
xor a
|
||||
ld [wScrollMenuScrollOffset], a
|
||||
.asm_2bca6
|
||||
ld hl, $7afb
|
||||
ld hl, AutoDeckMachineMenuParams
|
||||
farcall InitializeScrollMenuParameters
|
||||
ld a, $05
|
||||
ld a, NUM_DECK_MACHINE_VISIBLE_DECKS
|
||||
ld [wNumMenuItems], a
|
||||
call Func_2bcfb
|
||||
ld hl, $7f5e
|
||||
call .InitMenu
|
||||
ld hl, Func_3bf5e
|
||||
ld d, h
|
||||
ld a, l
|
||||
ld hl, wScrollMenuScrollFunc
|
||||
@@ -3592,13 +3594,14 @@ Func_2bc9f:
|
||||
ld [hl], d
|
||||
xor a
|
||||
ld [wd119], a
|
||||
.asm_2bcc3
|
||||
.wait_input
|
||||
call DoFrame
|
||||
farcall HandleScrollMenu
|
||||
jr nc, .asm_2bcc3
|
||||
jr nc, .wait_input
|
||||
ld a, [hCurMenuItem]
|
||||
cp $ff
|
||||
ret z
|
||||
ret z ; cancel
|
||||
|
||||
ld a, [wScrollMenuScrollOffset]
|
||||
ld [wd54a], a
|
||||
ld b, a
|
||||
@@ -3618,30 +3621,31 @@ Func_2bc9f:
|
||||
ld a, [wd54b]
|
||||
jr .asm_2bca6
|
||||
|
||||
Func_2bcfb:
|
||||
.InitMenu:
|
||||
xor a
|
||||
ld [wTileMapFill], a
|
||||
call EmptyScreen
|
||||
ld a, $01
|
||||
ld a, TRUE
|
||||
ld [wVBlankOAMCopyToggle], a
|
||||
farcall LoadMenuCursorTile
|
||||
call LoadSymbolsFont
|
||||
call LoadDuelCardSymbolTiles
|
||||
bank1call SetDefaultPalettes
|
||||
ld de, $3cff
|
||||
lb de, $3c, $ff
|
||||
call SetupText
|
||||
lb de, 0, 0
|
||||
lb bc, 20, 13
|
||||
call DrawRegularTextBox
|
||||
ld de, $100
|
||||
lb de, 1, 0
|
||||
ld a, [wd548]
|
||||
or a
|
||||
jr nz, .asm_2bd31
|
||||
jr nz, .machine_2
|
||||
; machine 1
|
||||
ldtx hl, AutoDeckMachine1Text
|
||||
jr .asm_2bd34
|
||||
.asm_2bd31
|
||||
jr .got_name
|
||||
.machine_2
|
||||
ldtx hl, AutoDeckMachine2Text
|
||||
.asm_2bd34
|
||||
.got_name
|
||||
call Func_2c4b
|
||||
ldtx hl, ChooseDeckTypeText
|
||||
call DrawWideTextBox_PrintText
|
||||
@@ -3686,11 +3690,12 @@ Func_2bd7f:
|
||||
push af
|
||||
ld a, [wd548]
|
||||
or a
|
||||
jr nz, .asm_2bd8c
|
||||
jr nz, .machine_2
|
||||
; machine 1
|
||||
pop af
|
||||
farcall CheckTCGIslandMilestoneEvents
|
||||
ret
|
||||
.asm_2bd8c
|
||||
.machine_2
|
||||
pop af
|
||||
farcall CheckGRIslandMilestoneEvents
|
||||
ret
|
||||
@@ -3700,29 +3705,30 @@ Func_2bd92:
|
||||
push bc
|
||||
ld a, b
|
||||
inc a
|
||||
ld b, $00
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
pop bc
|
||||
ld [hl], a
|
||||
ld a, [wd548]
|
||||
or a
|
||||
jr nz, .asm_2bda8
|
||||
ld hl, $7dc3
|
||||
jr .asm_2bdab
|
||||
.asm_2bda8
|
||||
ld hl, $7dd7
|
||||
.asm_2bdab
|
||||
jr nz, .machine_2
|
||||
; machine 1
|
||||
ld hl, .Machine1SectionTitles
|
||||
jr .got_addr
|
||||
.machine_2
|
||||
ld hl, .Machine2SectionTitles
|
||||
.got_addr
|
||||
push bc
|
||||
ld c, b
|
||||
sla c
|
||||
ld b, $00
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
pop bc
|
||||
ld e, l
|
||||
ld d, h
|
||||
ld hl, wd4b4
|
||||
sla c
|
||||
ld b, $00
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
@@ -3730,4 +3736,27 @@ Func_2bd92:
|
||||
ld a, [de]
|
||||
ld [hl], a
|
||||
ret
|
||||
; 0x2bdc3
|
||||
|
||||
.Machine1SectionTitles:
|
||||
tx BasicDeckMachineTextPadded
|
||||
tx GivenDeckMachineTextPadded
|
||||
tx FightingDeckMachineText
|
||||
tx GrassDeckMachineText
|
||||
tx WaterDeckMachineText
|
||||
tx FireDeckMachineText
|
||||
tx LightningDeckMachineText
|
||||
tx PsychicDeckMachineText
|
||||
tx SpecialDeckMachineTextPadded
|
||||
tx LegendaryDeckMachineTextPadded
|
||||
|
||||
.Machine2SectionTitles:
|
||||
tx DarkGrassDeckMachineText
|
||||
tx DarkLightningDeckMachineText
|
||||
tx DarkWaterDeckMachineText
|
||||
tx DarkFireDeckMachineText
|
||||
tx DarkFightingDeckMachineText
|
||||
tx DarkPsychicDeckMachineText
|
||||
tx ColorlessDeckMachineTextPadded
|
||||
tx DarkSpecialDeckMachineText
|
||||
tx RareCardDeckMachineText
|
||||
tx MysteriousCardDeckMachineTextPadded
|
||||
|
||||
@@ -255,11 +255,7 @@ Func_301c0:
|
||||
PlacePlayerInGRIslandLocation:
|
||||
sla a ; *2
|
||||
ld hl, GRIslandLocationPositions
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, [hl]
|
||||
ld d, a
|
||||
@@ -271,11 +267,7 @@ Func_30202:
|
||||
push af
|
||||
sla a ; *2
|
||||
ld hl, GRIslandLocationPositions
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, [hl]
|
||||
@@ -324,17 +316,9 @@ Func_30242:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .LocationConnections
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer1
|
||||
inc h
|
||||
.got_pointer1
|
||||
add_hl_a
|
||||
ld a, c
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer2
|
||||
inc h
|
||||
.got_pointer2
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
cp b
|
||||
jr z, .done
|
||||
@@ -433,11 +417,7 @@ PrintGRIslandLocationName:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .data
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
@@ -466,11 +446,7 @@ PrintGRIslandLocationName:
|
||||
Func_3030a:
|
||||
sla a ; *2
|
||||
ld hl, .PointerTable
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -512,11 +488,7 @@ Func_30343:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, Data_3056a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld [wd680], a
|
||||
ld a, [hli]
|
||||
@@ -529,11 +501,7 @@ Func_3035f:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, Data_3056a
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, c
|
||||
ld [wOWScrollSpeed], a
|
||||
ld a, [hli]
|
||||
@@ -596,11 +564,7 @@ Func_303c7:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .data
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hl] ; map
|
||||
inc hl
|
||||
ld d, [hl] ; x
|
||||
@@ -667,21 +631,13 @@ Func_30452:
|
||||
ld a, [wPlayerOWLocation]
|
||||
sla a ; *2
|
||||
ld hl, GRIslandPlayerPaths
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer1
|
||||
inc h
|
||||
.got_pointer1
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld a, [wCurOWLocation]
|
||||
sla a ; *2
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer2
|
||||
inc h
|
||||
.got_pointer2
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -715,11 +671,7 @@ Func_30452:
|
||||
ld a, [wCurOWLocation]
|
||||
sla a ; *2
|
||||
ld hl, GRIslandLocationPositions
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer3
|
||||
inc h
|
||||
.got_pointer3
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, [hl]
|
||||
ld d, a
|
||||
@@ -732,11 +684,7 @@ Func_30452:
|
||||
ld a, e
|
||||
sla a ; *2
|
||||
ld hl, .data
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer4
|
||||
inc h
|
||||
.got_pointer4
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, [hl]
|
||||
ld d, a
|
||||
@@ -1065,13 +1013,7 @@ Func_311d5:
|
||||
ld [wd615], a
|
||||
call LoadTxRam3
|
||||
farcall GetGameCenterChips
|
||||
ld a, b
|
||||
cp h
|
||||
jr c, .asm_3123b
|
||||
jr nz, .asm_3123b
|
||||
ld a, c
|
||||
cp l
|
||||
.asm_3123b
|
||||
cp16bc_long hl
|
||||
jr nc, .asm_31248
|
||||
ld a, $01
|
||||
start_script
|
||||
|
||||
@@ -1296,37 +1296,13 @@ Func_349cd:
|
||||
Func_349d5:
|
||||
ld a, [wPlayerOWObject]
|
||||
farcall GetOWObjectTilePosition
|
||||
ld a, d
|
||||
cp $0b
|
||||
jr c, .asm_349e6
|
||||
jr nz, .asm_349e6
|
||||
ld a, e
|
||||
cp $08
|
||||
.asm_349e6
|
||||
cpcoord 11, 8
|
||||
jr z, .asm_34a0e
|
||||
ld a, d
|
||||
cp $0a
|
||||
jr c, .asm_349f2
|
||||
jr nz, .asm_349f2
|
||||
ld a, e
|
||||
cp $09
|
||||
.asm_349f2
|
||||
cpcoord 10, 9
|
||||
jr z, .asm_34a2a
|
||||
ld a, d
|
||||
cp $09
|
||||
jr c, .asm_349fe
|
||||
jr nz, .asm_349fe
|
||||
ld a, e
|
||||
cp $09
|
||||
.asm_349fe
|
||||
cpcoord 9, 9
|
||||
jr z, .asm_34a46
|
||||
ld a, d
|
||||
cp $08
|
||||
jr c, .asm_34a0a
|
||||
jr nz, .asm_34a0a
|
||||
ld a, e
|
||||
cp $08
|
||||
.asm_34a0a
|
||||
cpcoord 8, 8
|
||||
jr z, .asm_34a62
|
||||
jr .asm_34a7c
|
||||
.asm_34a0e
|
||||
@@ -1560,8 +1536,8 @@ GameCenter1_NPCInteractions:
|
||||
db $ff
|
||||
|
||||
GameCenter1_OWInteractions:
|
||||
ow_script 5, 4, Func_34d15
|
||||
ow_script 6, 4, Func_34d15
|
||||
ow_script 5, 4, Script_BlackBox
|
||||
ow_script 6, 4, Script_BlackBox
|
||||
ow_script 2, 9, Func_34d35
|
||||
db $ff
|
||||
|
||||
@@ -1695,7 +1671,7 @@ Script_34c4c:
|
||||
end_script
|
||||
ret
|
||||
|
||||
Func_34d15:
|
||||
Script_BlackBox:
|
||||
xor a
|
||||
start_script
|
||||
script_command_01
|
||||
@@ -1704,7 +1680,7 @@ Func_34d15:
|
||||
end_script
|
||||
farcall Func_1312e
|
||||
jr c, .asm_34d2f
|
||||
farcall Func_4569f
|
||||
farcall ProcessBlackBoxInputAndOutput
|
||||
ld a, $81 ; priority black box mail
|
||||
farcall AddMailToQueue
|
||||
.asm_34d2f
|
||||
@@ -2280,13 +2256,7 @@ Func_3512c:
|
||||
ld [wd615], a
|
||||
call LoadTxRam3
|
||||
farcall GetGameCenterChips
|
||||
ld a, b
|
||||
cp h
|
||||
jr c, .asm_35199
|
||||
jr nz, .asm_35199
|
||||
ld a, c
|
||||
cp l
|
||||
.asm_35199
|
||||
cp16bc_long hl
|
||||
jr nc, .asm_351a6
|
||||
ld a, $01
|
||||
start_script
|
||||
|
||||
@@ -4677,7 +4677,7 @@ HandleScrollMenu:
|
||||
.asm_3ac12
|
||||
call .draw_visible_cursor
|
||||
ld a, MENU_CONFIRM
|
||||
farcall PlayConfirmOrCancelSFX
|
||||
farcall PlaySFXConfirmOrCancel
|
||||
ld a, [wCurScrollMenuItem]
|
||||
ld e, a
|
||||
ld a, [hCurMenuItem]
|
||||
@@ -4693,7 +4693,7 @@ HandleScrollMenu:
|
||||
; b button
|
||||
ld a, -1
|
||||
ld [hCurMenuItem], a
|
||||
farcall PlayConfirmOrCancelSFX ; MENU_CANCEL
|
||||
farcall PlaySFXConfirmOrCancel ; MENU_CANCEL
|
||||
scf
|
||||
ret
|
||||
|
||||
@@ -5014,7 +5014,7 @@ HandleDeckMachineSelection:
|
||||
ld e, l
|
||||
pop hl
|
||||
ld a, MENU_CONFIRM
|
||||
farcall PlayConfirmOrCancelSFX
|
||||
farcall PlaySFXConfirmOrCancel
|
||||
farcall OpenDeckConfirmationMenu
|
||||
ld a, [wTempScrollMenuScrollOffset]
|
||||
ld [wScrollMenuScrollOffset], a
|
||||
@@ -5251,8 +5251,10 @@ DrawDeckMachineScreen:
|
||||
ld [hl], $00
|
||||
jr PrintVisibleDeckMachineEntries
|
||||
|
||||
; update wScrollMenuScrollFunc to PrintVisibleAutoDeckMachineEntries
|
||||
; and init wd119
|
||||
Func_3b069:
|
||||
ld hl, $7078
|
||||
ld hl, PrintVisibleAutoDeckMachineEntries
|
||||
ld d, h
|
||||
ld a, l
|
||||
ld hl, wScrollMenuScrollFunc
|
||||
@@ -5262,16 +5264,17 @@ Func_3b069:
|
||||
ld [wd119], a
|
||||
ret
|
||||
|
||||
Func_3b078:
|
||||
ld de, $202
|
||||
ld b, $04
|
||||
; variant of PrintVisibleDeckMachineEntries for Auto Deck Machine sections
|
||||
PrintVisibleAutoDeckMachineEntries:
|
||||
lb de, 2, 2
|
||||
ld b, NUM_AUTO_DECK_MACHINE_SLOTS
|
||||
ld a, [wNumDeckMachineEntries]
|
||||
cp b
|
||||
jr nc, .asm_3b084
|
||||
jr nc, .got_offset
|
||||
ld b, a
|
||||
.asm_3b084
|
||||
.got_offset
|
||||
xor a
|
||||
.asm_3b085
|
||||
.loop
|
||||
push af
|
||||
push bc
|
||||
push de
|
||||
@@ -5285,7 +5288,7 @@ Func_3b078:
|
||||
inc a
|
||||
inc e
|
||||
inc e
|
||||
jr .asm_3b085
|
||||
jr .loop
|
||||
|
||||
; prints the deck name of the deck corresponding
|
||||
; to index in register a, from wMachineDeckPtrs
|
||||
@@ -5454,7 +5457,9 @@ PrintDeckMachineEntry:
|
||||
ret
|
||||
|
||||
.text
|
||||
db "<SPACE><SPACE><SPACE><SPACE><SPACE><SPACE><SPACE>"
|
||||
REPT 7
|
||||
db "<SPACE>"
|
||||
ENDR
|
||||
done
|
||||
|
||||
; de = card ID
|
||||
@@ -6893,7 +6898,7 @@ Func_3bb09:
|
||||
ld e, l
|
||||
pop hl
|
||||
ld a, MENU_CONFIRM
|
||||
farcall PlayConfirmOrCancelSFX
|
||||
farcall PlaySFXConfirmOrCancel
|
||||
farcall OpenDeckConfirmationMenu
|
||||
ld a, [wTempScrollMenuScrollOffset]
|
||||
ld [wScrollMenuScrollOffset], a
|
||||
@@ -6975,7 +6980,7 @@ Func_3bb09:
|
||||
pop hl
|
||||
jp c, .asm_3bb4f
|
||||
ld a, MENU_CONFIRM
|
||||
farcall PlayConfirmOrCancelSFX
|
||||
farcall PlaySFXConfirmOrCancel
|
||||
push hl
|
||||
ld de, $18
|
||||
add hl, de
|
||||
@@ -6997,12 +7002,12 @@ Func_3bc95:
|
||||
ld [wTileMapFill], a
|
||||
call ZeroObjectPositions
|
||||
call EmptyScreen
|
||||
ld a, $01
|
||||
ld a, TRUE
|
||||
ld [wVBlankOAMCopyToggle], a
|
||||
call LoadSymbolsFont
|
||||
call LoadDuelCardSymbolTiles
|
||||
bank1call SetDefaultPalettes
|
||||
ld de, $3cff
|
||||
lb de, $3c, $ff
|
||||
call SetupText
|
||||
lb de, 0, 0
|
||||
lb bc, 20, 12
|
||||
@@ -7014,8 +7019,8 @@ Func_3bc95:
|
||||
lb de, 1, 0
|
||||
call Func_2c4b
|
||||
farcall Func_2bb32
|
||||
call Func_3bd3b
|
||||
call Func_3b078
|
||||
call CreateAutoDeckPointerList
|
||||
call PrintVisibleAutoDeckMachineEntries
|
||||
call EnableLCD
|
||||
ret
|
||||
|
||||
@@ -7078,15 +7083,16 @@ Func_3bd28:
|
||||
scf
|
||||
ret
|
||||
|
||||
Func_3bd3b:
|
||||
ld a, $08
|
||||
; write to wMachineDeckPtrs the pointers to the auto decks in WRAM2 wAutoDecks
|
||||
CreateAutoDeckPointerList:
|
||||
ld a, 2 * NUM_AUTO_DECK_MACHINE_SLOTS
|
||||
ld hl, wMachineDeckPtrs
|
||||
farcall ClearNBytesFromHL
|
||||
ld de, wMachineDeckPtrs
|
||||
ld hl, wd40e
|
||||
ld bc, $60
|
||||
ld a, $04
|
||||
.asm_3bd4f
|
||||
ld hl, wAutoDecks
|
||||
ld bc, DECK_COMPRESSED_STRUCT_SIZE
|
||||
ld a, NUM_AUTO_DECK_MACHINE_SLOTS
|
||||
.loop
|
||||
push af
|
||||
ld a, l
|
||||
ld [de], a
|
||||
@@ -7097,7 +7103,7 @@ Func_3bd3b:
|
||||
add hl, bc
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .asm_3bd4f
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 0x3bd5c
|
||||
|
||||
|
||||
@@ -290,13 +290,7 @@ Func_3c1d0:
|
||||
ld a, [sLinkDuelCounter + 1]
|
||||
ld b, a
|
||||
call DisableSRAM
|
||||
ld a, b
|
||||
cp $00
|
||||
jr c, .asm_3c278
|
||||
jr nz, .asm_3c278
|
||||
ld a, c
|
||||
cp $32
|
||||
.asm_3c278
|
||||
cp16bc_long 50
|
||||
jr z, .asm_3c280
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -317,13 +311,7 @@ Func_3c1d0:
|
||||
ld a, [sLinkDuelCounter + 1]
|
||||
ld b, a
|
||||
call DisableSRAM
|
||||
ld a, b
|
||||
cp $00
|
||||
jr c, .asm_3c2a9
|
||||
jr nz, .asm_3c2a9
|
||||
ld a, c
|
||||
cp $64
|
||||
.asm_3c2a9
|
||||
cp16bc_long 100
|
||||
jr z, .asm_3c2b1
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -792,12 +780,12 @@ MasonLaboratoryComputerRoom_NPCInteractions:
|
||||
db $ff
|
||||
|
||||
MasonLaboratoryComputerRoom_OWInteractions:
|
||||
ow_script 2, 3, Func_3c6c3
|
||||
ow_script 3, 3, Func_3c6c3
|
||||
ow_script 8, 10, Func_3c6e8
|
||||
ow_script 9, 10, Func_3c6e8
|
||||
ow_script 8, 3, Func_3c715
|
||||
ow_script 9, 3, Func_3c715
|
||||
ow_script 2, 3, Script_AutoDeckMachine1
|
||||
ow_script 3, 3, Script_AutoDeckMachine1
|
||||
ow_script 8, 10, Script_AutoDeckMachine2
|
||||
ow_script 9, 10, Script_AutoDeckMachine2
|
||||
ow_script 8, 3, Script_DeckSaveMachine
|
||||
ow_script 9, 3, Script_DeckSaveMachine
|
||||
db $ff
|
||||
|
||||
MasonLaboratoryComputerRoom_MapScripts:
|
||||
@@ -841,13 +829,13 @@ Func_3c6b3:
|
||||
scf
|
||||
ret
|
||||
|
||||
Func_3c6c3:
|
||||
Script_AutoDeckMachine1:
|
||||
xor a
|
||||
start_script
|
||||
script_command_01
|
||||
print_text Text0eec
|
||||
ask_question Text0eed, TRUE
|
||||
script_jump_if_b0z .ows_3c6e5
|
||||
print_text ItsAutoDeckMachine1Text
|
||||
ask_question AutoDeckMachine1PromptText, TRUE
|
||||
script_jump_if_b0z .cancel
|
||||
script_command_02
|
||||
end_script
|
||||
call PauseSong
|
||||
@@ -857,21 +845,21 @@ Func_3c6c3:
|
||||
farcall Func_1e855
|
||||
call ResumeSong
|
||||
ret
|
||||
.ows_3c6e5
|
||||
.cancel
|
||||
script_command_02
|
||||
end_script
|
||||
ret
|
||||
|
||||
Func_3c6e8:
|
||||
Script_AutoDeckMachine2:
|
||||
ld a, EVENT_GOT_GOLBAT_COIN
|
||||
farcall GetEventValue
|
||||
ret z
|
||||
xor a
|
||||
start_script
|
||||
script_command_01
|
||||
print_text Text0eee
|
||||
ask_question Text0eed, TRUE
|
||||
script_jump_if_b0z .ows_3c712
|
||||
print_text ItsAutoDeckMachine2Text
|
||||
ask_question AutoDeckMachine1PromptText, TRUE
|
||||
script_jump_if_b0z .cancel
|
||||
script_command_02
|
||||
end_script
|
||||
call PauseSong
|
||||
@@ -881,18 +869,18 @@ Func_3c6e8:
|
||||
farcall Func_1e855
|
||||
call ResumeSong
|
||||
ret
|
||||
.ows_3c712
|
||||
.cancel
|
||||
script_command_02
|
||||
end_script
|
||||
ret
|
||||
|
||||
Func_3c715:
|
||||
Script_DeckSaveMachine:
|
||||
xor a
|
||||
start_script
|
||||
script_command_01
|
||||
print_text Text0ef0
|
||||
ask_question Text0ef1, TRUE
|
||||
script_jump_if_b0z .ows_3c736
|
||||
print_text ItsDeckSaveMachineText
|
||||
ask_question DeckSaveMachinePromptText, TRUE
|
||||
script_jump_if_b0z .cancel
|
||||
script_command_02
|
||||
end_script
|
||||
call PauseSong
|
||||
@@ -901,7 +889,7 @@ Func_3c715:
|
||||
farcall Func_1e849
|
||||
call ResumeSong
|
||||
ret
|
||||
.ows_3c736
|
||||
.cancel
|
||||
script_command_02
|
||||
end_script
|
||||
ret
|
||||
@@ -3372,29 +3360,29 @@ Func_3da09:
|
||||
compare_loaded_var $02
|
||||
script_jump_if_b0z .ows_3da31
|
||||
set_var VAR_0D, $03
|
||||
script_call Script_3dcbb
|
||||
script_call Script_SetGrandMasterCupPrizes
|
||||
.ows_3da31
|
||||
print_npc_text Text1017
|
||||
script_call Script_3dd1d
|
||||
print_npc_text Text1018
|
||||
script_call Script_3dd3a
|
||||
print_npc_text Text1018
|
||||
print_npc_text Text1019
|
||||
print_npc_text GrandMasterCupClerkWelcomeText
|
||||
script_call Script_LoadFirstTwoGrandMasterCupPrizeCardNames
|
||||
print_npc_text GrandMasterCupClerkPrizesText
|
||||
script_call Script_LoadLastTwoGrandMasterCupPrizeCardNames
|
||||
print_npc_text GrandMasterCupClerkPrizesText
|
||||
print_npc_text GrandMasterCupClerkInviteText
|
||||
script_jump .ows_3da52
|
||||
.ows_3da48
|
||||
compare_loaded_var $06
|
||||
print_variable_npc_text Text101a, Text101b
|
||||
print_variable_npc_text GrandMasterCupClerkPlayerLostText, GrandMasterCupClerkPlayerWonGrandFinalText
|
||||
script_jump .ows_3da69
|
||||
.ows_3da52
|
||||
ask_question Text101c, TRUE
|
||||
script_jump_if_b0z .ows_3da66
|
||||
ask_question GrandMasterCupClerkEnterPromptText, TRUE
|
||||
script_jump_if_b0z .declined
|
||||
set_var VAR_0D, $04
|
||||
set_var VAR_20, $00
|
||||
print_npc_text Text101d
|
||||
print_npc_text GrandMasterCupClerkEnterAcceptedText
|
||||
script_command_02
|
||||
script_jump Script_3dbde
|
||||
.ows_3da66
|
||||
print_npc_text Text101e
|
||||
.declined
|
||||
print_npc_text GrandMasterCupClerkEnterDeclinedText
|
||||
.ows_3da69
|
||||
script_command_02
|
||||
end_script
|
||||
@@ -3723,58 +3711,60 @@ Func_3dc8e:
|
||||
db SOUTH, MOVE_4
|
||||
db $ff
|
||||
|
||||
Script_3dcbb:
|
||||
set_var VAR_10, $ff
|
||||
set_var VAR_11, $ff
|
||||
set_var VAR_12, $ff
|
||||
set_var VAR_13, $ff
|
||||
Script_SetGrandMasterCupPrizes:
|
||||
; init
|
||||
set_var VAR_GRANDMASTERCUP_PRIZE_INDEX_0, $ff
|
||||
set_var VAR_GRANDMASTERCUP_PRIZE_INDEX_1, $ff
|
||||
set_var VAR_GRANDMASTERCUP_PRIZE_INDEX_2, $ff
|
||||
set_var VAR_GRANDMASTERCUP_PRIZE_INDEX_3, $ff
|
||||
quit_script
|
||||
call Func_3dcf2
|
||||
ld a, VAR_10
|
||||
; set
|
||||
call .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_0
|
||||
farcall SetVarValue
|
||||
call Func_3dcf2
|
||||
ld a, VAR_11
|
||||
call .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_1
|
||||
farcall SetVarValue
|
||||
call Func_3dcf2
|
||||
ld a, VAR_12
|
||||
call .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_2
|
||||
farcall SetVarValue
|
||||
call Func_3dcf2
|
||||
ld a, VAR_13
|
||||
call .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_3
|
||||
farcall SetVarValue
|
||||
ld a, $01
|
||||
start_script
|
||||
script_ret
|
||||
|
||||
Func_3dcf2:
|
||||
.asm_3dcf2
|
||||
ld a, $25
|
||||
; return a = random prize index, while also ensuring no dupes
|
||||
.PickPrize:
|
||||
ld a, NUM_GRANDMASTERCUP_PRIZE_POOL
|
||||
call Random
|
||||
ld c, a
|
||||
ld a, VAR_10
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_0
|
||||
farcall GetVarValue
|
||||
cp c
|
||||
jr z, .asm_3dcf2
|
||||
ld a, VAR_11
|
||||
jr z, .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_1
|
||||
farcall GetVarValue
|
||||
cp c
|
||||
jr z, .asm_3dcf2
|
||||
ld a, VAR_12
|
||||
jr z, .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_2
|
||||
farcall GetVarValue
|
||||
cp c
|
||||
jr z, .asm_3dcf2
|
||||
ld a, VAR_13
|
||||
jr z, .PickPrize
|
||||
ld a, VAR_GRANDMASTERCUP_PRIZE_INDEX_3
|
||||
farcall GetVarValue
|
||||
cp c
|
||||
jr z, .asm_3dcf2
|
||||
jr z, .PickPrize
|
||||
ret
|
||||
|
||||
Script_3dd1d:
|
||||
Script_LoadFirstTwoGrandMasterCupPrizeCardNames:
|
||||
quit_script
|
||||
xor a
|
||||
farcall Func_4568f
|
||||
xor a ; GRANDMASTERCUP_PRIZE_0
|
||||
farcall GetGrandMasterCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $01
|
||||
farcall Func_4568f
|
||||
ld a, GRANDMASTERCUP_PRIZE_1
|
||||
farcall GetGrandMasterCupPrizeCardName
|
||||
ld a, l
|
||||
ld [wTxRam2_b], a
|
||||
ld a, h
|
||||
@@ -3783,13 +3773,13 @@ Script_3dd1d:
|
||||
start_script
|
||||
script_ret
|
||||
|
||||
Script_3dd3a:
|
||||
Script_LoadLastTwoGrandMasterCupPrizeCardNames:
|
||||
quit_script
|
||||
ld a, $02
|
||||
farcall Func_4568f
|
||||
ld a, GRANDMASTERCUP_PRIZE_2
|
||||
farcall GetGrandMasterCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $03
|
||||
farcall Func_4568f
|
||||
ld a, GRANDMASTERCUP_PRIZE_3
|
||||
farcall GetGrandMasterCupPrizeCardName
|
||||
ld a, l
|
||||
ld [wTxRam2_b], a
|
||||
ld a, h
|
||||
@@ -3881,9 +3871,9 @@ Func_3ddb8:
|
||||
lb de, 12, 3
|
||||
ld b, WEST
|
||||
farcall SetOWObjectTilePositionAndDirection
|
||||
farcall Func_45416
|
||||
farcall SetGrandMasterCupOpponents
|
||||
farcall Func_454fa
|
||||
ld a, VAR_14
|
||||
ld a, VAR_GRANDMASTERCUP_OPPONENT_DECK_0
|
||||
farcall GetVarValue
|
||||
farcall Func_45484
|
||||
lb de, 9, 4
|
||||
@@ -4441,8 +4431,8 @@ Script_3e21c:
|
||||
quit_script
|
||||
ld a, VAR_1E
|
||||
farcall GetVarValue
|
||||
farcall LoadNPCDuelistDeck
|
||||
cp $03
|
||||
farcall GetNPCByDeck
|
||||
cp NPC_RONALD
|
||||
jr z, .asm_3e272
|
||||
farcall Func_454bc
|
||||
ld a, $01
|
||||
@@ -4576,8 +4566,8 @@ Func_3e2a4:
|
||||
quit_script
|
||||
ld a, VAR_1E
|
||||
farcall GetVarValue
|
||||
farcall LoadNPCDuelistDeck
|
||||
cp $03
|
||||
farcall GetNPCByDeck
|
||||
cp NPC_RONALD
|
||||
jr nz, .asm_3e38e
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -4621,8 +4611,8 @@ Func_3e2a4:
|
||||
quit_script
|
||||
ld a, VAR_1E
|
||||
farcall GetVarValue
|
||||
farcall LoadNPCDuelistDeck
|
||||
cp $03
|
||||
farcall GetNPCByDeck
|
||||
cp NPC_RONALD
|
||||
jr nz, .asm_3e3fc
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -4864,8 +4854,8 @@ Func_3e2a4:
|
||||
quit_script
|
||||
xor a
|
||||
.asm_3e5e6
|
||||
farcall Func_45676
|
||||
farcall Func_4568f
|
||||
farcall GetGrandMasterCupPrizeCardID
|
||||
farcall GetGrandMasterCupPrizeCardName
|
||||
farcall Func_1f7d4
|
||||
inc a
|
||||
cp $04
|
||||
@@ -4882,13 +4872,13 @@ Func_3e2a4:
|
||||
farcall Func_1022a
|
||||
push bc
|
||||
ld a, b
|
||||
farcall Func_45676
|
||||
farcall GetGrandMasterCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
farcall Func_c646
|
||||
pop bc
|
||||
ld a, c
|
||||
farcall Func_45676
|
||||
farcall GetGrandMasterCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
farcall Func_c646
|
||||
@@ -6793,13 +6783,7 @@ Func_3f44f:
|
||||
ld [wd615], a
|
||||
call LoadTxRam3
|
||||
farcall GetGameCenterChips
|
||||
ld a, b
|
||||
cp h
|
||||
jr c, .asm_3f4bc
|
||||
jr nz, .asm_3f4bc
|
||||
ld a, c
|
||||
cp l
|
||||
.asm_3f4bc
|
||||
cp16bc_long hl
|
||||
jr nc, .asm_3f4c9
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -7283,13 +7267,7 @@ Func_3f858:
|
||||
ld b, a
|
||||
ld a, [wTextBoxFrameColor]
|
||||
ld c, a
|
||||
ld a, b
|
||||
cp $00
|
||||
jr c, .asm_3f874
|
||||
jr nz, .asm_3f874
|
||||
ld a, c
|
||||
cp $03
|
||||
.asm_3f874
|
||||
cp16bc_bytes 0, 3
|
||||
jr nz, .asm_3f87b
|
||||
farcall Func_1352a
|
||||
ret
|
||||
|
||||
@@ -878,11 +878,7 @@ HandleTCGIslandInput:
|
||||
PlacePlayerInTCGIslandLocation:
|
||||
sla a ; *2
|
||||
ld hl, TCGIslandLocationPositions
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, [hl]
|
||||
ld d, a
|
||||
@@ -893,11 +889,7 @@ PlacePlayerInTCGIslandLocation:
|
||||
UpdateTCGIslandCursorPosition:
|
||||
sla a ; *2
|
||||
ld hl, TCGIslandLocationPositions
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, [hl]
|
||||
@@ -926,17 +918,9 @@ HandleTCGIslandDirectionalInput:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .LocationConnections
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer_1
|
||||
inc h
|
||||
.got_pointer_1
|
||||
add_hl_a
|
||||
ld a, c
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer_2
|
||||
inc h
|
||||
.got_pointer_2
|
||||
add_hl_a
|
||||
ld a, [hl]
|
||||
cp b
|
||||
jr z, .done
|
||||
@@ -1035,11 +1019,7 @@ PrintTCGIslandLocationName:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .LocationTitleTextItems
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .ok
|
||||
inc h
|
||||
.ok
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
@@ -1070,11 +1050,7 @@ Func_40682:
|
||||
sla a
|
||||
sla a ; *4
|
||||
ld hl, .data
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer
|
||||
inc h
|
||||
.got_pointer
|
||||
add_hl_a
|
||||
ld a, [hl] ; map
|
||||
inc hl
|
||||
ld d, [hl] ; x
|
||||
@@ -1108,21 +1084,13 @@ Func_406d1:
|
||||
ld a, [wPlayerOWLocation]
|
||||
sla a ; *2
|
||||
ld hl, TCGIslandPlayerPaths
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer_1
|
||||
inc h
|
||||
.got_pointer_1
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld a, [wCurOWLocation]
|
||||
sla a ; *2
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .got_pointer_2
|
||||
inc h
|
||||
.got_pointer_2
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -1152,11 +1120,7 @@ Func_406d1:
|
||||
ld a, [wCurOWLocation]
|
||||
sla a
|
||||
ld hl, TCGIslandLocationPositions
|
||||
add l ; *2
|
||||
ld l, a
|
||||
jr nc, .got_pointer_3
|
||||
inc h
|
||||
.got_pointer_3
|
||||
add_hl_a
|
||||
ld a, [hli]
|
||||
ld e, [hl]
|
||||
ld d, a
|
||||
@@ -1672,13 +1636,7 @@ Func_41074:
|
||||
ld a, [wde11 + 1]
|
||||
ld b, a
|
||||
inc bc
|
||||
ld a, b
|
||||
cp $03
|
||||
jr c, .asm_41090
|
||||
jr nz, .asm_41090
|
||||
ld a, c
|
||||
cp $e8
|
||||
.asm_41090
|
||||
cp16bc_long 1000
|
||||
jr nc, .asm_4109a
|
||||
ld a, c
|
||||
ld [wde11], a
|
||||
@@ -1709,13 +1667,7 @@ Func_41074:
|
||||
ld a, [wde0d + 1]
|
||||
ld b, a
|
||||
inc bc
|
||||
ld a, b
|
||||
cp $03
|
||||
jr c, .asm_410d7
|
||||
jr nz, .asm_410d7
|
||||
ld a, c
|
||||
cp $e8
|
||||
.asm_410d7
|
||||
cp16bc_long 1000
|
||||
jr nc, .asm_410e1
|
||||
ld a, c
|
||||
ld [wde0d], a
|
||||
@@ -1752,13 +1704,7 @@ Func_41074:
|
||||
ld e, a
|
||||
ld a, [wde11 + 1]
|
||||
ld d, a
|
||||
ld a, d
|
||||
cp $00
|
||||
jr c, .asm_41127
|
||||
jr nz, .asm_41127
|
||||
ld a, e
|
||||
cp $32
|
||||
.asm_41127
|
||||
cp16_long 50
|
||||
jr nz, .asm_4110a
|
||||
call Func_41167
|
||||
jr .asm_4110a
|
||||
@@ -1772,13 +1718,7 @@ Func_4112e:
|
||||
ld e, a
|
||||
ld a, [wde15 + 1]
|
||||
ld d, a
|
||||
ld a, b
|
||||
cp d
|
||||
jr c, .asm_41146
|
||||
jr nz, .asm_41146
|
||||
ld a, c
|
||||
cp e
|
||||
.asm_41146
|
||||
cp16bc_long de
|
||||
jr nc, .asm_4114a
|
||||
scf
|
||||
ret
|
||||
@@ -2529,7 +2469,7 @@ Func_41662:
|
||||
script_jump .ows_416b8
|
||||
.ows_41699
|
||||
quit_script
|
||||
farcall Func_f027
|
||||
farcall GetTCGChallengeCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -3102,17 +3042,17 @@ Func_41a4d:
|
||||
script_jump .ows_41b57
|
||||
.ows_41b20
|
||||
quit_script
|
||||
ld a, VAR_29
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX
|
||||
farcall GetVarValue
|
||||
farcall Func_f027
|
||||
farcall GetTCGChallengeCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $01
|
||||
start_script
|
||||
print_npc_text Text0985
|
||||
quit_script
|
||||
ld a, VAR_29
|
||||
ld a, VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX
|
||||
farcall GetVarValue
|
||||
farcall Func_f010
|
||||
farcall GetTCGChallengeCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
farcall Func_1022a
|
||||
@@ -3445,37 +3385,13 @@ Func_41dac:
|
||||
Func_41db4:
|
||||
ld a, [wPlayerOWObject]
|
||||
farcall GetOWObjectTilePosition
|
||||
ld a, d
|
||||
cp $05
|
||||
jr c, .asm_41dc5
|
||||
jr nz, .asm_41dc5
|
||||
ld a, e
|
||||
cp $08
|
||||
.asm_41dc5
|
||||
cpcoord 5, 8
|
||||
jr z, .asm_41ded
|
||||
ld a, d
|
||||
cp $04
|
||||
jr c, .asm_41dd1
|
||||
jr nz, .asm_41dd1
|
||||
ld a, e
|
||||
cp $09
|
||||
.asm_41dd1
|
||||
cpcoord 4, 9
|
||||
jr z, .asm_41e09
|
||||
ld a, d
|
||||
cp $03
|
||||
jr c, .asm_41ddd
|
||||
jr nz, .asm_41ddd
|
||||
ld a, e
|
||||
cp $09
|
||||
.asm_41ddd
|
||||
cpcoord 3, 9
|
||||
jr z, .asm_41e25
|
||||
ld a, d
|
||||
cp $02
|
||||
jr c, .asm_41de9
|
||||
jr nz, .asm_41de9
|
||||
ld a, e
|
||||
cp $08
|
||||
.asm_41de9
|
||||
cpcoord 2, 8
|
||||
jr z, .asm_41e41
|
||||
jr .asm_41e5b
|
||||
.asm_41ded
|
||||
@@ -4656,13 +4572,7 @@ Func_42776:
|
||||
ld a, [wde13 + 1]
|
||||
ld b, a
|
||||
inc bc
|
||||
ld a, b
|
||||
cp $03
|
||||
jr c, .asm_42792
|
||||
jr nz, .asm_42792
|
||||
ld a, c
|
||||
cp $e8
|
||||
.asm_42792
|
||||
cp16bc_long 1000
|
||||
jr nc, .asm_4279c
|
||||
ld a, c
|
||||
ld [wde13], a
|
||||
@@ -4693,13 +4603,7 @@ Func_42776:
|
||||
ld a, [wde0f + 1]
|
||||
ld b, a
|
||||
inc bc
|
||||
ld a, b
|
||||
cp $03
|
||||
jr c, .asm_427da
|
||||
jr nz, .asm_427da
|
||||
ld a, c
|
||||
cp $e8
|
||||
.asm_427da
|
||||
cp16bc_long 1000
|
||||
jr nc, .asm_427e4
|
||||
ld a, c
|
||||
ld [wde0f], a
|
||||
@@ -4736,13 +4640,7 @@ Func_42776:
|
||||
ld e, a
|
||||
ld a, [wde13 + 1]
|
||||
ld d, a
|
||||
ld a, d
|
||||
cp $00
|
||||
jr c, .asm_4282c
|
||||
jr nz, .asm_4282c
|
||||
ld a, e
|
||||
cp $32
|
||||
.asm_4282c
|
||||
cp16_long 50
|
||||
jr nz, .asm_4280f
|
||||
call Func_4286c
|
||||
jr .asm_4280f
|
||||
@@ -4756,13 +4654,7 @@ Func_42833:
|
||||
ld e, a
|
||||
ld a, [wde17 + 1]
|
||||
ld d, a
|
||||
ld a, b
|
||||
cp d
|
||||
jr c, .asm_4284b
|
||||
jr nz, .asm_4284b
|
||||
ld a, c
|
||||
cp e
|
||||
.asm_4284b
|
||||
cp16bc_long de
|
||||
jr nc, .asm_4284f
|
||||
scf
|
||||
ret
|
||||
@@ -4827,7 +4719,7 @@ Func_4288d:
|
||||
script_jump .ows_428f9
|
||||
.ows_428c4
|
||||
quit_script
|
||||
farcall Func_f04d
|
||||
farcall GetGRChallengeCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $01
|
||||
start_script
|
||||
@@ -5257,17 +5149,17 @@ Func_42bb7:
|
||||
inc_var VAR_32
|
||||
.ows_42c72
|
||||
quit_script
|
||||
ld a, VAR_31
|
||||
ld a, VAR_GR_CHALLENGE_CUP_PRIZE_INDEX
|
||||
farcall GetVarValue
|
||||
farcall Func_f04d
|
||||
farcall GetGRChallengeCupPrizeCardName
|
||||
call LoadTxRam2
|
||||
ld a, $01
|
||||
start_script
|
||||
print_npc_text Text0e27
|
||||
quit_script
|
||||
ld a, VAR_31
|
||||
ld a, VAR_GR_CHALLENGE_CUP_PRIZE_INDEX
|
||||
farcall GetVarValue
|
||||
farcall Func_f036
|
||||
farcall GetGRChallengeCupPrizeCardID
|
||||
ld e, c
|
||||
ld d, b
|
||||
farcall Func_1022a
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1091
src/engine/black_box.asm
Normal file
1091
src/engine/black_box.asm
Normal file
File diff suppressed because it is too large
Load Diff
1059
src/engine/card_list_ops.asm
Normal file
1059
src/engine/card_list_ops.asm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -977,7 +977,7 @@ SetUsedPkmnPowerThisTurnFlag:
|
||||
; - a = SUBSTATUS1_* constant
|
||||
ApplySubstatus1ToAttackingCardAndSetCountdown:
|
||||
call ApplySubstatus1ToAttackingCard
|
||||
|
||||
|
||||
; set turn countdown to %01
|
||||
ld a, DUELVARS_ARENA_CARD_SUBSTATUS3
|
||||
get_turn_duelist_var
|
||||
@@ -2416,12 +2416,7 @@ CheckIfCardHasGrassOrRainbowEnergyAttached:
|
||||
push hl
|
||||
ld a, l
|
||||
call GetCardIDFromDeckIndex
|
||||
ld a, d
|
||||
cp b
|
||||
jr nz, .not_equal
|
||||
ld a, e
|
||||
cp c
|
||||
.not_equal
|
||||
cp16 bc
|
||||
pop hl
|
||||
pop de
|
||||
jr z, .no_carry
|
||||
@@ -9832,7 +9827,7 @@ ReelIn_AddToHandEffect:
|
||||
cp $ff
|
||||
jr nz, .loop_add_cards
|
||||
ret
|
||||
|
||||
|
||||
.loop_add_cards
|
||||
; copy from hTempList to wDuelTempList
|
||||
ld a, [hli]
|
||||
|
||||
@@ -312,7 +312,7 @@ Glossary:
|
||||
and PAD_B
|
||||
jr z, .loop_wait_b_btn
|
||||
ld a, MENU_CANCEL
|
||||
farcall PlayConfirmOrCancelSFX
|
||||
farcall PlaySFXConfirmOrCancel
|
||||
ret
|
||||
|
||||
MACRO explanation
|
||||
|
||||
@@ -364,11 +364,7 @@ Func_3254::
|
||||
inc hl
|
||||
.asm_3283
|
||||
ld a, $07
|
||||
add l
|
||||
ld l, a
|
||||
jr nc, .asm_328a
|
||||
inc h
|
||||
.asm_328a
|
||||
add_hl_a
|
||||
jr Func_3254
|
||||
|
||||
Func_328c::
|
||||
|
||||
@@ -52,6 +52,50 @@ MACRO? cp16
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? cp16_long
|
||||
ld a, d
|
||||
cp HIGH(\1)
|
||||
jr c, :+
|
||||
jr nz, :+
|
||||
ld a, e
|
||||
cp LOW(\1)
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? cp16bc_long
|
||||
ld a, b
|
||||
cp HIGH(\1)
|
||||
jr c, :+
|
||||
jr nz, :+
|
||||
ld a, c
|
||||
cp LOW(\1)
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? cp16_bytes
|
||||
ld a, d
|
||||
cp \1
|
||||
jr c, :+
|
||||
jr nz, :+
|
||||
ld a, e
|
||||
cp \2
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? cp16bc_bytes
|
||||
ld a, b
|
||||
cp \1
|
||||
jr c, :+
|
||||
jr nz, :+
|
||||
ld a, c
|
||||
cp \2
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? cpcoord
|
||||
cp16_bytes \1, \2
|
||||
ENDM
|
||||
|
||||
MACRO? cphl
|
||||
inc hl
|
||||
ld a, [hld]
|
||||
@@ -61,3 +105,27 @@ MACRO? cphl
|
||||
cp LOW(\1)
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? add_r16_r8
|
||||
add LOW(\1)
|
||||
ld LOW(\1), \2
|
||||
jr nc, :+
|
||||
inc HIGH(\1)
|
||||
:
|
||||
ENDM
|
||||
|
||||
MACRO? add_hl_a
|
||||
add_r16_r8 hl, a
|
||||
ENDM
|
||||
|
||||
MACRO? add_de_a
|
||||
add_r16_r8 de, a
|
||||
ENDM
|
||||
|
||||
MACRO? add_at_hl_a
|
||||
add [hl]
|
||||
ld [hli], a
|
||||
jr nc, :+
|
||||
inc [hl]
|
||||
:
|
||||
ENDM
|
||||
|
||||
@@ -259,27 +259,27 @@ Text0eeb:
|
||||
linefw "べんきょうすると よろしいですわ"
|
||||
done
|
||||
|
||||
Text0eec:
|
||||
ItsAutoDeckMachine1Text:
|
||||
textfw "オートデッキマシン1号が ある!"
|
||||
done
|
||||
|
||||
Text0eed:
|
||||
AutoDeckMachine1PromptText:
|
||||
textfw "デッキを つくりますか?"
|
||||
done
|
||||
|
||||
Text0eee:
|
||||
ItsAutoDeckMachine2Text:
|
||||
textfw "オートデッキマシン2号が ある!"
|
||||
done
|
||||
|
||||
Text0eef:
|
||||
AutoDeckMachine2PromptText:
|
||||
textfw "デッキを つくりますか?"
|
||||
done
|
||||
|
||||
Text0ef0:
|
||||
ItsDeckSaveMachineText:
|
||||
textfw "デッキきろくマシンが ある!"
|
||||
done
|
||||
|
||||
Text0ef1:
|
||||
DeckSaveMachinePromptText:
|
||||
textfw "デッキきろくマシンを つかいますか?"
|
||||
done
|
||||
|
||||
|
||||
@@ -811,7 +811,7 @@ Text1016:
|
||||
linefw "ポケモンカードの ゲットあるのみ!"
|
||||
done
|
||||
|
||||
Text1017:
|
||||
GrandMasterCupClerkWelcomeText:
|
||||
textfw "ただいま グランドマスター杯を"
|
||||
linefw "かいさいしています!"
|
||||
linefw "トーナメント戦を 勝ちぬいて"
|
||||
@@ -820,42 +820,42 @@ Text1017:
|
||||
linefw "ごうか賞品を プレゼント!"
|
||||
done
|
||||
|
||||
Text1018:
|
||||
GrandMasterCupClerkPrizesText:
|
||||
textfw "「<RAMTEXT>」"
|
||||
linefw "「<RAMTEXT>」"
|
||||
done
|
||||
|
||||
Text1019:
|
||||
GrandMasterCupClerkInviteText:
|
||||
textfw "この 4枚のプロモーションカードの"
|
||||
linefw "なかから 2枚を プレゼント!"
|
||||
linefw "<RAMNAME>さん さんかなさいますか"
|
||||
linefw "グランドマスター杯に?"
|
||||
done
|
||||
|
||||
Text101a:
|
||||
GrandMasterCupClerkPlayerLostText:
|
||||
textfw "ざんねんでしたね・・・"
|
||||
linefw "<RAMNAME>さん"
|
||||
linefw "つぎの グランドマスター杯は"
|
||||
linefw "がんばって くださいね"
|
||||
done
|
||||
|
||||
Text101b:
|
||||
GrandMasterCupClerkPlayerWonGrandFinalText:
|
||||
textfw "おめでとうございます"
|
||||
linefw "<RAMNAME>さん"
|
||||
linefw "つぎの グランドマスター杯も"
|
||||
linefw "また ゆうしょう してくださいね"
|
||||
done
|
||||
|
||||
Text101c:
|
||||
GrandMasterCupClerkEnterPromptText:
|
||||
textfw "グランドマスター杯にさんかしますか?"
|
||||
done
|
||||
|
||||
Text101d:
|
||||
GrandMasterCupClerkEnterAcceptedText:
|
||||
textfw "それでは"
|
||||
linefw "ファイナルホールへ どうぞ!"
|
||||
done
|
||||
|
||||
Text101e:
|
||||
GrandMasterCupClerkEnterDeclinedText:
|
||||
textfw "そうですか ざんねんですね"
|
||||
linefw "どうぞ また おこしください"
|
||||
done
|
||||
|
||||
@@ -2385,67 +2385,67 @@ MainMenuNewGameInsteadOfContinueDeletedText:
|
||||
textfw "すべてのデータをさくじょしました"
|
||||
done
|
||||
|
||||
PrologueScene1Line1Text:
|
||||
ProloguePlayerRecapLine1Text:
|
||||
textfw "<RAMNAME>は ポケモンカードを"
|
||||
linefw "あつめるのが だいすきです"
|
||||
done
|
||||
|
||||
PrologueScene1Line2Text:
|
||||
ProloguePlayerRecapLine2Text:
|
||||
textfw "<RAMNAME>は このしまにつたわる"
|
||||
linefw "伝説のポケモンカードを ゲットのため"
|
||||
done
|
||||
|
||||
PrologueScene1Line3Text:
|
||||
ProloguePlayerRecapLine3Text:
|
||||
textfw "8にんの クラブマスターと"
|
||||
linefw "伝説のポケモンカードを まもる"
|
||||
done
|
||||
|
||||
PrologueScene1Line4Text:
|
||||
ProloguePlayerRecapLine4Text:
|
||||
textfw "4にんの グランドマスターに"
|
||||
linefw "ちょうせんしたのでした・・・"
|
||||
done
|
||||
|
||||
PrologueScene1Line5Text:
|
||||
ProloguePlayerRecapLine5Text:
|
||||
textfw "そして ついには!"
|
||||
linefw "グランドマスターを たおして"
|
||||
done
|
||||
|
||||
PrologueScene1Line6Text:
|
||||
ProloguePlayerRecapLine6Text:
|
||||
textfw "4枚の 伝説のポケモンカードを"
|
||||
linefw "そのてに ゲットしたのです"
|
||||
done
|
||||
|
||||
PrologueScene1Line7Text:
|
||||
ProloguePlayerRecapLine7Text:
|
||||
textfw "そんな ある日・・・"
|
||||
linefw "じけんは おこりました!"
|
||||
done
|
||||
|
||||
PrologueScene2Line1Text:
|
||||
PrologueGRInvasionLine1Text:
|
||||
textfw "とつぜん"
|
||||
linefw "なぞのぐん団が おそってきたのです!"
|
||||
done
|
||||
|
||||
PrologueScene2Line2Text:
|
||||
PrologueGRInvasionLine2Text:
|
||||
textfw "その名を 「GR団」!"
|
||||
linefw "「グレートロケット団」と いいました"
|
||||
done
|
||||
|
||||
PrologueScene2Line3Text:
|
||||
PrologueGRInvasionLine3Text:
|
||||
textfw "「GR団」は クラブを こうげき!"
|
||||
linefw "カードを うばっていったのです!"
|
||||
done
|
||||
|
||||
PrologueScene3Line1Text:
|
||||
ProloguePlayerToLabLine1Text:
|
||||
textfw "もっていたカードを GR団に"
|
||||
linefw "うばわれた <RAMNAME>は"
|
||||
done
|
||||
|
||||
PrologueScene3Line2Text:
|
||||
ProloguePlayerToLabLine2Text:
|
||||
textfw "このことを しらせるため"
|
||||
linefw "ポケモンカードの 研究者である"
|
||||
done
|
||||
|
||||
PrologueScene3Line3Text:
|
||||
ProloguePlayerToLabLine3Text:
|
||||
textfw "Dr.オーヤマのいる 研究所へ"
|
||||
linefw "むかったのでした・・・"
|
||||
done
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
49
src/wram.asm
49
src/wram.asm
@@ -1189,7 +1189,7 @@ wCurGigashockItem:: ; cdf8
|
||||
; to be used by Metronome.
|
||||
wMetronomeSelectedAttack:: ; cdf9
|
||||
ds $2
|
||||
|
||||
|
||||
wBackupPlayerAreaHP:: ; cdfb
|
||||
ds MAX_PLAY_AREA_POKEMON
|
||||
|
||||
@@ -2285,6 +2285,9 @@ wd554:: ; d554
|
||||
wCurrentNPCDuelistData:: ; d555
|
||||
ds NPC_DUELIST_STRUCT_SIZE
|
||||
|
||||
; TODO: is this really union?
|
||||
UNION
|
||||
|
||||
wd561:: ; d561
|
||||
ds $1
|
||||
|
||||
@@ -2297,11 +2300,21 @@ wd563:: ; d563
|
||||
wd565:: ; d565
|
||||
ds $1
|
||||
|
||||
ds $f
|
||||
NEXTU
|
||||
|
||||
wNumBlackBoxInputPkmnPerType:: ; d561
|
||||
ds NUM_PKMN_TYPES
|
||||
|
||||
ENDU
|
||||
|
||||
ds $d
|
||||
|
||||
wFilteredListPtr:: ; d575
|
||||
ds $2
|
||||
|
||||
; TODO: is this really union?
|
||||
UNION
|
||||
|
||||
wRemainingIntroCards:: ; d577
|
||||
ds $1
|
||||
|
||||
@@ -2314,15 +2327,34 @@ wd579:: ; d579
|
||||
wIntroCardsRepeatsAllowed:: ; d57b
|
||||
ds $1
|
||||
|
||||
wd57c:: ; d57c
|
||||
NEXTU
|
||||
|
||||
wBlackBoxOutputCountCircle:: ; d577
|
||||
ds $1
|
||||
|
||||
wBlackBoxOutputCountDiamond:: ; d578
|
||||
ds $1
|
||||
|
||||
wBlackBoxOutputCountStar:: ; d579
|
||||
ds $1
|
||||
|
||||
ds $2
|
||||
|
||||
wd57e:: ; d57e
|
||||
wTempBlackBoxInputEvoLine:: ; d57c
|
||||
|
||||
wTempBlackBoxInputBasic:: ; d57c
|
||||
ds $2
|
||||
|
||||
wd580:: ; d580
|
||||
wTempBlackBoxInputStage1:: ; d57e
|
||||
ds $2
|
||||
|
||||
wTempBlackBoxInputStage2:: ; d580
|
||||
ds $2
|
||||
|
||||
wTempBlackBoxInputEvoLineEnd:: ; d582
|
||||
|
||||
ENDU
|
||||
|
||||
wd582:: ; d582
|
||||
ds $1
|
||||
|
||||
@@ -2418,6 +2450,8 @@ wEventVars:: ; d59e
|
||||
wGeneralVars:: ; d5d2
|
||||
ds GENERAL_VAR_BYTES
|
||||
|
||||
; various temp flags
|
||||
; e.g. blackbox input type flags, evo stage flags, etc.
|
||||
wd606:: ; d606
|
||||
ds wD606_STRUCT_SIZE
|
||||
|
||||
@@ -3373,7 +3407,7 @@ wMailOptionSelected:: ; dd5e
|
||||
|
||||
; card offsets. the cards mailed to you after using the Game Center black box
|
||||
wBlackBoxCardReceived:: ; dd5f
|
||||
ds BLACK_BOX_CARDS_BUFFER_SIZE
|
||||
ds BLACK_BOX_OUTPUT_BYTES
|
||||
|
||||
; card offset. the card mailed to you after using the Game Center Bill's PC
|
||||
wBillsPCCardReceived:: ; dd73
|
||||
@@ -3539,7 +3573,8 @@ w2d28e:: ; d28e
|
||||
w2d38e:: ; d38e
|
||||
ds $80
|
||||
|
||||
ds $180
|
||||
wAutoDecks:: ; d40e
|
||||
ds DECK_COMPRESSED_STRUCT_SIZE * NUM_AUTO_DECK_MACHINE_SLOTS
|
||||
|
||||
w2d58e:: ; d58e
|
||||
ds $80
|
||||
|
||||
@@ -2972,17 +2972,17 @@ vars = [
|
||||
"VAR_0D",
|
||||
"VAR_0E",
|
||||
"VAR_0F",
|
||||
"VAR_10",
|
||||
"VAR_11",
|
||||
"VAR_12",
|
||||
"VAR_13",
|
||||
"VAR_14",
|
||||
"VAR_15",
|
||||
"VAR_16",
|
||||
"VAR_17",
|
||||
"VAR_18",
|
||||
"VAR_19",
|
||||
"VAR_1A",
|
||||
"VAR_GRANDMASTERCUP_PRIZE_INDEX_0",
|
||||
"VAR_GRANDMASTERCUP_PRIZE_INDEX_1",
|
||||
"VAR_GRANDMASTERCUP_PRIZE_INDEX_2",
|
||||
"VAR_GRANDMASTERCUP_PRIZE_INDEX_3",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_0",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_1",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_2",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_3",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_4",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_5",
|
||||
"VAR_GRANDMASTERCUP_OPPONENT_DECK_6",
|
||||
"VAR_1B",
|
||||
"VAR_1C",
|
||||
"VAR_1D",
|
||||
@@ -2997,7 +2997,7 @@ vars = [
|
||||
"VAR_26",
|
||||
"VAR_27",
|
||||
"VAR_28",
|
||||
"VAR_29",
|
||||
"VAR_TCG_CHALLENGE_CUP_PRIZE_INDEX",
|
||||
"VAR_2A",
|
||||
"VAR_2B",
|
||||
"VAR_2C",
|
||||
@@ -3005,7 +3005,7 @@ vars = [
|
||||
"VAR_2E",
|
||||
"VAR_2F",
|
||||
"VAR_30",
|
||||
"VAR_31",
|
||||
"VAR_GR_CHALLENGE_CUP_PRIZE_INDEX",
|
||||
"VAR_32",
|
||||
"VAR_33",
|
||||
"VAR_34",
|
||||
|
||||
@@ -1198,7 +1198,8 @@ class Disassembler(object):
|
||||
opcode_arg_3 = rom[offset+3]
|
||||
|
||||
if opcode_nargs == 0:
|
||||
# handle cp16
|
||||
# handle cp16*
|
||||
# cp16 card_id
|
||||
if opcode_byte == 0x7a \
|
||||
and rom[offset+1] == 0xfe \
|
||||
and rom[offset+3] == 0x20 and rom[offset+4] == 0x03 \
|
||||
@@ -1207,6 +1208,61 @@ class Disassembler(object):
|
||||
card_id = (rom[offset+2] << 8) + rom[offset+7]
|
||||
opcode_output_str = "cp16 " + cards[card_id]
|
||||
opcode_nargs = 7
|
||||
# cp16 bc
|
||||
elif opcode_byte == 0x7a \
|
||||
and rom[offset+1] == 0xb8 \
|
||||
and rom[offset+2] == 0x20 and rom[offset+3] == 0x02 \
|
||||
and rom[offset+4] == 0x7b \
|
||||
and rom[offset+5] == 0xb9:
|
||||
opcode_output_str = "cp16 bc"
|
||||
opcode_nargs = 5
|
||||
# cp16_long
|
||||
elif opcode_byte == 0x7a \
|
||||
and rom[offset+1] == 0xfe \
|
||||
and rom[offset+3] == 0x38 and rom[offset+4] == 0x05 \
|
||||
and rom[offset+5] == 0x20 and rom[offset+6] == 0x03 \
|
||||
and rom[offset+7] == 0x7b \
|
||||
and rom[offset+8] == 0xfe:
|
||||
cp16val = (rom[offset+2] << 8) + rom[offset+9]
|
||||
opcode_output_str = "cp16_long ${:x}".format(cp16val)
|
||||
opcode_nargs = 9
|
||||
# cp16_long bc
|
||||
elif opcode_byte == 0x7a \
|
||||
and rom[offset+1] == 0xb8 \
|
||||
and rom[offset+2] == 0x38 and rom[offset+3] == 0x04 \
|
||||
and rom[offset+4] == 0x20 and rom[offset+5] == 0x02 \
|
||||
and rom[offset+6] == 0x7b \
|
||||
and rom[offset+7] == 0xb9:
|
||||
opcode_output_str = "cp16_long bc"
|
||||
opcode_nargs = 7
|
||||
# cp16bc_long
|
||||
elif opcode_byte == 0x78 \
|
||||
and rom[offset+1] == 0xb8 \
|
||||
and rom[offset+3] == 0x38 and rom[offset+4] == 0x05 \
|
||||
and rom[offset+5] == 0x20 and rom[offset+6] == 0x03 \
|
||||
and rom[offset+7] == 0x79 \
|
||||
and rom[offset+8] == 0xfe:
|
||||
cp16val = (rom[offset+2] << 8) + rom[offset+9]
|
||||
opcode_output_str = "cp16bc_long ${:x}".format(cp16val)
|
||||
opcode_nargs = 9
|
||||
# cp16bc_long de
|
||||
elif opcode_byte == 0x78 \
|
||||
and rom[offset+1] == 0xba \
|
||||
and rom[offset+2] == 0x38 and rom[offset+3] == 0x04 \
|
||||
and rom[offset+4] == 0x20 and rom[offset+5] == 0x02 \
|
||||
and rom[offset+6] == 0x79 \
|
||||
and rom[offset+7] == 0xbb:
|
||||
opcode_output_str = "cp16bc_long de"
|
||||
opcode_nargs = 7
|
||||
# cp16bc_long hl
|
||||
elif opcode_byte == 0x78 \
|
||||
and rom[offset+1] == 0xbc \
|
||||
and rom[offset+2] == 0x38 and rom[offset+3] == 0x04 \
|
||||
and rom[offset+4] == 0x20 and rom[offset+5] == 0x02 \
|
||||
and rom[offset+6] == 0x79 \
|
||||
and rom[offset+7] == 0xbd:
|
||||
opcode_output_str = "cp16bc_long hl"
|
||||
opcode_nargs = 7
|
||||
# handle cphl
|
||||
elif opcode_byte == 0x23 \
|
||||
and rom[offset+1] == 0x3a \
|
||||
@@ -1217,6 +1273,28 @@ class Disassembler(object):
|
||||
card_id = (rom[offset+3] << 8) + rom[offset+8]
|
||||
opcode_output_str = "cphl " + cards[card_id]
|
||||
opcode_nargs = 8
|
||||
# handle add_*_a
|
||||
# add_hl_a
|
||||
elif opcode_byte == 0x85 \
|
||||
and rom[offset+1] == 0x6f \
|
||||
and rom[offset+2] == 0x30 and rom[offset+3] == 0x01 \
|
||||
and rom[offset+4] == 0x24:
|
||||
opcode_output_str = "add_hl_a"
|
||||
opcode_nargs = 4
|
||||
# add_de_a
|
||||
elif opcode_byte == 0x83 \
|
||||
and rom[offset+1] == 0x5f \
|
||||
and rom[offset+2] == 0x30 and rom[offset+3] == 0x01 \
|
||||
and rom[offset+4] == 0x14:
|
||||
opcode_output_str = "add_de_a"
|
||||
opcode_nargs = 4
|
||||
# add_at_hl_a
|
||||
elif opcode_byte == 0x86 \
|
||||
and rom[offset+1] == 0x22 \
|
||||
and rom[offset+2] == 0x30 and rom[offset+3] == 0x01 \
|
||||
and rom[offset+4] == 0x34:
|
||||
opcode_output_str = "add_at_hl_a"
|
||||
opcode_nargs = 4
|
||||
else:
|
||||
# set output string simply as the opcode
|
||||
opcode_output_str = opcode_str
|
||||
|
||||
Reference in New Issue
Block a user