diff options
| author | shealyrd <esheal@outlook.com> | 2020-12-09 17:43:07 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-09 17:43:07 -0600 |
| commit | 4ec556cda4c32dbdbf1787813187515192a9cd37 (patch) | |
| tree | e58ab1a7b04427a7706176bb9adac8d0fdfdffaa /src/constants | |
| parent | 6c71c05f0e8a703c04f27dd73116c873ec3d61d7 (diff) | |
| parent | ec1e57b155d040beeb309a1524d496c6582da384 (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'src/constants')
| -rw-r--r-- | src/constants/animation_constants.asm | 4 | ||||
| -rw-r--r-- | src/constants/deck_ai_constants.asm | 122 | ||||
| -rw-r--r-- | src/constants/duel_constants.asm | 23 | ||||
| -rw-r--r-- | src/constants/name_constants.asm | 2 | ||||
| -rw-r--r-- | src/constants/npc_constants.asm | 27 | ||||
| -rw-r--r-- | src/constants/sfx_constants.asm | 1 | ||||
| -rw-r--r-- | src/constants/sprite_constants.asm | 77 |
7 files changed, 156 insertions, 100 deletions
diff --git a/src/constants/animation_constants.asm b/src/constants/animation_constants.asm index f326d5e..bdf93f8 100644 --- a/src/constants/animation_constants.asm +++ b/src/constants/animation_constants.asm @@ -6,6 +6,6 @@ ANIM_FURY_SWEEPES EQU $24 ; Special animations ANIM_SHOW_DAMAGE EQU $09 -ANIM_SHAKE1 EQU $fa +ANIM_SHAKE1 EQU $fa ANIM_SHAKE2 EQU $fb -ANIM_SHAKE3 EQU $fc
\ No newline at end of file +ANIM_SHAKE3 EQU $fc diff --git a/src/constants/deck_ai_constants.asm b/src/constants/deck_ai_constants.asm index ceae8ed..a0b87f7 100644 --- a/src/constants/deck_ai_constants.asm +++ b/src/constants/deck_ai_constants.asm @@ -1,61 +1,61 @@ -; wPreviousAIFlags and wCurrentAIFlags constants
-AI_FLAG_USED_PLUSPOWER EQU 1 << 0
-AI_FLAG_USED_SWITCH EQU 1 << 1
-AI_FLAG_USED_PROFESSOR_OAK EQU 1 << 2
-AI_FLAG_MODIFIED_HAND EQU 1 << 3
-AI_FLAG_USED_GUST_OF_WIND EQU 1 << 4
-
-; used as input for AIProcessEnergyCards to determine what to check
-; and whether to play card after the routine is over.
-; I suspect AI_ENERGY_FLAG_DONT_PLAY to be a flag to signal the routine
-; not to actually play the energy card after it's finished,
-; but AIProcessEnergyCards checks whether ANY flag is set in order
-; to decide not to play it, so it's redundant in the presence of another flag.
-AI_ENERGY_FLAG_DONT_PLAY EQU 1 << 0 ; whether to play energy card (?)
-AI_ENERGY_FLAG_SKIP_EVOLUTION EQU 1 << 1 ; whether to check if card has evolutions
-AI_ENERGY_FLAG_SKIP_ARENA_CARD EQU 1 << 7 ; whether to include Arena card in determining which card to attach energy
-
-; used to determine which Trainer cards for AI
-; to process in AIProcessHandTrainerCards.
-; these go in chronological order, except for
-; AI_TRAINER_CARD_PHASE_14 which happens just before AI attacks.
-; AI_TRAINER_CARD_PHASE_15 is reserved for Professor Oak card.
-; if Professor Oak is played, all other Trainer card phases
-; are processed again except AI_TRAINER_CARD_PHASE_15.
- const_def 1
- const AI_TRAINER_CARD_PHASE_01 ; $1
- const AI_TRAINER_CARD_PHASE_02 ; $2
- const AI_TRAINER_CARD_PHASE_03 ; $3
- const AI_TRAINER_CARD_PHASE_04 ; $4
- const AI_TRAINER_CARD_PHASE_05 ; $5
- const AI_TRAINER_CARD_PHASE_06 ; $6
- const AI_TRAINER_CARD_PHASE_07 ; $7
- const AI_TRAINER_CARD_PHASE_08 ; $8
- const AI_TRAINER_CARD_PHASE_09 ; $9
- const AI_TRAINER_CARD_PHASE_10 ; $a
- const AI_TRAINER_CARD_PHASE_11 ; $b
- const AI_TRAINER_CARD_PHASE_12 ; $c
- const AI_TRAINER_CARD_PHASE_13 ; $d
- const AI_TRAINER_CARD_PHASE_14 ; $e, just before attack
- const AI_TRAINER_CARD_PHASE_15 ; $f, for Professor Oak
-
-; used by wAIBarrierFlagCounter to determine
-; whether Player is running Mewtwo1 mill deck.
-; flag set means true, flag not set means false.
-AI_FLAG_MEWTWO_MILL EQU 1 << 7
-
-; defines the behaviour of HandleAIEnergyTrans, for determining
-; whether to move energy cards from the Bench to the Arena or vice-versa
-; and the number of energy cards needed for achieving that.
-AI_ENERGY_TRANS_RETREAT EQU $9 ; moves energy cards needed for Retreat Cost
-AI_ENERGY_TRANS_ATTACK EQU $d ; moves energy cards needed for second attack
-AI_ENERGY_TRANS_TO_BENCH EQU $e ; moves energy cards away from Arena card
-
-; used to know which AI routine to call in
-; the AIAction pointer tables in AIDoAction
- const_def 1
- const AIACTION_DO_TURN ; $1
- const AIACTION_START_DUEL ; $2
- const AIACTION_FORCED_SWITCH ; $3
- const AIACTION_KO_SWITCH ; $4
- const AIACTION_TAKE_PRIZE ; $5
+; wPreviousAIFlags and wCurrentAIFlags constants +AI_FLAG_USED_PLUSPOWER EQU 1 << 0 +AI_FLAG_USED_SWITCH EQU 1 << 1 +AI_FLAG_USED_PROFESSOR_OAK EQU 1 << 2 +AI_FLAG_MODIFIED_HAND EQU 1 << 3 +AI_FLAG_USED_GUST_OF_WIND EQU 1 << 4 + +; used as input for AIProcessEnergyCards to determine what to check +; and whether to play card after the routine is over. +; I suspect AI_ENERGY_FLAG_DONT_PLAY to be a flag to signal the routine +; not to actually play the energy card after it's finished, +; but AIProcessEnergyCards checks whether ANY flag is set in order +; to decide not to play it, so it's redundant in the presence of another flag. +AI_ENERGY_FLAG_DONT_PLAY EQU 1 << 0 ; whether to play energy card (?) +AI_ENERGY_FLAG_SKIP_EVOLUTION EQU 1 << 1 ; whether to check if card has evolutions +AI_ENERGY_FLAG_SKIP_ARENA_CARD EQU 1 << 7 ; whether to include Arena card in determining which card to attach energy + +; used to determine which Trainer cards for AI +; to process in AIProcessHandTrainerCards. +; these go in chronological order, except for +; AI_TRAINER_CARD_PHASE_14 which happens just before AI attacks. +; AI_TRAINER_CARD_PHASE_15 is reserved for Professor Oak card. +; if Professor Oak is played, all other Trainer card phases +; are processed again except AI_TRAINER_CARD_PHASE_15. + const_def 1 + const AI_TRAINER_CARD_PHASE_01 ; $1 + const AI_TRAINER_CARD_PHASE_02 ; $2 + const AI_TRAINER_CARD_PHASE_03 ; $3 + const AI_TRAINER_CARD_PHASE_04 ; $4 + const AI_TRAINER_CARD_PHASE_05 ; $5 + const AI_TRAINER_CARD_PHASE_06 ; $6 + const AI_TRAINER_CARD_PHASE_07 ; $7 + const AI_TRAINER_CARD_PHASE_08 ; $8 + const AI_TRAINER_CARD_PHASE_09 ; $9 + const AI_TRAINER_CARD_PHASE_10 ; $a + const AI_TRAINER_CARD_PHASE_11 ; $b + const AI_TRAINER_CARD_PHASE_12 ; $c + const AI_TRAINER_CARD_PHASE_13 ; $d + const AI_TRAINER_CARD_PHASE_14 ; $e, just before attack + const AI_TRAINER_CARD_PHASE_15 ; $f, for Professor Oak + +; used by wAIBarrierFlagCounter to determine +; whether Player is running Mewtwo1 mill deck. +; flag set means true, flag not set means false. +AI_FLAG_MEWTWO_MILL EQU 1 << 7 + +; defines the behaviour of HandleAIEnergyTrans, for determining +; whether to move energy cards from the Bench to the Arena or vice-versa +; and the number of energy cards needed for achieving that. +AI_ENERGY_TRANS_RETREAT EQU $9 ; moves energy cards needed for Retreat Cost +AI_ENERGY_TRANS_ATTACK EQU $d ; moves energy cards needed for second attack +AI_ENERGY_TRANS_TO_BENCH EQU $e ; moves energy cards away from Arena card + +; used to know which AI routine to call in +; the AIAction pointer tables in AIDoAction + const_def 1 + const AIACTION_DO_TURN ; $1 + const AIACTION_START_DUEL ; $2 + const AIACTION_FORCED_SWITCH ; $3 + const AIACTION_KO_SWITCH ; $4 + const AIACTION_TAKE_PRIZE ; $5 diff --git a/src/constants/duel_constants.asm b/src/constants/duel_constants.asm index 344cff1..928e78c 100644 --- a/src/constants/duel_constants.asm +++ b/src/constants/duel_constants.asm @@ -118,8 +118,15 @@ PARALYZED EQU $03 POISONED EQU $80 DOUBLE_POISONED EQU $c0 -CNF_SLP_PRZ EQU $0f ; confused, asleep or paralyzed -PSN_DBLPSN EQU $f0 ; poisoned or double poisoned + +DOUBLE_POISONED_F EQU 6 +POISONED_F EQU 7 + + +CNF_SLP_PRZ EQU $0f ; confused, asleep or paralyzed +PSN_DBLPSN EQU $f0 ; poisoned or double poisoned +PSN_DAMAGE EQU 10 +DBLPSN_DAMAGE EQU 20 ; substatus conditions (DUELVARS_ARENA_CARD_SUBSTATUS*) @@ -227,9 +234,9 @@ EFFECT_FAILED_UNSUCCESSFUL EQU $02 ; wAnimationQueue length ANIMATION_QUEUE_LENGTH EQU 7 -PRIZES_1 EQU $01 -PRIZES_2 EQU $02 -PRIZES_3 EQU $03 -PRIZES_4 EQU $04 -PRIZES_5 EQU $05 -PRIZES_6 EQU $06 +PRIZES_1 EQU $01 +PRIZES_2 EQU $02 +PRIZES_3 EQU $03 +PRIZES_4 EQU $04 +PRIZES_5 EQU $05 +PRIZES_6 EQU $06 diff --git a/src/constants/name_constants.asm b/src/constants/name_constants.asm index 7d4370c..7728cca 100644 --- a/src/constants/name_constants.asm +++ b/src/constants/name_constants.asm @@ -3,4 +3,4 @@ NAME_BUFFER_LENGTH EQU 16 MAX_PLAYER_NAME_LENGTH EQU 6 * 2 MAX_DECK_NAME_LENGTH EQU 20 * 1 ; note that its unit is byte! -NAMING_SCREEN_BUFFER_LENGTH EQU 24
\ No newline at end of file +NAMING_SCREEN_BUFFER_LENGTH EQU 24 diff --git a/src/constants/npc_constants.asm b/src/constants/npc_constants.asm index eb7b75b..4a64993 100644 --- a/src/constants/npc_constants.asm +++ b/src/constants/npc_constants.asm @@ -18,19 +18,19 @@ LOADED_NPC_LENGTH EQU const_value ; npc_struct constants const_def - const NPC_TRAINER_ID - const NPC_DATA_FIELD_01 ; 01-03 Seem to relate to sprites - const NPC_DATA_FIELD_02 + const NPC_DATA_ID + const NPC_DATA_SPRITE_ID + const NPC_DATA_FIELD_02 ; 02-04 Seem to relate to sprites const NPC_DATA_FIELD_03 const NPC_DATA_FIELD_04 - const NPC_DATA_OWSEQUENCE_PTR + const NPC_DATA_SCRIPT_PTR const_value = const_value+1 const NPC_DATA_NAME_TEXT const_value = const_value+1 - const NPC_DATA_BATTLE_PICTURE - const NPC_DATA_FIELD_0A - const NPC_DATA_FIELD_0B - const NPC_DATA_FIELD_0C + const NPC_DATA_DUELIST_PICTURE + const NPC_DATA_DECK_ID + const NPC_DATA_DUEL_THEME_ID + const NPC_DATA_MATCH_START_ID NPC_DATA_LENGTH EQU const_value const_def 1 @@ -81,8 +81,8 @@ NPC_DATA_LENGTH EQU const_value const NPC_RONALD1 ; $02 const NPC_ISHIHARA ; $03 const NPC_IMAKUNI ; $04 -const_value = const_value+1 ; DRMASON duplicate -const_value = const_value+1 ; DRMASON duplicate + const NPC_05 ; $05 (unused) + const NPC_06 ; $06 (unused) const NPC_SAM ; $07 const NPC_TECH1 ; $08 const NPC_TECH2 ; $09 @@ -186,10 +186,9 @@ const_value = const_value+1 ; DRMASON duplicate const NPC_LEGENDARY_CARD_BOTTOM_LEFT ; $6b const NPC_LEGENDARY_CARD_BOTTOM_RIGHT ; $6c const NPC_LEGENDARY_CARD_RIGHT_SPARK ; $6d - const NPC_11F49 ; $6e -const_value = const_value+1 ; NPC_11F49 duplicate + const NPC_6E ; $6e (unused) + const NPC_6F ; $6f (unused) const NPC_MURRAY2 ; $70 const NPC_RONALD2 ; $71 const NPC_RONALD3 ; $72 -const_value = const_value+1 ; NPC_11f49 duplicate - + const NPC_73 ; $73 (unused) diff --git a/src/constants/sfx_constants.asm b/src/constants/sfx_constants.asm index 4745260..0a99f25 100644 --- a/src/constants/sfx_constants.asm +++ b/src/constants/sfx_constants.asm @@ -95,4 +95,3 @@ const SFX_5D ; $5d const SFX_5E ; $5e const SFX_5F ; $5f - diff --git a/src/constants/sprite_constants.asm b/src/constants/sprite_constants.asm index dc051d9..df7abd9 100644 --- a/src/constants/sprite_constants.asm +++ b/src/constants/sprite_constants.asm @@ -3,20 +3,71 @@ SPRITE_ANIM_BUFFER_CAPACITY EQU 16 ; sprites ; sprite_anim_struct constants const_def - const SPRITE_ANIM_FIELD_00 - const SPRITE_ANIM_FIELD_01 + const SPRITE_ANIM_ENABLED + const SPRITE_ANIM_ATTRIBUTES const SPRITE_ANIM_COORD_X const SPRITE_ANIM_COORD_Y const SPRITE_ANIM_TILE_ID - const SPRITE_ANIM_FIELD_05 - const SPRITE_ANIM_FIELD_06 - const SPRITE_ANIM_FIELD_07 - const SPRITE_ANIM_FIELD_08 - const SPRITE_ANIM_FIELD_09 - const SPRITE_ANIM_FIELD_0A - const SPRITE_ANIM_FIELD_0B - const SPRITE_ANIM_FIELD_0C - const SPRITE_ANIM_FIELD_0D - const SPRITE_ANIM_MOVEMENT_COUNTER - const SPRITE_ANIM_FIELD_0F + const SPRITE_ANIM_ID + const SPRITE_ANIM_BANK + const SPRITE_ANIM_POINTER +const_value = const_value+1 ; pointer + const SPRITE_ANIM_FRAME_OFFSET_POINTER +const_value = const_value+1 ; pointer + const SPRITE_ANIM_FRAME_BANK + const SPRITE_ANIM_FRAME_DATA_POINTER +const_value = const_value+1 ; pointer + const SPRITE_ANIM_COUNTER + const SPRITE_ANIM_FLAGS SPRITE_ANIM_LENGTH EQU const_value + +; SPRITE_ANIM_FLAGS values + const_def + const SPRITE_ANIM_FLAG_X_SUBTRACT + const SPRITE_ANIM_FLAG_Y_SUBTRACT + const SPRITE_ANIM_FLAG_SPEED + const SPRITE_ANIM_FLAG_3 + const SPRITE_ANIM_FLAG_4 + const SPRITE_ANIM_FLAG_5 + const SPRITE_ANIM_FLAG_6 + const SPRITE_ANIM_FLAG_SKIP_DRAW + +SPRITE_FRAME_OFFSET_SIZE EQU 4 + + const_def 1 + const SPRITE_RONALD ; $01 + const SPRITE_DRMASON ; $02 + const SPRITE_ISHIHARA ; $03 + const SPRITE_IMAKUNI ; $04 + const SPRITE_NIKKI ; $05 + const SPRITE_RICK ; $06 + const SPRITE_KEN ; $07 + const SPRITE_AMY ; $08 + const SPRITE_ISAAC ; $09 + const SPRITE_MITCH ; $0A + const SPRITE_GENE ; $0B + const SPRITE_MURRAY ; $0C + const SPRITE_COURTNEY ; $0D + const SPRITE_STEVE ; $0E + const SPRITE_JACK ; $0F + const SPRITE_ROD ; $10 + const SPRITE_BOY1 ; $11 + const SPRITE_BOY2 ; $12 + const SPRITE_BOY3 ; $13 + const SPRITE_BUTCH ; $14 + const SPRITE_BOY4 ; $15 + const SPRITE_JOSHUA ; $16 + const SPRITE_BOY5 ; $17 + const SPRITE_TECH ; $18 + const SPRITE_CHAP ; $19 + const SPRITE_GUIDE ; $1A + const SPRITE_PAPPY ; $1B + const SPRITE_GIRL1 ; $1C + const SPRITE_GIRL2 ; $1D + const SPRITE_GIRL3 ; $1E + const SPRITE_GIRL4 ; $1F + const SPRITE_GIRL5 ; $20 + const SPRITE_CLERK ; $21 + const SPRITE_HOST ; $22 + const SPRITE_WOMAN ; $23 + const SPRITE_GRANNY ; $24 |
