From 826e070f0443b50ff31a49b4faf7c66577f1e26e Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 3 Nov 2020 10:13:06 -0500 Subject: [PATCH] More syncing with pokegold --- constants/mart_constants.asm | 1 + constants/trainer_constants.asm | 4 ++-- data/items/marts.asm | 1 - engine/battle/effect_commands.asm | 12 +++++++----- engine/battle/move_effects/belly_drum.asm | 2 +- engine/battle/used_move_text.asm | 1 - engine/events/shuckle.asm | 2 +- engine/events/specials.asm | 5 ++--- engine/games/slot_machine.asm | 4 ++-- engine/items/mart.asm | 2 +- engine/pokemon/level_up_happiness.asm | 2 +- maps/DanceTheatre.asm | 14 +++++++------- maps/Route29.asm | 2 +- maps/Route35GoldenrodGate.asm | 6 +++--- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/constants/mart_constants.asm b/constants/mart_constants.asm index c4834f524..957211427 100644 --- a/constants/mart_constants.asm +++ b/constants/mart_constants.asm @@ -42,3 +42,4 @@ const MART_MT_MOON const MART_INDIGO_PLATEAU const MART_UNDERGROUND +NUM_MARTS EQU const_value diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 4d45b7a11..6b1e1c52b 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -655,8 +655,8 @@ KRIS EQU __trainer_class__ const ALLAN trainerclass KIMONO_GIRL ; 3c - const NAOKO1 - const NAOKO2 + const NAOKO_UNUSED + const NAOKO const SAYO const ZUKI const KUNI diff --git a/data/items/marts.asm b/data/items/marts.asm index 1d48ea532..37bf846b4 100644 --- a/data/items/marts.asm +++ b/data/items/marts.asm @@ -34,7 +34,6 @@ Marts: dw MartMtMoon dw MartIndigoPlateau dw MartUnderground -.End MartCherrygrove: db 4 ; # items diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 14f1afd82..53d1d9ff0 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -3652,17 +3652,17 @@ BattleCommand_SleepTarget: jr nz, .fail call AnimateCurrentMove - ld b, $7 + ld b, SLP ld a, [wInBattleTowerBattle] and a jr z, .random_loop - ld b, $3 + ld b, %011 .random_loop call BattleRandom and b jr z, .random_loop - cp 7 + cp SLP jr z, .random_loop inc a ld [de], a @@ -5714,7 +5714,8 @@ BattleCommand_Charge: text_far _BattleDugText text_end -BattleCommand_Unused3C: ; unreferenced +BattleCommand_Unused3C: +; effect0x3c ret BattleCommand_TrapTarget: @@ -6488,7 +6489,8 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm" INCLUDE "engine/battle/move_effects/rollout.asm" -BattleCommand_Unused5D: ; unreferenced +BattleCommand_Unused5D: +; effect0x5d ret INCLUDE "engine/battle/move_effects/fury_cutter.asm" diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm index ac415f576..912f702bd 100644 --- a/engine/battle/move_effects/belly_drum.asm +++ b/engine/battle/move_effects/belly_drum.asm @@ -17,7 +17,7 @@ BattleCommand_BellyDrum: pop bc callfar SubtractHPFromUser call UpdateUserInParty - ld a, 5 + ld a, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1 .max_attack_loop push af diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm index 605c48e30..c53378907 100644 --- a/engine/battle/used_move_text.asm +++ b/engine/battle/used_move_text.asm @@ -1,5 +1,4 @@ DisplayUsedMoveText: -; battle command 03 ld hl, UsedMoveText call BattleTextbox jp WaitBGMap diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm index 85bcce629..3a5f872e2 100644 --- a/engine/events/shuckle.asm +++ b/engine/events/shuckle.asm @@ -15,7 +15,7 @@ GiveShuckle: jr nc, .NotGiven ; Caught data. - ld b, 0 + ld b, CAUGHT_BY_UNKNOWN farcall SetGiftPartyMonCaughtData ; Holding a Berry. diff --git a/engine/events/specials.asm b/engine/events/specials.asm index 1333f27ce..f49d358f4 100644 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -87,13 +87,12 @@ NameRival: ld b, NAME_RIVAL ld de, wRivalName farcall _NamingScreen - ; default to "SILVER" ld hl, wRivalName - ld de, .default + ld de, .DefaultName call InitName ret -.default +.DefaultName: db "SILVER@" NameRater: diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 2688995b4..8962f4424 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -206,7 +206,7 @@ SlotsLoop: ld a, [wFirstTwoReelsMatchingSevens] and a jr nz, .matching_sevens - ld a, %11100100 ; alternates two palettes + ld a, %11100100 call DmgToCgbBGPals ret @@ -215,7 +215,7 @@ SlotsLoop: and $7 ret nz ldh a, [rBGP] - xor %00001100 + xor %00001100 ; alternates two palettes call DmgToCgbBGPals ret diff --git a/engine/items/mart.asm b/engine/items/mart.asm index b74fa79a6..875e6d5cc 100644 --- a/engine/items/mart.asm +++ b/engine/items/mart.asm @@ -113,7 +113,7 @@ LoadMartPointer: GetMart: ld a, e - cp (Marts.End - Marts) / 2 + cp NUM_MARTS jr c, .IsAMart ld b, BANK(DefaultMart) ld de, DefaultMart diff --git a/engine/pokemon/level_up_happiness.asm b/engine/pokemon/level_up_happiness.asm index 533399d9f..3dac4e671 100644 --- a/engine/pokemon/level_up_happiness.asm +++ b/engine/pokemon/level_up_happiness.asm @@ -3,7 +3,7 @@ LevelUpHappinessMod: ld hl, wPartyMon1CaughtLocation call GetPartyLocation ld a, [hl] - and $7f + and CAUGHT_LOCATION_MASK ld d, a ld a, [wMapGroup] ld b, a diff --git a/maps/DanceTheatre.asm b/maps/DanceTheatre.asm index 2853ca5c8..fa3597977 100644 --- a/maps/DanceTheatre.asm +++ b/maps/DanceTheatre.asm @@ -14,13 +14,13 @@ DanceTheatre_MapScripts: def_callbacks -TrainerKimonoGirlNaoko2: - trainer KIMONO_GIRL, NAOKO2, EVENT_BEAT_KIMONO_GIRL_NAOKO, KimonoGirlNaoko2SeenText, KimonoGirlNaoko2BeatenText, 0, .Script +TrainerKimonoGirlNaoko: + trainer KIMONO_GIRL, NAOKO, EVENT_BEAT_KIMONO_GIRL_NAOKO, KimonoGirlNaokoSeenText, KimonoGirlNaokoBeatenText, 0, .Script .Script: endifjustbattled opentext - writetext KimonoGirlNaoko2AfterBattleText + writetext KimonoGirlNaokoAfterBattleText waitbutton closetext end @@ -135,18 +135,18 @@ DanceTheatreGrannyScript: DanceTheatreFancyPanel: jumptext DanceTheatreFancyPanelText -KimonoGirlNaoko2SeenText: +KimonoGirlNaokoSeenText: text "You have lovely" line "#MON. May I see" cont "them in battle?" done -KimonoGirlNaoko2BeatenText: +KimonoGirlNaokoBeatenText: text "Oh, you are very" line "strong." done -KimonoGirlNaoko2AfterBattleText: +KimonoGirlNaokoAfterBattleText: text "I enjoyed that" line "bout. I would like" cont "to see you again." @@ -349,7 +349,7 @@ DanceTheatre_MapEvents: bg_event 6, 6, BGEVENT_UP, DanceTheatreFancyPanel def_object_events - object_event 0, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlNaoko2, -1 + object_event 0, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlNaoko, -1 object_event 2, 1, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlSayo, -1 object_event 6, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlZuki, -1 object_event 9, 1, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlKuni, -1 diff --git a/maps/Route29.asm b/maps/Route29.asm index fa8e3ff15..3009c4b6e 100644 --- a/maps/Route29.asm +++ b/maps/Route29.asm @@ -322,7 +322,7 @@ Route29FisherText: line "progress." done -Text_WaitingForDay: ; unreferenced +Route29CooltrainerMText_WaitingForDay: ; unreferenced text "I'm waiting for" line "#MON that" diff --git a/maps/Route35GoldenrodGate.asm b/maps/Route35GoldenrodGate.asm index eedbbddd4..2eae3cd47 100644 --- a/maps/Route35GoldenrodGate.asm +++ b/maps/Route35GoldenrodGate.asm @@ -20,7 +20,7 @@ RandyScript: writetext Route35GoldenrodGateRandyAskTakeThisMonToMyFriendText yesorno iffalse .refused - writetext Route35GoldenrodGateRandyThanksKidText + writetext Route35GoldenrodGateRandyThanksText promptbutton waitsfx readvar VAR_PARTYCOUNT @@ -73,7 +73,7 @@ GiftSpearowName: GiftSpearowOTName: db "RANDY@" - db 0 ; filler + db 0 ; unused Route35GoldenrodGatePokefanFScript: faceplayer @@ -106,7 +106,7 @@ Route35GoldenrodGateRandyAskTakeThisMonToMyFriendText: para "He's on ROUTE 31." done -Route35GoldenrodGateRandyThanksKidText: +Route35GoldenrodGateRandyThanksText: text "You will? Perfect!" line "Thanks, kid!"