From 20ebfd079f1331af5cc4f0edea35163b5b35612d Mon Sep 17 00:00:00 2001 From: vulcandth Date: Wed, 28 Dec 2022 21:47:27 -0600 Subject: Add table assertion to `TrainerDataPointers` (#403) * Add table assertion to `TrainerDataPointers` * Add table assertion to `TrainerNamePointers` --- data/trainers/name_pointers.asm | 2 ++ data/trainers/parties.asm | 2 ++ 2 files changed, 4 insertions(+) (limited to 'data') diff --git a/data/trainers/name_pointers.asm b/data/trainers/name_pointers.asm index 6317f54a..914fe9d4 100644 --- a/data/trainers/name_pointers.asm +++ b/data/trainers/name_pointers.asm @@ -2,6 +2,7 @@ TrainerNamePointers: ; These are only used for trainers' defeat speeches. ; They were originally shortened variants of the trainer class names ; in the Japanese versions, but are now redundant with TrainerNames. + table_width 2, TrainerNamePointers dw .YoungsterName dw .BugCatcherName dw .LassName @@ -49,6 +50,7 @@ TrainerNamePointers: dw wTrainerName dw wTrainerName dw wTrainerName + assert_table_length NUM_TRAINERS .YoungsterName: db "YOUNGSTER@" .BugCatcherName: db "BUG CATCHER@" diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm index dddcf653..b2ad5e08 100644 --- a/data/trainers/parties.asm +++ b/data/trainers/parties.asm @@ -1,4 +1,5 @@ TrainerDataPointers: + table_width 2, TrainerDataPointers dw YoungsterData dw BugCatcherData dw LassData @@ -46,6 +47,7 @@ TrainerDataPointers: dw ChannelerData dw AgathaData dw LanceData + assert_table_length NUM_TRAINERS ; if first byte != $FF, then ; first byte is level (of all pokemon on this team) -- cgit v1.3.1-sl0p From e076ee0a40b2a21183e2cc535519e64b706b5407 Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Wed, 28 Dec 2022 21:48:55 -0600 Subject: Add list assertion to TrainerNames --- data/trainers/names.asm | 96 +++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 47 deletions(-) (limited to 'data') diff --git a/data/trainers/names.asm b/data/trainers/names.asm index d8e1f550..dc6ded77 100644 --- a/data/trainers/names.asm +++ b/data/trainers/names.asm @@ -1,48 +1,50 @@ TrainerNames:: - db "YOUNGSTER@" - db "BUG CATCHER@" - db "LASS@" - db "SAILOR@" - db "JR.TRAINER♂@" - db "JR.TRAINER♀@" - db "POKéMANIAC@" - db "SUPER NERD@" - db "HIKER@" - db "BIKER@" - db "BURGLAR@" - db "ENGINEER@" - db "JUGGLER@" - db "FISHERMAN@" - db "SWIMMER@" - db "CUE BALL@" - db "GAMBLER@" - db "BEAUTY@" - db "PSYCHIC@" - db "ROCKER@" - db "JUGGLER@" - db "TAMER@" - db "BIRD KEEPER@" - db "BLACKBELT@" - db "RIVAL1@" - db "PROF.OAK@" - db "CHIEF@" - db "SCIENTIST@" - db "GIOVANNI@" - db "ROCKET@" - db "COOLTRAINER♂@" - db "COOLTRAINER♀@" - db "BRUNO@" - db "BROCK@" - db "MISTY@" - db "LT.SURGE@" - db "ERIKA@" - db "KOGA@" - db "BLAINE@" - db "SABRINA@" - db "GENTLEMAN@" - db "RIVAL2@" - db "RIVAL3@" - db "LORELEI@" - db "CHANNELER@" - db "AGATHA@" - db "LANCE@" + list_start TrainerNames + li "YOUNGSTER" + li "BUG CATCHER" + li "LASS" + li "SAILOR" + li "JR.TRAINER♂" + li "JR.TRAINER♀" + li "POKéMANIAC" + li "SUPER NERD" + li "HIKER" + li "BIKER" + li "BURGLAR" + li "ENGINEER" + li "JUGGLER" + li "FISHERMAN" + li "SWIMMER" + li "CUE BALL" + li "GAMBLER" + li "BEAUTY" + li "PSYCHIC" + li "ROCKER" + li "JUGGLER" + li "TAMER" + li "BIRD KEEPER" + li "BLACKBELT" + li "RIVAL1" + li "PROF.OAK" + li "CHIEF" + li "SCIENTIST" + li "GIOVANNI" + li "ROCKET" + li "COOLTRAINER♂" + li "COOLTRAINER♀" + li "BRUNO" + li "BROCK" + li "MISTY" + li "LT.SURGE" + li "ERIKA" + li "KOGA" + li "BLAINE" + li "SABRINA" + li "GENTLEMAN" + li "RIVAL2" + li "RIVAL3" + li "LORELEI" + li "CHANNELER" + li "AGATHA" + li "LANCE" + assert_list_length NUM_TRAINERS -- cgit v1.3.1-sl0p From a76ae055cc306f922e84d546b2f54f32e35a6a11 Mon Sep 17 00:00:00 2001 From: RainbowMetalPigeon <118711812+RainbowMetalPigeon@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:28:55 -0700 Subject: Dex weights are in tenths of a pound --- data/pokemon/dex_entries.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/pokemon/dex_entries.asm b/data/pokemon/dex_entries.asm index c99087e2..ceb431b7 100644 --- a/data/pokemon/dex_entries.asm +++ b/data/pokemon/dex_entries.asm @@ -194,7 +194,7 @@ PokedexEntryPointers: ; string: species name ; height in feet, inches -; weight in pounds +; weight in tenths of a pound ; text entry RhydonDexEntry: -- cgit v1.3.1-sl0p From 17eaf761e38cea827320f984cfaaa1527276ab15 Mon Sep 17 00:00:00 2001 From: Vortyne <104168801+Vortyne@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:31:59 -0400 Subject: Name some unnamed animation constants (#396) --- constants/move_constants.asm | 14 +++++++------- data/moves/animations.asm | 4 ++-- engine/battle/core.asm | 4 ++-- engine/battle/effects.asm | 16 ++++++++-------- engine/battle/trainer_ai.asm | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'data') diff --git a/constants/move_constants.asm b/constants/move_constants.asm index 570be95e..3376c1af 100644 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -178,14 +178,14 @@ DEF NUM_ATTACKS EQU const_value - 1 const SHOWPIC_ANIM const STATUS_AFFECTED_ANIM const ANIM_A8 - const ANIM_A9 + const ENEMY_HUD_SHAKE_ANIM const TRADE_BALL_DROP_ANIM const TRADE_BALL_SHAKE_ANIM const TRADE_BALL_TILT_ANIM const TRADE_BALL_POOF_ANIM const XSTATITEM_ANIM ; use X Attack/Defense/Speed/Special - const ANIM_AF - const ANIM_B0 + const XSTATITEM_DUPLICATE_ANIM + const SHRINKING_SQUARE_ANIM const ANIM_B1 const ANIM_B2 const ANIM_B3 @@ -197,18 +197,18 @@ DEF NUM_ATTACKS EQU const_value - 1 const ANIM_B9 const BURN_PSN_ANIM ; Plays when a monster is burned or poisoned const ANIM_BB - const ANIM_BC + const SLP_PLAYER_ANIM const SLP_ANIM ; sleeping monster - const ANIM_BE + const CONF_PLAYER_ANIM const CONF_ANIM ; confused monster - const ANIM_C0 + const SLIDE_DOWN_ANIM const TOSS_ANIM ; toss Poké Ball const SHAKE_ANIM ; shaking Poké Ball when catching monster const POOF_ANIM ; puff of smoke const BLOCKBALL_ANIM ; trainer knocks away Poké Ball const GREATTOSS_ANIM ; toss Great Ball const ULTRATOSS_ANIM ; toss Ultra Ball or Master Ball - const ANIM_C7 + const SHAKE_SCREEN_ANIM const HIDEPIC_ANIM ; monster disappears const ROCK_ANIM ; throw rock const BAIT_ANIM ; throw bait diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 0a8db8f5..29a78477 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -192,7 +192,7 @@ AttackAnimationPointers: dw SleepEnemyAnim dw ConfusedPlayerAnim dw ConfusedEnemyAnim - dw FaintAnim + dw SlideDownAnim dw BallTossAnim dw BallShakeAnim dw BallPoofAnim @@ -1263,7 +1263,7 @@ BallBlockAnim: battle_anim NO_MOVE, SUBANIM_0_BALL_BLOCK, 0, 3 db -1 ; end -FaintAnim: +SlideDownAnim: battle_anim DIG, SE_SLIDE_MON_DOWN db -1 ; end diff --git a/engine/battle/core.asm b/engine/battle/core.asm index f84b759c..4a0263e2 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3327,7 +3327,7 @@ CheckPlayerStatusConditions: ; fast asleep xor a ld [wAnimationType], a - ld a, SLP_ANIM - 1 + ld a, SLP_PLAYER_ANIM call PlayMoveAnimation ld hl, FastAsleepText call PrintText @@ -3411,7 +3411,7 @@ CheckPlayerStatusConditions: call PrintText xor a ld [wAnimationType], a - ld a, CONF_ANIM - 1 + ld a, CONF_PLAYER_ANIM call PlayMoveAnimation call BattleRandom cp 50 percent + 1 ; chance to hurt itself diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index c68d6731..aaaf20d0 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -123,12 +123,12 @@ PoisonEffect: dec de ldh a, [hWhoseTurn] and a - ld b, ANIM_C7 + ld b, SHAKE_SCREEN_ANIM ld hl, wPlayerBattleStatus3 ld a, [de] ld de, wPlayerToxicCounter jr nz, .ok - ld b, ANIM_A9 + ld b, ENEMY_HUD_SHAKE_ANIM ld hl, wEnemyBattleStatus3 ld de, wEnemyToxicCounter .ok @@ -232,14 +232,14 @@ FreezeBurnParalyzeEffect: ld a, 1 << PAR ld [wEnemyMonStatus], a call QuarterSpeedDueToParalysis ; quarter speed of affected mon - ld a, ANIM_A9 + ld a, ENEMY_HUD_SHAKE_ANIM call PlayBattleAnimation jp PrintMayNotAttackText ; print paralysis text .burn1 ld a, 1 << BRN ld [wEnemyMonStatus], a call HalveAttackDueToBurn ; halve attack of affected mon - ld a, ANIM_A9 + ld a, ENEMY_HUD_SHAKE_ANIM call PlayBattleAnimation ld hl, BurnedText jp PrintText @@ -247,7 +247,7 @@ FreezeBurnParalyzeEffect: call ClearHyperBeam ; resets hyper beam (recharge) condition from target ld a, 1 << FRZ ld [wEnemyMonStatus], a - ld a, ANIM_A9 + ld a, ENEMY_HUD_SHAKE_ANIM call PlayBattleAnimation ld hl, FrozenText jp PrintText @@ -802,7 +802,7 @@ ThrashPetalDanceEffect: inc a ld [de], a ; set thrash/petal dance counter to 2 or 3 at random ldh a, [hWhoseTurn] - add ANIM_B0 + add SHRINKING_SQUARE_ANIM jp PlayBattleAnimation2 SwitchAndTeleportEffect: @@ -1002,7 +1002,7 @@ ChargeEffect: jr z, .chargeEffect ld hl, wEnemyBattleStatus1 ld de, wEnemyMoveEffect - ld b, ANIM_AF + ld b, XSTATITEM_DUPLICATE_ANIM .chargeEffect set CHARGING_UP, [hl] ld a, [de] @@ -1016,7 +1016,7 @@ ChargeEffect: cp DIG jr nz, .notDigOrFly set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig) - ld b, ANIM_C0 + ld b, SLIDE_DOWN_ANIM .notDigOrFly xor a ld [wAnimationType], a diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index 2ef60f5b..e21a3492 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -713,7 +713,7 @@ AIIncreaseStat: ld a, [hl] push af push hl - ld a, ANIM_AF + ld a, XSTATITEM_DUPLICATE_ANIM ld [hli], a ld [hl], b callfar StatModifierUpEffect -- cgit v1.3.1-sl0p