diff options
Diffstat (limited to 'scripts')
80 files changed, 319 insertions, 320 deletions
diff --git a/scripts/agatha.asm b/scripts/agatha.asm index c9df27d2..f0607785 100755 --- a/scripts/agatha.asm +++ b/scripts/agatha.asm @@ -69,7 +69,7 @@ AgathaScript0: ; 76490 (1d:6490) ld a, [wCoordIndex] cp $3 jr c, .asm_764b4 - CheckAndSetEvent EVENT_8F6 + CheckAndSetEvent EVENT_AUTOWALKED_INTO_AGATHAS_ROOM jr z, AgathaScript_76474 .asm_764b4 ld a, $2 diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index bdae3536..f0bdf615 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -8,7 +8,7 @@ BikeShopTextPointers: ; 1d73f (7:573f) BikeShopText1: ; 1d745 (7:5745) TX_ASM - CheckEvent EVENT_0C0 + CheckEvent EVENT_GOT_BICYCLE jr z, .asm_260d4 ld hl, BikeShopText_1d82f call PrintText @@ -25,7 +25,7 @@ BikeShopText1: ; 1d745 (7:5745) ld a, BIKE_VOUCHER ld [$ffdb], a callba RemoveItemByID - SetEvent EVENT_0C0 + SetEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d824 call PrintText jr .Done @@ -129,7 +129,7 @@ BikeShopText_1d843: ; 1d843 (7:5843) BikeShopText3: ; 1d848 (7:5848) TX_ASM - CheckEvent EVENT_0C0 + CheckEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d861 jr nz, .asm_34d2d ld hl, BikeShopText_1d85c diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index b7e85f9a..71e61603 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -51,7 +51,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6) ld a, HS_BILL_POKEMON ld [wcc4d], a predef HideObject - SetEvent EVENT_55E + SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR xor a ld [wJoyIgnore], a ld a, $3 @@ -59,7 +59,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6) ret BillsHouseScript3: ; 1e7c5 (7:67c5) - CheckEvent EVENT_55B + CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL ret z ld a, $f0 ld [wJoyIgnore], a @@ -101,8 +101,8 @@ BillsHouseScript4: ; 1e80d (7:680d) ret nz xor a ld [wJoyIgnore], a - SetEvent EVENT_55D - SetEvent EVENT_550 + SetEvent EVENT_MET_BILL_2 ; this event seems redundant + SetEvent EVENT_MET_BILL ld a, $0 ld [W_BILLSHOUSECURSCRIPT], a ret @@ -159,7 +159,7 @@ BillsHouseText_1e86f: ; 1e86f (7:686f) BillsHouseText2: ; 1e874 (7:6874) TX_ASM - CheckEvent EVENT_55C + CheckEvent EVENT_GOT_SS_TICKET jr nz, .asm_1e8a9 ld hl, BillThankYouText call PrintText @@ -168,7 +168,7 @@ BillsHouseText2: ; 1e874 (7:6874) jr nc, .BagFull ld hl, SSTicketReceivedText call PrintText - SetEvent EVENT_55C + SetEvent EVENT_GOT_SS_TICKET ld a, HS_CERULEAN_GUARD_1 ld [wcc4d], a predef ShowObject diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 17b182f5..12ca9106 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -9,7 +9,7 @@ BluesHouseScriptPointers: ; 19b47 (6:5b47) dw BluesHouseScript1 BluesHouseScript0: ; 19b4b (6:5b4b) - SetEvent EVENT_019 + SetEvent EVENT_ENTERED_BLUES_HOUSE ; trigger the next script ld a,1 @@ -26,7 +26,7 @@ BluesHouseTextPointers: ; 19b57 (6:5b57) BluesHouseText1: ; 19b5d (6:5b5d) TX_ASM - CheckEvent EVENT_018 + CheckEvent EVENT_GOT_TOWN_MAP jr nz,.GotMap CheckEvent EVENT_GOT_POKEDEX jr nz,.GiveMap @@ -44,7 +44,7 @@ BluesHouseText1: ; 19b5d (6:5b5d) predef HideObject ; hide table map object ld hl,GotMapText call PrintText - SetEvent EVENT_018 + SetEvent EVENT_GOT_TOWN_MAP jr .done .GotMap ld hl,DaisyUseMapText diff --git a/scripts/bruno.asm b/scripts/bruno.asm index 9cd55193..1aae7d19 100755 --- a/scripts/bruno.asm +++ b/scripts/bruno.asm @@ -69,7 +69,7 @@ BrunoScript0: ; 76339 (1d:6339) ld a, [wCoordIndex] cp $3 jr c, .asm_7635d - CheckAndSetEvent EVENT_8EE + CheckAndSetEvent EVENT_AUTOWALKED_INTO_BRUNOS_ROOM jr z, BrunoScript_7631d .asm_7635d ld a, $2 diff --git a/scripts/celadoncity.asm b/scripts/celadoncity.asm index 65e71cca..ce0c4731 100755 --- a/scripts/celadoncity.asm +++ b/scripts/celadoncity.asm @@ -42,7 +42,7 @@ CeladonCityText4: ; 19999 (6:5999) CeladonCityText5: ; 1999e (6:599e) TX_ASM - CheckEvent EVENT_180 + CheckEvent EVENT_GOT_TM41 jr nz, .asm_7053f ld hl, TM41PreText call PrintText @@ -55,7 +55,7 @@ CeladonCityText5: ; 1999e (6:599e) .Success ld hl, ReceivedTM41Text call PrintText - SetEvent EVENT_180 + SetEvent EVENT_GOT_TM41 jr .Done .asm_7053f ld hl, TM41ExplanationText diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm index d4d4b84b..a37bc558 100755 --- a/scripts/celadondiner.asm +++ b/scripts/celadondiner.asm @@ -27,14 +27,14 @@ CeladonDinerText4: ; 4916e (12:516e) CeladonDinerText5: ; 49173 (12:5173) TX_ASM - CheckEvent EVENT_1E0 + CheckEvent EVENT_GOT_COIN_CASE jr nz, .asm_eb14d ld hl, CeladonDinerText_491a7 call PrintText ld bc, (COIN_CASE << 8) | 1 call GiveItem jr nc, .BagFull - SetEvent EVENT_1E0 + SetEvent EVENT_GOT_COIN_CASE ld hl, ReceivedCoinCaseText call PrintText jr .asm_68b61 diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index ef4b4760..48264603 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -28,7 +28,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_1B9 + CheckEvent EVENT_FOUND_ROCKET_HIDEOUT ret nz ld a, $2a ld [wd09f], a @@ -226,7 +226,7 @@ CeladonGameCornerText4: ; 48d45 (12:4d45) CeladonGameCornerText5: ; 48d4a (12:4d4a) TX_ASM - CheckEvent EVENT_1BA + CheckEvent EVENT_GOT_10_COINS jr nz, .asm_48d89 ld hl, CeladonGameCornerText_48d9c call PrintText @@ -244,7 +244,7 @@ CeladonGameCornerText5: ; 48d4a (12:4d4a) ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - SetEvent EVENT_1BA + SetEvent EVENT_GOT_10_COINS ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Received10CoinsText @@ -305,7 +305,7 @@ CeladonGameCornerText8: ; 48dd4 (12:4dd4) CeladonGameCornerText9: ; 48dd9 (12:4dd9) TX_ASM - CheckEvent EVENT_1BC + CheckEvent EVENT_GOT_20_COINS_2 jr nz, .asm_48e13 ld hl, CeladonGameCornerText_48e26 call PrintText @@ -323,7 +323,7 @@ CeladonGameCornerText9: ; 48dd9 (12:4dd9) ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - SetEvent EVENT_1BC + SetEvent EVENT_GOT_20_COINS_2 ld hl, Received20CoinsText jr .asm_48e20 .asm_48e13 @@ -356,7 +356,7 @@ CeladonGameCornerText_48e36: ; 48e36 (12:4e36) CeladonGameCornerText10: ; 48e3b (12:4e3b) TX_ASM - CheckEvent EVENT_1BB + CheckEvent EVENT_GOT_20_COINS jr nz, .asm_48e75 ld hl, CeladonGameCornerText_48e88 call PrintText @@ -374,7 +374,7 @@ CeladonGameCornerText10: ; 48e3b (12:4e3b) ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - SetEvent EVENT_1BB + SetEvent EVENT_GOT_20_COINS ld hl, CeladonGameCornerText_48e8d jr .asm_48e82 .asm_48e75 @@ -449,7 +449,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd) ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish - SetEvent EVENT_1B9 + SetEvent EVENT_FOUND_ROCKET_HIDEOUT ld a, $43 ld [wd09f], a ld bc, $0208 diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm index 6e17ac77..f525d0af 100755 --- a/scripts/celadonmart3.asm +++ b/scripts/celadonmart3.asm @@ -22,14 +22,14 @@ CeladonMart3TextPointers: ; 48228 (12:4228) CeladonMart3Text1: ; 4824a (12:424a) TX_ASM - CheckEvent EVENT_18F + CheckEvent EVENT_GOT_TM18 jr nz, .asm_a5463 ld hl, TM18PreReceiveText call PrintText ld bc, (TM_18 << 8) | 1 call GiveItem jr nc, .BagFull - SetEvent EVENT_18F + SetEvent EVENT_GOT_TM18 ld hl, ReceivedTM18Text jr .asm_81359 .BagFull diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index e509ffeb..113044cd 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -83,7 +83,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) jr z, .asm_484b6 cp SODA_POP jr z, .asm_48492 - CheckEvent EVENT_18E + CheckEvent EVENT_GOT_TM49 jr nz, .asm_484e0 ld hl, CeladonMartRoofText_48515 call PrintText @@ -93,10 +93,10 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) jr nc, .BagFull ld hl, ReceivedTM49Text call PrintText - SetEvent EVENT_18E + SetEvent EVENT_GOT_TM49 ret .asm_48492 - CheckEvent EVENT_18D + CheckEvent EVENT_GOT_TM48 jr nz, .asm_484e0 ld hl, CeladonMartRoofText_48504 call PrintText @@ -106,10 +106,10 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) jr nc, .BagFull ld hl, CeladonMartRoofText_4850a call PrintText - SetEvent EVENT_18D + SetEvent EVENT_GOT_TM48 ret .asm_484b6 - CheckEvent EVENT_18C + CheckEvent EVENT_GOT_TM13 jr nz, .asm_484e0 ld hl, CeladonMartRoofText_484f3 call PrintText @@ -119,7 +119,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) jr nc, .BagFull ld hl, CeladonMartRoofText_484f9 call PrintText - SetEvent EVENT_18C + SetEvent EVENT_GOT_TM13 ret .BagFull ld hl, CeladonMartRoofText_48526 diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index b009ca95..5da549f3 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -25,7 +25,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7) jp z, CeruleanCityScript_1948c ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_0A7 + SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF ld a, $2 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -35,7 +35,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7) ret CeruleanCityScript0: ; 194c8 (6:54c8) - CheckEvent EVENT_0A7 + CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF jr nz, .asm_194f7 ld hl, CeruleanCityCoords1 call ArePlayerCoordsInArray @@ -56,7 +56,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8) ld [hSpriteIndexOrTextID], a jp DisplayTextID .asm_194f7 - CheckEvent EVENT_098 + CheckEvent EVENT_BEAT_CERULEAN_RIVAL ret nz ld hl, CeruleanCityCoords2 call ArePlayerCoordsInArray @@ -167,7 +167,7 @@ CeruleanCityScript2: ; 195b1 (6:55b1) call CeruleanCityScript_1955d ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_098 + SetEvent EVENT_BEAT_CERULEAN_RIVAL ld a, $1 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -248,7 +248,7 @@ CeruleanCityTextPointers: ; 1962d (6:562d) CeruleanCityText1: ; 1964f (6:564f) TX_ASM - CheckEvent EVENT_098 + CheckEvent EVENT_BEAT_CERULEAN_RIVAL ; do pre-battle text jr z, .PreBattleText ; or talk about bill @@ -279,7 +279,7 @@ CeruleanCityText_19677: ; 19677 (6:5677) CeruleanCityText2: ; 1967c (6:567c) TX_ASM - CheckEvent EVENT_0A7 + CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF jr nz, .asm_4ca20 ld hl, CeruleanCityText_196d9 call PrintText diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 2fc0503f..c06c784c 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -2,8 +2,8 @@ CinnabarIslandScript: ; 1ca19 (7:4a19) call EnableAutoTextBoxDrawing ld hl, wd126 set 5, [hl] - ResetEvent EVENT_278 - ResetEvent EVENT_2E1 + ResetEvent EVENT_MANSION_SWITCH_ON + ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL ld hl, CinnabarIslandScriptPointers ld a, [W_CINNABARISLANDCURSCRIPT] jp CallFunctionInTable diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm index d6a330f3..953c7126 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -12,7 +12,7 @@ CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74) CopycatsHouse2FText1: ; 5cc82 (17:4c82) TX_ASM - CheckEvent EVENT_340 + CheckEvent EVENT_GOT_TM31 jr nz, .asm_7ccf3 ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -31,7 +31,7 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82) ld a, POKE_DOLL ld [$ffdb], a callba RemoveItemByID - SetEvent EVENT_340 + SetEvent EVENT_GOT_TM31 jr .asm_62ecd .BagFull ld hl, TM31NoRoomText diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index 45298c0b..adde809f 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -24,16 +24,16 @@ FanClubTextPointers: ; 59b84 (16:5b84) FanClubText1: ; pikachu fan TX_ASM - CheckEvent EVENT_157 + CheckEvent EVENT_PIKACHU_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - SetEvent EVENT_156 + SetEvent EVENT_SEEL_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ResetEvent EVENT_157 + ResetEvent EVENT_PIKACHU_FAN_BOAST .done jp TextScriptEnd @@ -48,16 +48,16 @@ FanClubText1: FanClubText2: ; seel fan TX_ASM - CheckEvent EVENT_156 + CheckEvent EVENT_SEEL_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - SetEvent EVENT_157 + SetEvent EVENT_PIKACHU_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ResetEvent EVENT_156 + ResetEvent EVENT_SEEL_FAN_BOAST .done jp TextScriptEnd diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm index e27baf57..91d8a484 100755 --- a/scripts/fightingdojo.asm +++ b/scripts/fightingdojo.asm @@ -21,13 +21,13 @@ FightingDojoScriptPointers: ; 5cd7b (17:4d7b) dw FightingDojoScript3 FightingDojoScript1: ; 5cd83 (17:4d83) - CheckEvent EVENT_350 + CheckEvent EVENT_DEFEATED_FIGHTING_DOJO ret nz call CheckFightingMapTrainers ld a, [wTrainerHeaderFlagBit] and a ret nz - CheckEvent EVENT_351 + CheckEvent EVENT_BEAT_KARATE_MASTER ret nz xor a ld [hJoyHeld], a @@ -70,7 +70,7 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6) .asm_5cde4 ld a, $f0 ld [wJoyIgnore], a - SetEventRange EVENT_351, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 + SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ld a, $8 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -131,9 +131,9 @@ FightingDojoTrainerHeader3: ; 5ce37 (17:4e37) FightingDojoText1: ; 5ce44 (17:4e44) TX_ASM - CheckEvent EVENT_350 + CheckEvent EVENT_DEFEATED_FIGHTING_DOJO jp nz, .continue1 - CheckEventReuseA EVENT_351 + CheckEventReuseA EVENT_BEAT_KARATE_MASTER jp nz, .continue2 ld hl, FightingDojoText_5ce8e call PrintText @@ -252,7 +252,7 @@ FightingDojoAfterBattleText4: ; 5cf01 (17:4f01) FightingDojoText6: ; 5cf06 (17:4f06) ; Hitmonlee Poké Ball TX_ASM - CheckEitherEventSet EVENT_356, EVENT_357 + CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText call PrintText @@ -276,7 +276,7 @@ FightingDojoText6: ; 5cf06 (17:4f06) ld a, HS_FIGHTING_DOJO_GIFT_1 ld [wcc4d], a predef HideObject - SetEvents EVENT_356, EVENT_350 + SetEvents EVENT_GOT_HITMONLEE, EVENT_DEFEATED_FIGHTING_DOJO .done jp TextScriptEnd @@ -287,7 +287,7 @@ WantHitmonleeText: ; 5cf49 (17:4f49) FightingDojoText7: ; 5cf4e (17:4f4e) ; Hitmonchan Poké Ball TX_ASM - CheckEitherEventSet EVENT_356, EVENT_357 + CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText call PrintText @@ -306,7 +306,7 @@ FightingDojoText7: ; 5cf4e (17:4f4e) ld c,30 call GivePokemon jr nc, .done - SetEvents EVENT_357, EVENT_350 + SetEvents EVENT_GOT_HITMONCHAN, EVENT_DEFEATED_FIGHTING_DOJO ; once Poké Ball is taken, hide sprite ld a, HS_FIGHTING_DOJO_GIFT_2 diff --git a/scripts/fuchsiacity.asm b/scripts/fuchsiacity.asm index b314b983..cdf8e203 100755 --- a/scripts/fuchsiacity.asm +++ b/scripts/fuchsiacity.asm @@ -135,9 +135,9 @@ FuchsiaCityLaprasText: ; 19aef (6:5aef) FuchsiaCityText24: ; 19af4 (6:5af4) TX_ASM - CheckEvent EVENT_57E + CheckEvent EVENT_GOT_DOME_FOSSIL jr nz, .asm_3b4e8 - CheckEventReuseA EVENT_57F + CheckEventReuseA EVENT_GOT_HELIX_FOSSIL jr nz, .asm_667d5 ld hl, FuchsiaCityText_19b2a call PrintText diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm index b755b3bc..37aebd23 100755 --- a/scripts/fuchsiahouse2.asm +++ b/scripts/fuchsiahouse2.asm @@ -10,12 +10,12 @@ FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8) FuchsiaHouse2Text1: ; 750c2 (1d:50c2) TX_ASM - CheckEvent EVENT_238 + CheckEvent EVENT_GOT_HM04 jr nz, .subtract ld b,GOLD_TEETH call IsItemInBag jr nz, .asm_3f30f - CheckEvent EVENT_239 + CheckEvent EVENT_GAVE_GOLD_TEETH jr nz, .asm_60cba ld hl, WardenGibberishText1 call PrintText @@ -34,7 +34,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2) ld a, GOLD_TEETH ld [$ffdb], a callba RemoveItemByID - SetEvent EVENT_239 + SetEvent EVENT_GAVE_GOLD_TEETH .asm_60cba ld hl, WardenThankYouText call PrintText @@ -43,7 +43,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2) jr nc, .BagFull ld hl, ReceivedHM04Text call PrintText - SetEvent EVENT_238 + SetEvent EVENT_GOT_HM04 jr .asm_52039 .subtract ld hl, HM04ExplanationText diff --git a/scripts/gary.asm b/scripts/gary.asm index ab991942..24a2d2de 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -94,7 +94,7 @@ GaryScript3: ; 75fbb (1d:5fbb) cp $ff jp z, GaryScript_75f29 call UpdateSprites - SetEvent EVENT_901 + SetEvent EVENT_BEAT_CHAMPION_RIVAL ld a, $f0 ld [wJoyIgnore], a ld a, $1 @@ -248,7 +248,7 @@ GaryTextPointers: ; 760d6 (1d:60d6) GaryText1: ; 760e0 (1d:60e0) TX_ASM - CheckEvent EVENT_901 + CheckEvent EVENT_BEAT_CHAMPION_RIVAL ld hl, GaryText_760f4 jr z, .asm_17e9f ld hl, GaryText_76103 diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index 136061d8..503327f3 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -40,7 +40,7 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb) ld [W_LANCECURSCRIPT], a ld [W_HALLOFFAMEROOMCURSCRIPT], a ; Elite 4 events - ResetEventRange EVENT_8E0, EVENT_907, 1 + ResetEventRange EVENT_ELITE4_EVENTS_START, EVENT_907, 1 xor a ld [W_HALLOFFAMEROOMCURSCRIPT], a ld a, PALLET_TOWN diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm index 8cde0854..e4a64ce6 100755 --- a/scripts/indigoplateaulobby.asm +++ b/scripts/indigoplateaulobby.asm @@ -5,13 +5,13 @@ IndigoPlateauLobbyScript: ; 19c5b (6:5c5b) bit 6, [hl] res 6, [hl] ret z - ResetEvent EVENT_917 + ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ld hl, wd734 bit 1, [hl] res 1, [hl] ret z ; Elite 4 events - ResetEventRange EVENT_8E0, EVENT_8FF + ResetEventRange EVENT_ELITE4_EVENTS_START, EVENT_LANCES_ROOM_LOCK_DOOR ret IndigoPlateauLobbyTextPointers: ; 19c7f (6:5c7f) diff --git a/scripts/lab3.asm b/scripts/lab3.asm index 0351038d..59b04b8c 100755 --- a/scripts/lab3.asm +++ b/scripts/lab3.asm @@ -10,7 +10,7 @@ Lab3TextPointers: ; 75c8a (1d:5c8a) Lab3Text1: ; 75c94 (1d:5c94) TX_ASM - CheckEvent EVENT_2D7 + CheckEvent EVENT_GOT_TM35 jr nz, .asm_e551a ld hl, TM35PreReceiveText call PrintText @@ -19,7 +19,7 @@ Lab3Text1: ; 75c94 (1d:5c94) jr nc, .BagFull ld hl, ReceivedTM35Text call PrintText - SetEvent EVENT_2D7 + SetEvent EVENT_GOT_TM35 jr .asm_eb896 .BagFull ld hl, TM35NoRoomText diff --git a/scripts/lab4.asm b/scripts/lab4.asm index 44dcb2c3..f2c4d8d7 100755 --- a/scripts/lab4.asm +++ b/scripts/lab4.asm @@ -49,7 +49,7 @@ FossilsList: ; 75d68 (1d:5d68) Lab4Text1: ; 75d6c (1d:5d6c) TX_ASM - CheckEvent EVENT_2E0 + CheckEvent EVENT_GAVE_FOSSIL_TO_LAB jr nz, .asm_75d96 ld hl, Lab4Text_75dc6 call PrintText @@ -65,7 +65,7 @@ Lab4Text1: ; 75d6c (1d:5d6c) .asm_75d93 jp TextScriptEnd .asm_75d96 - bit 1, a + CheckEventAfterBranchReuseA EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_GAVE_FOSSIL_TO_LAB jr z, .asm_75da2 ld hl, Lab4Text_75dd0 call PrintText @@ -74,13 +74,13 @@ Lab4Text1: ; 75d6c (1d:5d6c) call LoadFossilItemAndMonNameBank1D ld hl, Lab4Text_75dd5 call PrintText - SetEvent EVENT_2E2 + SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON ld a, [W_FOSSILMON] ld b, a ld c, 30 call GivePokemon jr nc, .asm_75d93 - ResetEvents EVENT_2E0, EVENT_2E1, EVENT_2E2 + ResetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_LAB_HANDING_OVER_FOSSIL_MON jr .asm_75d93 Lab4Text_75dc6: ; 75dc6 (1d:5dc6) diff --git a/scripts/lance.asm b/scripts/lance.asm index 9d3a2f99..4d0072be 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -13,7 +13,7 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_8FF + CheckEvent EVENT_LANCES_ROOM_LOCK_DOOR jr nz, .asm_5a2da ld a, $31 ld b, $32 @@ -51,7 +51,7 @@ LanceScript4: ; 5a304 (16:6304) ret LanceScript0: ; 5a305 (16:6305) - CheckEvent EVENT_8FE + CheckEvent EVENT_BEAT_LANCE ret nz ld hl, CoordsData_5a33e call ArePlayerCoordsInArray @@ -67,7 +67,7 @@ LanceScript0: ; 5a305 (16:6305) .asm_5a325 cp $5 jr z, LanceScript_5a35b - CheckAndSetEvent EVENT_8FF + CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR ret nz ld hl, wd126 set 5, [hl] @@ -156,5 +156,5 @@ LanceEndBattleText: ; 5a3b3 (16:63b3) LanceAfterBattleText: ; 5a3b8 (16:63b8) TX_FAR _LanceAfterBattleText TX_ASM - SetEvent EVENT_8FE + SetEvent EVENT_BEAT_LANCE jp TextScriptEnd diff --git a/scripts/lavenderhouse1.asm b/scripts/lavenderhouse1.asm index 21e67013..556e94a3 100755 --- a/scripts/lavenderhouse1.asm +++ b/scripts/lavenderhouse1.asm @@ -12,7 +12,7 @@ LavenderHouse1TextPointers: ; 1d8ac (7:58ac) LavenderHouse1Text1: ; 1d8b8 (7:58b8) TX_ASM - CheckEvent EVENT_4CF + CheckEvent EVENT_RESCUED_MR_FUJI jr nz, .asm_72e5d ld hl, LavenderHouse1Text_1d8d1 call PrintText @@ -33,7 +33,7 @@ LavenderHouse1Text_1d8d6: ; 1d8d6 (7:58d6) LavenderHouse1Text2: ; 1d8db (7:58db) TX_ASM - CheckEvent EVENT_4CF + CheckEvent EVENT_RESCUED_MR_FUJI jr nz, .asm_06470 ld hl, LavenderHouse1Text_1d8f4 call PrintText @@ -68,7 +68,7 @@ LavenderHouse1Text4: ; 1d90b (7:590b) LavenderHouse1Text5: ; 1d918 (7:5918) TX_ASM - CheckEvent EVENT_128 + CheckEvent EVENT_GOT_POKE_FLUTE jr nz, .asm_15ac2 ld hl, LavenderHouse1Text_1d94c call PrintText @@ -77,7 +77,7 @@ LavenderHouse1Text5: ; 1d918 (7:5918) jr nc, .BagFull ld hl, ReceivedFluteText call PrintText - SetEvent EVENT_128 + SetEvent EVENT_GOT_POKE_FLUTE jr .asm_da749 .BagFull ld hl, FluteNoRoomText diff --git a/scripts/lavenderhouse2.asm b/scripts/lavenderhouse2.asm index 4c3ad333..fe0b3ee2 100755 --- a/scripts/lavenderhouse2.asm +++ b/scripts/lavenderhouse2.asm @@ -15,7 +15,7 @@ LavenderHouse2Text1: ; 1d9b6 (7:59b6) LavenderHouse2Text2: ; 1d9c3 (7:59c3) TX_ASM - CheckEvent EVENT_4CF + CheckEvent EVENT_RESCUED_MR_FUJI jr nz, .asm_65711 ld hl, LavenderHouse2Text_1d9dc call PrintText diff --git a/scripts/lavendermart.asm b/scripts/lavendermart.asm index ababf70d..85518fd2 100755 --- a/scripts/lavendermart.asm +++ b/scripts/lavendermart.asm @@ -12,7 +12,7 @@ LavenderMartText2: ; 5c935 (17:4935) LavenderMartText3: ; 5c93a (17:493a) TX_ASM - CheckEvent EVENT_4CF + CheckEvent EVENT_RESCUED_MR_FUJI jr nz, .asm_c88d4 ld hl, LavenderMart_5c953 call PrintText diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm index a8e0cb5b..fe136784 100755 --- a/scripts/lorelei.asm +++ b/scripts/lorelei.asm @@ -70,7 +70,7 @@ LoreleiScript0: ; 761e2 (1d:61e2) ld a, [wCoordIndex] cp $3 jr c, .asm_76206 - CheckAndSetEvent EVENT_8E6 + CheckAndSetEvent EVENT_AUTOWALKED_INTO_LORELEIS_ROOM jr z, LoreleiScript_761c6 .asm_76206 ld a, $2 diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index ff8707e0..7d349276 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -13,7 +13,7 @@ Mansion1Subscript1: ; 442c5 (11:42c5) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_278 + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_442ec ld bc, $060c call Mansion1Script_4430b @@ -112,9 +112,9 @@ Mansion1Text4: ; 4435a (11:435a) call PrintText ld a, SFX_GO_INSIDE call PlaySound - CheckAndSetEvent EVENT_278 + CheckAndSetEvent EVENT_MANSION_SWITCH_ON jr z, .asm_44392 - ResetEventReuseHL EVENT_278 + ResetEventReuseHL EVENT_MANSION_SWITCH_ON jr .asm_44392 .asm_4438c ld hl, MansionSwitchNotPressedText diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index 6e1a26c0..4f5aac9f 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -13,7 +13,7 @@ Mansion2Script_51fee: ; 51fee (14:5fee) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_278 + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_52016 ld a, $e ld bc, $204 @@ -118,9 +118,9 @@ Mansion2Text5: ; 52087 (14:6087) call PrintText ld a, SFX_GO_INSIDE call PlaySound - CheckAndSetEvent EVENT_278 + CheckAndSetEvent EVENT_MANSION_SWITCH_ON jr z, .asm_520bf - ResetEventReuseHL EVENT_278 + ResetEventReuseHL EVENT_MANSION_SWITCH_ON jr .asm_520bf .asm_520b9 ld hl, Mansion2Text_520cc diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm index 0aec82b3..e49667ef 100755 --- a/scripts/mansion3.asm +++ b/scripts/mansion3.asm @@ -13,7 +13,7 @@ Mansion3Script_52204: ; 52204 (14:6204) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_278 + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_52224 ld a, $e ld bc, $207 diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm index 98c55a76..59ee3704 100755 --- a/scripts/mansion4.asm +++ b/scripts/mansion4.asm @@ -13,7 +13,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_278 + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_523ff ld a, $e ld bc, $80d diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index dfa92260..4542cc53 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -5,7 +5,7 @@ MtMoon3Script: ; 49d0b (12:5d0b) ld a, [W_MTMOON3CURSCRIPT] call ExecuteCurMapScriptInTable ld [W_MTMOON3CURSCRIPT], a - CheckEvent EVENT_579 + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD ret z ld hl, CoordsData_49d37 call ArePlayerCoordsInArray @@ -53,7 +53,7 @@ MtMoon3ScriptPointers: ; 49d63 (12:5d63) dw MtMoon3Script5 MtMoon3Script0: ; 49d6f (12:5d6f) - CheckEvent EVENT_579 + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD jp nz, MtMoon3Script_49d91 ld a, [W_YCOORD] cp $8 @@ -68,7 +68,7 @@ MtMoon3Script0: ; 49d6f (12:5d6f) jp DisplayTextID MtMoon3Script_49d91: ; 49d91 (12:5d91) - CheckEitherEventSet EVENT_57E, EVENT_57F + CheckEitherEventSet EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL jp z, CheckFightingMapTrainers ret @@ -78,7 +78,7 @@ MtMoon3Script3: ; 49d9a (12:5d9a) jp z, MtMoon3Script_49d58 call UpdateSprites call Delay3 - SetEvent EVENT_579 + SetEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD xor a ld [wJoyIgnore], a ld a, $0 @@ -138,7 +138,7 @@ MtMoon3Script5: ; 49dfb (12:5dfb) ld a, $a ld [hSpriteIndexOrTextID], a call DisplayTextID - CheckEvent EVENT_57E + CheckEvent EVENT_GOT_DOME_FOSSIL jr z, .asm_49e1d ld a, HS_MT_MOON_3_FOSSIL_2 jr .asm_49e1f @@ -207,7 +207,7 @@ MtMoon3TrainerHeader4: ; 49e6c (12:5e6c) MtMoon3Text1: ; 49e79 (12:5e79) TX_ASM - CheckEvent EVENT_579 + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD jr z, .asm_49e8d and $c0 jr nz, .asm_49eb8 @@ -278,7 +278,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9) ld a, HS_MT_MOON_3_FOSSIL_1 ld [wcc4d], a predef HideObject - SetEvent EVENT_57E + SetEvent EVENT_GOT_DOME_FOSSIL ld a, $4 ld [W_MTMOON3CURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -306,7 +306,7 @@ MtMoon3Text7: ; 49f29 (12:5f29) ld a, HS_MT_MOON_3_FOSSIL_2 ld [wcc4d], a predef HideObject - SetEvent EVENT_57F + SetEvent EVENT_GOT_HELIX_FOSSIL ld a, $4 ld [W_MTMOON3CURSCRIPT], a ld [W_CURMAPSCRIPT], a diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index 2acf1af5..77c7f270 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -54,13 +54,13 @@ Museum1FText1: ; 5c135 (17:4135) cp $c jp z, Museum1FScript_5c1f9 .asm_d49e7 - CheckEvent EVENT_068 + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET jr nz, .asm_31a16 ld hl, Museum1FText_5c23d call PrintText jp Museum1FScriptEnd .asm_b8709 - CheckEvent EVENT_068 + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET jr z, .asm_3ded4 .asm_31a16 ld hl, Museum1FText_5c242 @@ -91,7 +91,7 @@ Museum1FText1: ; 5c135 (17:4135) .asm_0f3e3 ld hl, Museum1FText_5c224 call PrintText - SetEvent EVENT_068 + SetEvent EVENT_BOUGHT_MUSEUM_TICKET xor a ld [wPriceTemp], a ld [wPriceTemp + 1], a @@ -187,14 +187,14 @@ Museum1FText_5c251: ; 5c251 (17:4251) Museum1FText3: ; 5c256 (17:4256) TX_ASM - CheckEvent EVENT_069 + CheckEvent EVENT_GOT_OLD_AMBER jr nz, .asm_5c285 ld hl, Museum1FText_5c28e call PrintText ld bc, (OLD_AMBER << 8) | 1 call GiveItem jr nc, .BagFull - SetEvent EVENT_069 + SetEvent EVENT_GOT_OLD_AMBER ld a, HS_OLD_AMBER ld [wcc4d], a predef HideObject diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 6f51aca0..620923ad 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -1,5 +1,5 @@ OaksLabScript: ; 1cb0e (7:4b0e) - CheckEvent EVENT_026 + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 call nz, OaksLabScript_1d076 ld a, $1 ld [wAutoTextBoxDrawingControl], a @@ -31,7 +31,7 @@ OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript18 OaksLabScript0: ; 1cb4e (7:4b4e) - CheckEvent EVENT_027 + CheckEvent EVENT_OAK_APPEARED_IN_PALLET ret z ld a, [wNPCMovementScriptFunctionNum] and a @@ -108,8 +108,8 @@ OaksLabScript4: ; 1cbd2 (7:4bd2) ld a, [wSimulatedJoypadStatesIndex] and a ret nz - SetEvent EVENT_STOPPED_FROM_LEAVING_PALLET - SetEvent EVENT_FOLLOWED_OAK_INSIDE_LAB + SetEvent EVENT_FOLLOWED_OAK_INTO_LAB + SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 ld a, $1 ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_UP @@ -597,7 +597,7 @@ OaksLabScript16: ; 1cf12 (7:4f12) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_POKEDEX - SetEvent EVENT_038 + SetEvent EVENT_OAK_GOT_PARCEL ld a, HS_LYING_OLD_MAN ld [wcc4d], a predef HideObject @@ -632,9 +632,9 @@ OaksLabScript17: ; 1cfd4 (7:4fd4) ld a, HS_OAKS_LAB_RIVAL ld [wcc4d], a predef HideObject - SetEvent EVENT_520 - ResetEventReuseHL EVENT_521 - SetEventReuseHL EVENT_527 + SetEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE + ResetEventReuseHL EVENT_2ND_ROUTE22_RIVAL_BATTLE + SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_FIGHT ld a, HS_ROUTE_22_RIVAL_1 ld [wcc4d], a predef ShowObject @@ -650,19 +650,19 @@ OaksLabScript17: ; 1cfd4 (7:4fd4) OaksLabScript18: ; 1d009 (7:5009) ret -OaksLabScript_1d00a: ; 1d00a (7:500a) +OaksLabScript_RemoveParcel: ; 1d00a (7:500a) ld hl, wBagItems ld bc, $0000 -.asm_1d010 +.loop ld a, [hli] cp $ff ret z cp OAKS_PARCEL - jr z, .GotParcel + jr z, .foundParcel inc hl inc c - jr .asm_1d010 -.GotParcel + jr .loop +.foundParcel ld hl, wNumBagItems ld a, c ld [wWhichPokemon], a @@ -762,7 +762,7 @@ OaksLabTextPointers: ; 1d082 (7:5082) OaksLabText28: ; 1d0ce (7:50ce) OaksLabText1: ; 1d0ce (7:50ce) TX_ASM - CheckEvent EVENT_FOLLOWED_OAK_INSIDE_LAB + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 jr nz, .asm_1d0de ld hl, OaksLabGaryText1 call PrintText @@ -964,7 +964,7 @@ OaksLabLastMonText: ; 1d243 (7:5243) OaksLabText32: ; 1d248 (7:5248) OaksLabText5: ; 1d248 (7:5248) TX_ASM - CheckEvent EVENT_006 + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS jr nz, .asm_1d266 ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned @@ -985,7 +985,7 @@ OaksLabText5: ; 1d248 (7:5248) ld b,POKE_BALL call IsItemInBag jr nz, .asm_1d2e7 - CheckEvent EVENT_525 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT jr nz, .asm_1d2d0 CheckEvent EVENT_GOT_POKEDEX jr nz, .asm_1d2c8 @@ -1011,7 +1011,7 @@ OaksLabText5: ; 1d248 (7:5248) .asm_1d2b8 ld hl, OaksLabDeliverParcelText call PrintText - call OaksLabScript_1d00a + call OaksLabScript_RemoveParcel ld a, $f ld [W_OAKSLABCURSCRIPT], a jr .asm_1d2ed diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 15956e7b..0fd7300e 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -1,7 +1,7 @@ PalletTownScript: ; 18e5b (6:4e5b) CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK jr z,.next - SetEvent EVENT_006 + SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS .next call EnableAutoTextBoxDrawing ld hl,PalletTownScriptPointers @@ -18,7 +18,7 @@ PalletTownScriptPointers: ; 18e73 (6:4e73) dw PalletTownScript6 PalletTownScript0: ; 18e81 (6:4e81) - CheckEvent EVENT_STOPPED_FROM_LEAVING_PALLET + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB ret nz ld a,[W_YCOORD] cp 1 ; is player near north exit? @@ -35,7 +35,7 @@ PalletTownScript0: ; 18e81 (6:4e81) call PlayMusic ld a,$FC ld [wJoyIgnore],a - SetEvent EVENT_027 + SetEvent EVENT_OAK_APPEARED_IN_PALLET ; trigger the next script ld a,1 @@ -130,12 +130,11 @@ PalletTownScript4: ; 18f4b (6:4f4b) ret PalletTownScript5: ; 18f56 (6:4f56) - CheckEvent EVENT_01A + CheckEvent EVENT_DAISY_WALKING jr nz,.next - and 3 - cp 3 + CheckBothEventsSet EVENT_GOT_TOWN_MAP, EVENT_ENTERED_BLUES_HOUSE, 1 jr nz,.next - SetEvent EVENT_01A + SetEvent EVENT_DAISY_WALKING ld a,HS_DAISY_SITTING ld [wcc4d],a predef HideObject @@ -145,7 +144,7 @@ PalletTownScript5: ; 18f56 (6:4f56) .next CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK ret z - SetEvent EVENT_026 + SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 PalletTownScript6: ; 18f87 (6:4f87) ret diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index 8e72ee4b..77da14f8 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -16,7 +16,7 @@ PewterCityScriptPointers: ; 19243 (6:5243) PewterCityScript0: ; 19251 (6:5251) xor a ld [W_MUSEUM1FCURSCRIPT], a - ResetEvent EVENT_068 + ResetEvent EVENT_BOUGHT_MUSEUM_TICKET call PewterCityScript_1925e ret diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 03a1c218..186d0176 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -72,7 +72,7 @@ PewterGymScript_5c3df: ; 5c3df (17:43df) ld [wcc4d], a predef HideObject - ResetEvents EVENT_520, EVENT_527 + ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT ; deactivate gym trainers SetEvent EVENT_BEAT_PEWTER_GYM_TRAINER_0 diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index a9619170..c7b94c4f 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -17,7 +17,7 @@ PokemonTower2ScriptPointers: ; 60509 (18:4509) dw PokemonTower2Script2 PokemonTower2Script0: ; 6050f (18:450f) - CheckEvent EVENT_0EF + CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ret nz ld hl, CoordsData_6055e call ArePlayerCoordsInArray @@ -28,13 +28,14 @@ PokemonTower2Script0: ; 6050f (18:450f) ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ResetEvent EVENT_0EE + ResetEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT ld a, [wCoordIndex] cp $1 ld a, PLAYER_DIR_UP ld b, SPRITE_FACING_DOWN jr nz, .asm_60544 - SetEvent EVENT_0EE +; the rival is on the left side and the player is on the right side + SetEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT ld a, PLAYER_DIR_LEFT ld b, SPRITE_FACING_RIGHT .asm_60544 @@ -63,12 +64,12 @@ PokemonTower2Script1: ; 60563 (18:4563) jp z, PokemonTower2Script_604fe ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_0EF + SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ld a, $1 ld [hSpriteIndexOrTextID], a call DisplayTextID ld de, MovementData_605b2 - CheckEvent EVENT_0EE + CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT jr nz, .asm_60589 ld de, MovementData_605a9 .asm_60589 @@ -127,7 +128,7 @@ PokemonTower2TextPointers: ; 605db (18:45db) PokemonTower2Text1: ; 605df (18:45df) TX_ASM - CheckEvent EVENT_0EF + CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL jr z, .asm_16f24 ld hl, PokemonTower2Text_6063c call PrintText diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm index b418b361..c4e9eed9 100755 --- a/scripts/pokemontower5.asm +++ b/scripts/pokemontower5.asm @@ -18,10 +18,10 @@ PokemonTower5Script0: ; 6094b (18:494b) jr c, .asm_60960 ld hl, wd72e res 4, [hl] - ResetEvent EVENT_107 + ResetEvent EVENT_IN_PURIFIED_ZONE jp CheckFightingMapTrainers .asm_60960 - CheckAndSetEvent EVENT_107 + CheckAndSetEvent EVENT_IN_PURIFIED_ZONE ret nz xor a ld [hJoyHeld], a diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm index 68260484..37ca1b33 100755 --- a/scripts/pokemontower6.asm +++ b/scripts/pokemontower6.asm @@ -22,7 +22,7 @@ PokemonTower6ScriptPointers: ; 60b0d (18:4b0d) dw PokemonTower6Script4 PokemonTower6Script0: ; 60b17 (18:4b17) - CheckEvent EVENT_10F + CheckEvent EVENT_BEAT_GHOST_MAROWAK jp nz, CheckFightingMapTrainers ld hl, CoordsData_60b45 call ArePlayerCoordsInArray @@ -59,7 +59,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48) ld a, [wBattleResult] and a jr nz, .asm_60b82 - SetEvent EVENT_10F + SetEvent EVENT_BEAT_GHOST_MAROWAK ld a, $7 ld [hSpriteIndexOrTextID], a call DisplayTextID diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index c2fe1508..3698f4ee 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -256,8 +256,8 @@ PokemonTower7FujiText: TX_ASM ld hl, TowerRescueFujiText call PrintText - SetEvent EVENT_4CF - SetEvent EVENT_117 + SetEvent EVENT_RESCUED_MR_FUJI + SetEvent EVENT_RESCUED_MR_FUJI_2 ld a, HS_LAVENDER_HOUSE_1_MR_FUJI ld [wcc4d], a predef ShowObject diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index e6ba430b..3c312d4c 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -13,17 +13,16 @@ RocketHideout4Script_45473: ; 45473 (11:5473) bit 5, [hl] res 5, [hl] ret z - CheckEvent EVENT_6A5 + CheckEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED jr nz, .asm_45496 - and $c - cp $c + CheckBothEventsSet EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0, EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1 jr z, .asm_4548c ld a, $2d jr .asm_45498 .asm_4548c ld a, SFX_GO_INSIDE call PlaySound - SetEvent EVENT_6A5 + SetEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED .asm_45496 ld a, $e .asm_45498 @@ -51,7 +50,7 @@ RocketHideout4Script3: ; 454b6 (11:54b6) call UpdateSprites ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_6A7 + SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ld a, $a ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -117,7 +116,7 @@ RocketHideout4TrainerHeader3: ; 4552d (11:552d) RocketHideout4Text1: ; 4553a (11:553a) TX_ASM - CheckEvent EVENT_6A7 + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI jp nz, .asm_545571 ld hl, RocketHideout4Text_4557a call PrintText @@ -209,7 +208,7 @@ RocketHideout4AfterBattleText4: ; 455cf (11:55cf) TX_ASM ld hl, RocketHideout4Text_455ec call PrintText - CheckAndSetEvent EVENT_6A6 + CheckAndSetEvent EVENT_ROCKET_DROPPED_LIFT_KEY jr nz, .asm_455e9 ld a, HS_ROCKET_HIDEOUT_4_ITEM_5 ld [wcc4d], a diff --git a/scripts/route1.asm b/scripts/route1.asm index d1e39c06..6c00e555 100755 --- a/scripts/route1.asm +++ b/scripts/route1.asm @@ -8,7 +8,7 @@ Route1TextPointers: ; 1cab2 (7:4ab2) Route1Text1: ; 1cab8 (7:4ab8) TX_ASM - CheckAndSetEvent EVENT_3C0 + CheckAndSetEvent EVENT_GOT_POTION_SAMPLE jr nz, .asm_1cada ld hl, Route1ViridianMartSampleText call PrintText diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index 7720b176..9bae1398 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -17,7 +17,7 @@ Route11GateUpstairsScriptEnd: ; 49469 (12:5469) Route11GateUpstairsText2: ; 4946c (12:546c) TX_ASM - CheckEvent EVENT_47F, 1 + CheckEvent EVENT_GOT_ITEMFINDER, 1 jr c, .asm_4949b ld a, 30 ; pokemon needed ld [$ffdb], a @@ -34,7 +34,7 @@ Route11GateUpstairsText2: ; 4946c (12:546c) ld a, [$ffdb] dec a jr nz, .asm_494a1 - SetEvent EVENT_47F + SetEvent EVENT_GOT_ITEMFINDER .asm_4949b ld hl, Route11GateUpstairsText_494a3 call PrintText diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index e1f8901f..f651d373 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -8,7 +8,7 @@ Route12GateUpstairsTextPointers: ; 49563 (12:5563) Route12GateUpstairsText1: ; 49569 (12:5569) TX_ASM - CheckEvent EVENT_480, 1 + CheckEvent EVENT_GOT_TM39, 1 jr c, .asm_0ad3c ld hl, TM39PreReceiveText call PrintText @@ -17,7 +17,7 @@ Route12GateUpstairsText1: ; 49569 (12:5569) jr nc, .BagFull ld hl, ReceivedTM39Text call PrintText - SetEvent EVENT_480 + SetEvent EVENT_GOT_TM39 jr .asm_4ba56 .BagFull ld hl, TM39NoRoomText diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm index e3a3cf3b..cedabdc0 100755 --- a/scripts/route15gateupstairs.asm +++ b/scripts/route15gateupstairs.asm @@ -7,7 +7,7 @@ Route15GateUpstairsTextPointers: ; 4964d (12:564d) Route15GateUpstairsText1: ; 49651 (12:5651) TX_ASM - CheckEvent EVENT_4B0 + CheckEvent EVENT_GOT_EXP_ALL jr nz, .asm_49683 ld a, 50 ; pokemon needed ld [$ffdb], a @@ -23,7 +23,7 @@ Route15GateUpstairsText1: ; 49651 (12:5651) ld a, [$ffdb] cp $1 jr nz, .asm_49689 - SetEvent EVENT_4B0 + SetEvent EVENT_GOT_EXP_ALL .asm_49683 ld hl, Route15GateUpstairsText_4968c call PrintText diff --git a/scripts/route16house.asm b/scripts/route16house.asm index d01465cb..4a0ac0c3 100755 --- a/scripts/route16house.asm +++ b/scripts/route16house.asm @@ -7,7 +7,7 @@ Route16HouseTextPointers: ; 1e5fb (7:65fb) Route16HouseText1: ; 1e5ff (7:65ff) TX_ASM - CheckEvent EVENT_4CE + CheckEvent EVENT_GOT_HM02 ld hl, HM02ExplanationText jr nz, .asm_13616 ld hl, Route16HouseText3 @@ -15,7 +15,7 @@ Route16HouseText1: ; 1e5ff (7:65ff) ld bc, (HM_02 << 8) | 1 call GiveItem jr nc, .BagFull - SetEvent EVENT_4CE + SetEvent EVENT_GOT_HM02 ld hl, ReceivedHM02Text jr .asm_13616 .BagFull diff --git a/scripts/route20.asm b/scripts/route20.asm index f4690732..2ef51da9 100755 --- a/scripts/route20.asm +++ b/scripts/route20.asm @@ -1,5 +1,5 @@ Route20Script: ; 50ca9 (14:4ca9) - CheckAndResetEvent EVENT_500 + CheckAndResetEvent EVENT_IN_SEAFOAM_ISLANDS call nz, Route20Script_50cc6 call EnableAutoTextBoxDrawing ld hl, Route20TrainerHeader0 @@ -10,7 +10,7 @@ Route20Script: ; 50ca9 (14:4ca9) ret Route20Script_50cc6: ; 50cc6 (14:4cc6) - CheckBothEventsSet EVENT_9C8, EVENT_9C9 + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE jr z, .asm_50cef ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1 call Route20Script_50d0c @@ -36,7 +36,7 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6) db $FF .asm_50cef - CheckBothEventsSet EVENT_9D0, EVENT_9D1 + CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 call Route20Script_50d0c diff --git a/scripts/route22.asm b/scripts/route22.asm index dec8afd6..73fe2f55 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -55,7 +55,7 @@ Route22RivalMovementData: ; 50efb (14:4efb) db $FF Route22Script0: ; 50f00 (14:4f00) - CheckEvent EVENT_527 + CheckEvent EVENT_ROUTE22_RIVAL_WANTS_FIGHT ret z ld hl, .Route22RivalBattleCoords call ArePlayerCoordsInArray @@ -68,9 +68,9 @@ Route22Script0: ; 50f00 (14:4f00) ld [wJoyIgnore], a ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a - CheckEvent EVENT_520 + CheckEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE jr nz, .firstRivalBattle - CheckEventReuseA EVENT_521 ; is this the rival at the end of the game? + CheckEventReuseA EVENT_2ND_ROUTE22_RIVAL_BATTLE ; is this the rival at the end of the game? jp nz, Route22Script_5104e ret @@ -163,7 +163,7 @@ Route22Script2: ; 50fb5 (14:4fb5) call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_525 + SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT ld a, $1 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -227,7 +227,7 @@ Route22Script3: ; 5102a (14:502a) ld [wcc4d], a predef HideObject call PlayDefaultMusic - ResetEvents EVENT_520, EVENT_527 + ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT ld a, $0 ld [W_ROUTE22CURSCRIPT], a ret @@ -322,7 +322,7 @@ Route22Script5: ; 510df (14:50df) call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_526 + SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_FIGHT ld a, $2 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -372,7 +372,7 @@ Route22Script6: ; 51151 (14:5151) ld [wcc4d], a predef HideObject call PlayDefaultMusic - ResetEvents EVENT_521, EVENT_527 + ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT ld a, $7 ld [W_ROUTE22CURSCRIPT], a ret @@ -384,7 +384,7 @@ Route22TextPointers: ; 51175 (14:5175) Route22Text1: ; 5117b (14:517b) TX_ASM - CheckEvent EVENT_525 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT jr z, .asm_5118b ld hl, Route22RivalAfterBattleText1 call PrintText @@ -397,7 +397,7 @@ Route22Text1: ; 5117b (14:517b) Route22Text2: ; 51194 (14:5194) TX_ASM - CheckEvent EVENT_526 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_FIGHT jr z, .asm_511a4 ld hl, Route22RivalAfterBattleText2 call PrintText diff --git a/scripts/route23.asm b/scripts/route23.asm index e17b7d23..adc631d8 100755 --- a/scripts/route23.asm +++ b/scripts/route23.asm @@ -10,8 +10,8 @@ Route23Script_511e9: ; 511e9 (14:51e9) bit 6, [hl] res 6, [hl] ret z - ResetEvents EVENT_538, EVENT_53F - ResetEvents EVENT_660, EVENT_666 + ResetEvents EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 + ResetEvents EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 ld a, HS_VICTORY_ROAD_3_BOULDER ld [wcc4d], a predef ShowObject @@ -29,7 +29,7 @@ Route23Script0: ; 51219 (14:5219) ld a, [W_YCOORD] ld b, a ld e, $0 - EventFlagBit c, EVENT_536 + 1, EVENT_530 + EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK .asm_51224 ld a, [hli] cp $ff @@ -49,7 +49,7 @@ Route23Script0: ; 51219 (14:5219) ld a, c ld [wWhichBadge], a ld b, FLAG_TEST - EventFlagAddress hl, EVENT_530 + EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK predef FlagActionPredef ld a, c and a @@ -143,43 +143,43 @@ Route23TextPointers: ; 512f7 (14:52f7) Route23Text1: ; 51307 (14:5307) TX_ASM - EventFlagBit a, EVENT_536, EVENT_530 + EventFlagBit a, EVENT_PASSED_EARTHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text2: ; 51310 (14:5310) TX_ASM - EventFlagBit a, EVENT_535, EVENT_530 + EventFlagBit a, EVENT_PASSED_VOLCANOBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text3: ; 51319 (14:5319) TX_ASM - EventFlagBit a, EVENT_534, EVENT_530 + EventFlagBit a, EVENT_PASSED_MARSHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text4: ; 51322 (14:5322) TX_ASM - EventFlagBit a, EVENT_533, EVENT_530 + EventFlagBit a, EVENT_PASSED_SOULBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text5: ; 5132b (14:532b) TX_ASM - EventFlagBit a, EVENT_532, EVENT_530 + EventFlagBit a, EVENT_PASSED_RAINBOWBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text6: ; 51334 (14:5334) TX_ASM - EventFlagBit a, EVENT_531, EVENT_530 + EventFlagBit a, EVENT_PASSED_THUNDERBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text7: ; 5133d (14:533d) TX_ASM - EventFlagBit a, EVENT_530 + EventFlagBit a, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd @@ -207,7 +207,7 @@ Route23Script_51346: ; 51346 (14:5346) ld a, [wWhichBadge] ld c, a ld b, FLAG_SET - EventFlagAddress hl, EVENT_530 + EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK predef FlagActionPredef ld a, $2 ld [W_ROUTE23CURSCRIPT], a diff --git a/scripts/route24.asm b/scripts/route24.asm index c946159c..4e83a5cd 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -22,7 +22,7 @@ Route24ScriptPointers: ; 513cb (14:53cb) dw Route24Script4 Route24Script0: ; 513d5 (14:53d5) - CheckEvent EVENT_540 + CheckEvent EVENT_GOT_NUGGET jp nz, CheckFightingMapTrainers ld hl, CoordsData_5140e call ArePlayerCoordsInArray @@ -32,7 +32,7 @@ Route24Script0: ; 513d5 (14:53d5) ld a, $1 ld [hSpriteIndexOrTextID], a call DisplayTextID - CheckAndResetEvent EVENT_549 + CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE ret z ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a @@ -64,7 +64,7 @@ Route24Script3: ; 51422 (14:5422) call UpdateSprites ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_541 + SetEvent EVENT_BEAT_ROUTE24_ROCKET ld a, $1 ld [hSpriteIndexOrTextID], a call DisplayTextID @@ -144,15 +144,15 @@ Route24TrainerHeader6: ; 51497 (14:5497) Route24Text1: ; 514a4 (14:54a4) TX_ASM - ResetEvent EVENT_549 - CheckEvent EVENT_540 + ResetEvent EVENT_NUGGET_REWARD_AVAILABLE + CheckEvent EVENT_GOT_NUGGET jr nz, .asm_514f9 ld hl, Route24Text_51510 call PrintText ld bc, (NUGGET << 8) | 1 call GiveItem jr nc, .BagFull - SetEvent EVENT_540 + SetEvent EVENT_GOT_NUGGET ld hl, Route24Text_5151a call PrintText ld hl, Route24Text_51526 @@ -180,7 +180,7 @@ Route24Text1: ; 514a4 (14:54a4) .BagFull ld hl, Route24Text_51521 call PrintText - SetEvent EVENT_549 + SetEvent EVENT_NUGGET_REWARD_AVAILABLE jp TextScriptEnd Route24Text_51510: ; 51510 (14:5510) diff --git a/scripts/route25.asm b/scripts/route25.asm index 6bbb5e26..a123d74a 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -13,18 +13,18 @@ Route25Script_515e1: ; 515e1 (14:55e1) bit 6, [hl] res 6, [hl] ret z - CheckEventHL EVENT_55F + CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ret nz - CheckEventReuseHL EVENT_55D + CheckEventReuseHL EVENT_MET_BILL_2 jr nz, .asm_515ff - ResetEventReuseHL EVENT_55E + ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR ld a, HS_BILL_POKEMON ld [wcc4d], a predef_jump ShowObject .asm_515ff - CheckEventAfterBranchReuseHL EVENT_55C, EVENT_55D + CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2 ret z - SetEventReuseHL EVENT_55F + SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ld a, HS_NUGGET_BRIDGE_GUY ld [wcc4d], a predef HideObject diff --git a/scripts/route2gate.asm b/scripts/route2gate.asm index 49c28e02..789482dc 100755 --- a/scripts/route2gate.asm +++ b/scripts/route2gate.asm @@ -7,7 +7,7 @@ Route2GateTextPointers: ; 5d5d7 (17:55d7) Route2GateText1: ; 5d5db (17:55db) TX_ASM - CheckEvent EVENT_3D8 + CheckEvent EVENT_GOT_HM05 jr nz, .asm_5d60d ld a, 10 ; pokemon needed ld [$ffdb], a @@ -23,7 +23,7 @@ Route2GateText1: ; 5d5db (17:55db) ld a, [$ffdb] cp $1 jr nz, .asm_5d613 - SetEvent EVENT_3D8 + SetEvent EVENT_GOT_HM05 .asm_5d60d ld hl, Route2GateText_5d616 call PrintText diff --git a/scripts/safarizonesecrethouse.asm b/scripts/safarizonesecrethouse.asm index 48992d94..6cf17b9d 100755 --- a/scripts/safarizonesecrethouse.asm +++ b/scripts/safarizonesecrethouse.asm @@ -6,7 +6,7 @@ SafariZoneSecretHouseTextPointers: ; 4a31a (12:631a) SafariZoneSecretHouseText1: ; 4a31c (12:631c) TX_ASM - CheckEvent EVENT_880 + CheckEvent EVENT_GOT_HM03 jr nz, .asm_20a9b ld hl, SafariZoneSecretHouseText_4a350 call PrintText @@ -15,7 +15,7 @@ SafariZoneSecretHouseText1: ; 4a31c (12:631c) jr nc, .BagFull ld hl, ReceivedHM03Text call PrintText - SetEvent EVENT_880 + SetEvent EVENT_GOT_HM03 jr .asm_8f1fc .BagFull ld hl, HM03NoRoomText diff --git a/scripts/saffronhouse2.asm b/scripts/saffronhouse2.asm index 68300183..f3ec4c99 100755 --- a/scripts/saffronhouse2.asm +++ b/scripts/saffronhouse2.asm @@ -6,7 +6,7 @@ SaffronHouse2TextPointers: ; 1de3f (7:5e3f) SaffronHouse2Text1: ; 1de41 (7:5e41) TX_ASM - CheckEvent EVENT_3B0 + CheckEvent EVENT_GOT_TM29 jr nz, .asm_9e72b ld hl, TM29PreReceiveText call PrintText @@ -15,7 +15,7 @@ SaffronHouse2Text1: ; 1de41 (7:5e41) jr nc, .BagFull ld hl, ReceivedTM29Text call PrintText - SetEvent EVENT_3B0 + SetEvent EVENT_GOT_TM29 jr .asm_fe4e1 .BagFull ld hl, TM29NoRoomText diff --git a/scripts/seafoamislands1.asm b/scripts/seafoamislands1.asm index 89972aca..542afe18 100755 --- a/scripts/seafoamislands1.asm +++ b/scripts/seafoamislands1.asm @@ -1,6 +1,6 @@ SeafoamIslands1Script: ; 447e9 (11:47e9) call EnableAutoTextBoxDrawing - SetEvent EVENT_500 + SetEvent EVENT_IN_SEAFOAM_ISLANDS ld hl, wFlags_0xcd60 bit 7, [hl] res 7, [hl] @@ -8,18 +8,18 @@ SeafoamIslands1Script: ; 447e9 (11:47e9) ld hl, Seafoam1HolesCoords call CheckBoulderCoords ret nc - EventFlagAddress hl, EVENT_50E + EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ld a, [wCoordIndex] cp $1 jr nz, .asm_44819 - SetEventReuseHL EVENT_50E + SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 ld [wd07a], a jr .asm_44825 .asm_44819 - SetEventAfterBranchReuseHL EVENT_50F, EVENT_50E + SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 diff --git a/scripts/seafoamislands2.asm b/scripts/seafoamislands2.asm index c24ba601..bf81a467 100755 --- a/scripts/seafoamislands2.asm +++ b/scripts/seafoamislands2.asm @@ -7,18 +7,18 @@ SeafoamIslands2Script: ; 46315 (11:6315) ld hl, Seafoam2HolesCoords call CheckBoulderCoords ret nc - EventFlagAddress hl, EVENT_9C0 + EventFlagAddress hl, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, [wCoordIndex] cp $1 jr nz, .asm_46340 - SetEventReuseHL EVENT_9C0 + SetEventReuseHL EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 ld [wd07a], a jr .asm_4634c .asm_46340 - SetEventAfterBranchReuseHL EVENT_9C1, EVENT_9C0 + SetEventAfterBranchReuseHL EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 diff --git a/scripts/seafoamislands3.asm b/scripts/seafoamislands3.asm index f117c2a7..8f66a0ca 100755 --- a/scripts/seafoamislands3.asm +++ b/scripts/seafoamislands3.asm @@ -7,18 +7,18 @@ SeafoamIslands3Script: ; 46451 (11:6451) ld hl, Seafoam3HolesCoords call CheckBoulderCoords ret nc - EventFlagAddress hl, EVENT_9C8 + EventFlagAddress hl, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ld a, [wCoordIndex] cp $1 jr nz, .asm_4647c - SetEventReuseHL EVENT_9C8 + SetEventReuseHL EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3 ld [wd07a], a jr .asm_46488 .asm_4647c - SetEventAfterBranchReuseHL EVENT_9C9, EVENT_9C8 + SetEventAfterBranchReuseHL EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_4 diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index 031f9d13..dc198123 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -7,18 +7,18 @@ SeafoamIslands4Script: ; 4658d (11:658d) ld hl, Seafoam4HolesCoords call CheckBoulderCoords ret nc - EventFlagAddress hl, EVENT_9D0 + EventFlagAddress hl, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ld a, [wCoordIndex] cp $1 jr nz, .asm_465b8 - SetEventReuseHL EVENT_9D0 + SetEventReuseHL EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1 ld [wd07a], a jr .asm_465c4 .asm_465b8 - SetEventAfterBranchReuseHL EVENT_9D1, EVENT_9D0 + SetEventAfterBranchReuseHL EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2 ld [wd079], a ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2 @@ -56,7 +56,7 @@ SeafoamIslands4ScriptPointers: ; 465fb (11:65fb) dw SeafoamIslands4Script3 SeafoamIslands4Script0: ; 46603 (11:6603) - CheckBothEventsSet EVENT_9C8, EVENT_9C9 + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z ld a, [W_YCOORD] cp $8 @@ -91,7 +91,7 @@ SeafoamIslands4Script1: ; 46639 (11:6639) ret SeafoamIslands4Script2: ; 46644 (11:6644) - CheckBothEventsSet EVENT_9C8, EVENT_9C9 + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z ld a, [W_XCOORD] cp $12 diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index 9324a187..eca361f3 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -27,7 +27,7 @@ SeafoamIslands5Script4: ; 467b7 (11:67b7) ret SeafoamIslands5Script0: ; 467c7 (11:67c7) - CheckBothEventsSet EVENT_9C8, EVENT_9C9 + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z ld hl, CoordsData_467fe call ArePlayerCoordsInArray @@ -70,7 +70,7 @@ SeafoamIslands5Script1: ; 46807 (11:6807) ret SeafoamIslands5Script2: ; 46816 (11:6816) - CheckBothEventsSet EVENT_9D0, EVENT_9D1 + CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ld a, $0 jr z, .asm_46849 ld hl, CoordsData_4684d diff --git a/scripts/silphco1.asm b/scripts/silphco1.asm index 26c8c888..71b59d72 100755 --- a/scripts/silphco1.asm +++ b/scripts/silphco1.asm @@ -1,10 +1,10 @@ SilphCo1Script: ; 5d44e (17:544e) call EnableAutoTextBoxDrawing - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ret z - CheckAndSetEvent EVENT_397 + CheckAndSetEvent EVENT_SILPH_CO_RECEPTIONIST_AT_DESK ret nz - ld a, HS_SILPH_CO_1F_1 + ld a, HS_SILPH_CO_1F_RECEPTIONIST ld [wcc4d], a predef_jump ShowObject diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm index 7c7bf785..326b0aeb 100755 --- a/scripts/silphco10.asm +++ b/scripts/silphco10.asm @@ -16,7 +16,7 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f) ld hl, DataTable_5a173 call SilphCo2Script_59d43 call SilphCo10Text_5a176 - CheckEvent EVENT_778 + CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR ret nz ld a, $54 ld [wd09f], a @@ -30,7 +30,7 @@ SilphCo10Text_5a176: ; 5a176 (16:6176) ld a, [$ffe0] and a ret z - SetEvent EVENT_778 + SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR ret SilphCo10ScriptPointers: ; 5a180 (16:6180) @@ -81,7 +81,7 @@ SilphCo10Text2: ; 5a1b5 (16:61b5) SilphCo10Text3: ; 5a1bf (16:61bf) TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo10Text_5a1d8 jr nz, .asm_cf85f ld hl, SilphCo10Text_5a1d3 diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index b855e6d0..8f37b57f 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -16,7 +16,7 @@ SilphCo11Script_62110: ; 62110 (18:6110) ld hl, DataTable_62134 call SilphCo11Script_62137 call SilphCo11Script_62163 - CheckEvent EVENT_788 + CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR ret nz ld a, $20 ld [wd09f], a @@ -66,7 +66,7 @@ SilphCo11Script_62163: ; 62163 (18:6163) ld a, [$ffe0] and a ret z - SetEvent EVENT_788 + SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR ret SilphCo11Script_6216d: ; 6216d (18:616d) @@ -162,7 +162,7 @@ SilphCo11ScriptPointers: ; 621cf (18:61cf) dw SilphCo11Script5 SilphCo11Script0: ; 621db (18:61db) - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ret nz ld hl, CoordsData_62211 call ArePlayerCoordsInArray @@ -228,7 +228,7 @@ SilphCo11Script5: ; 62227 (18:6227) call UpdateSprites call Delay3 call GBFadeInFromBlack - SetEvent EVENT_78F + SetEvent EVENT_BEAT_SILPH_CO_GIOVANNI xor a ld [wJoyIgnore], a jp SilphCo11Script_621c8 @@ -302,7 +302,7 @@ SilphCo11TrainerHeader1: ; 622cf (18:62cf) SilphCo11Text1: ; 622dc (18:62dc) TX_ASM - CheckEvent EVENT_78D + CheckEvent EVENT_GOT_MASTER_BALL jp nz, .asm_62308 ld hl, SilphCoPresidentText call PrintText @@ -311,7 +311,7 @@ SilphCo11Text1: ; 622dc (18:62dc) jr nc, .BagFull ld hl, ReceivedSilphCoMasterBallText call PrintText - SetEvent EVENT_78D + SetEvent EVENT_GOT_MASTER_BALL jr .asm_6230e .BagFull ld hl, SilphCoMasterBallNoRoomText diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm index eb6b1b8e..a8d0fa56 100755 --- a/scripts/silphco2.asm +++ b/scripts/silphco2.asm @@ -16,7 +16,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) ld hl, DataTable_59d3e call SilphCo2Script_59d43 call SilphCo2Script_59d6f - CheckEvent EVENT_6FD + CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1 jr nz, .asm_59d2e push af ld a, $54 @@ -25,7 +25,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) predef ReplaceTileBlock pop af .asm_59d2e - bit 6, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret nz ld a, $54 ld [wd09f], a @@ -72,16 +72,16 @@ SilphCo2Script_59d43: ; 59d43 (16:5d43) ret SilphCo2Script_59d6f: ; 59d6f (16:5d6f) - EventFlagAddress hl, EVENT_6FD + EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next - SetEventReuseHL EVENT_6FD + SetEventReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret .next - SetEventAfterBranchReuseHL EVENT_6FE, EVENT_6FD + SetEventAfterBranchReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret SilphCo2ScriptPointers: ; 59d80 (16:5d80) @@ -137,7 +137,7 @@ SilphCo2TrainerHeader3: ; 59db4 (16:5db4) SilphCo2Text1: ; 59dc1 (16:5dc1) TX_ASM - CheckEvent EVENT_6FF + CheckEvent EVENT_GOT_TM36 jr nz, .asm_59de4 ld hl, SilphCo2Text_59ded call PrintText @@ -145,7 +145,7 @@ SilphCo2Text1: ; 59dc1 (16:5dc1) call GiveItem ld hl, TM36NoRoomText jr nc, .asm_59de7 - SetEvent EVENT_6FF + SetEvent EVENT_GOT_TM36 ld hl, ReceivedTM36Text jr .asm_59de7 .asm_59de4 diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 0cb54726..b55cc5eb 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -16,7 +16,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ld hl, DataTable_59fa8 call SilphCo2Script_59d43 call SilphCo3Script_59fad - CheckEvent EVENT_708 + CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 jr nz, .asm_59f98 push af ld a, $5f @@ -25,7 +25,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) predef ReplaceTileBlock pop af .asm_59f98 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret nz ld a, $5f ld [wd09f], a @@ -36,16 +36,16 @@ DataTable_59fa8: ; 59fa8 (16:5fa8) db $04,$04,$04,$08,$FF SilphCo3Script_59fad: ; 59fad (16:5fad) - EventFlagAddress hl, EVENT_708 + EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next - SetEventReuseHL EVENT_708 + SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret .next - SetEventAfterBranchReuseHL EVENT_709, EVENT_708 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret SilphCo3ScriptPointers: ; 59fbe (16:5fbe) @@ -82,7 +82,7 @@ SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) SilphCo3Text1: ; 59fe5 (16:5fe5) TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo3Text_59ffe jr nz, .asm_59fee ld hl, SilphCo3Text_59ff9 diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index aff77e4a..815170ff 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -16,7 +16,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ld hl, SilphCo4Data19d58 call SilphCo4Script_19d5d call SilphCo4Script_19d89 - CheckEvent EVENT_718 + CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 jr nz, .asm_19d48 push af ld a, $54 @@ -25,7 +25,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) predef ReplaceTileBlock pop af .asm_19d48 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret nz ld a, $54 ld [wd09f], a @@ -72,16 +72,16 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) ret SilphCo4Script_19d89: ; 19d89 (6:5d89) - EventFlagAddress hl, EVENT_718 + EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next - SetEventReuseHL EVENT_718 + SetEventReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret .next - SetEventAfterBranchReuseHL EVENT_719, EVENT_718 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret SilphCo4ScriptPointers: ; 19d9a (6:5d9a) diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index cd220b3e..ecc57537 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -16,7 +16,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld hl, SilphCo5Coords call SilphCo4Script_19d5d call SilphCo5Script_19f9e - CheckEvent EVENT_728 + CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 jr nz, .asm_19f74 push af ld a, $5f @@ -25,7 +25,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) predef ReplaceTileBlock pop af .asm_19f74 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 jr nz, .asm_19f87 push af ld a, $5f @@ -34,7 +34,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) predef ReplaceTileBlock pop af .asm_19f87 - bit 2, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ret nz ld a, $5f ld [wd09f], a @@ -45,21 +45,21 @@ SilphCo5Coords: ; 19f97 (6:5f97) db $02, $03, $06, $03, $05, $07, $ff SilphCo5Script_19f9e: ; 19f9e (6:5f9e) - EventFlagAddress hl, EVENT_728 + EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next1 - SetEventReuseHL EVENT_728 + SetEventReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret .next1 cp $2 jr nz, .next2 - SetEventAfterBranchReuseHL EVENT_729, EVENT_728 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret .next2 - SetEventAfterBranchReuseHL EVENT_72A, EVENT_728 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret SilphCo5ScriptPointers: ; 19fb6 (6:5fb6) diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm index ca52d05c..a84f0dc4 100755 --- a/scripts/silphco6.asm +++ b/scripts/silphco6.asm @@ -16,7 +16,7 @@ SilphCo6Script_1a1bf: ; 1a1bf (6:61bf) ld hl, SilphCo6Coords1 call SilphCo4Script_19d5d call SilphCo6Script_1a1e6 - CheckEvent EVENT_73F + CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR ret nz ld a, $5f ld [wd09f], a @@ -31,7 +31,7 @@ SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6) ld a, [$ffe0] and a ret z - SetEvent EVENT_73F + SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR ret SilphCo6ScriptPointers: ; 1a1f0 (6:61f0) @@ -82,7 +82,7 @@ SilphCo6TrainerHeader3: ; 1a222 (6:6222) db $ff SilphCo6Script_1a22f: ; 1a22f (6:622f) - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .asm_1a238 jr .asm_1a23a .asm_1a238 diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm index 64c79c3a..26d9e62f 100755 --- a/scripts/silphco7.asm +++ b/scripts/silphco7.asm @@ -16,7 +16,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) ld hl, DataTable_51bc1 call SilphCo7Text_51bc8 call SilphCo7Text_51bf4 - CheckEvent EVENT_74C + CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1 jr nz, .asm_51b9e push af ld a, $54 @@ -25,7 +25,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) predef ReplaceTileBlock pop af .asm_51b9e - bit 5, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 jr nz, .asm_51bb1 push af ld a, $54 @@ -34,7 +34,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) predef ReplaceTileBlock pop af .asm_51bb1 - bit 6, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR2 ret nz ld a, $54 ld [wd09f], a @@ -81,21 +81,21 @@ SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) ret SilphCo7Text_51bf4: ; 51bf4 (14:5bf4) - EventFlagAddress hl, EVENT_74C + EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next1 - SetEventReuseHL EVENT_74C + SetEventReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret .next1 cp $2 jr nz, .next2 - SetEventAfterBranchReuseHL EVENT_74D, EVENT_74C + SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret .next2 - SetEventAfterBranchReuseHL EVENT_74E, EVENT_74C + SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret SilphCo7Text_51c0c: ; 51c0c (14:5c0c) @@ -116,7 +116,7 @@ SilphCo7ScriptPointers: ; 51c17 (14:5c17) dw SilphCo7Script5 SilphCo7Script0: ; 51c23 (14:5c23) - CheckEvent EVENT_740 + CheckEvent EVENT_BEAT_SILPH_CO_RIVAL jp nz, CheckFightingMapTrainers ld hl, CoordsData_51c78 call ArePlayerCoordsInArray @@ -205,7 +205,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8) jp z, SilphCo7Text_51c0c ld a, $f0 ld [wJoyIgnore], a - SetEvent EVENT_740 + SetEvent EVENT_BEAT_SILPH_CO_RIVAL ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a ld a, $9 @@ -321,7 +321,7 @@ SilphCo7Text1: ld a, [wd72e] bit 0, a ; got lapras? jr z, .givelapras - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .LaprasGuyText call PrintText @@ -365,7 +365,7 @@ SilphCo7Text1: SilphCo7Text2: TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText @@ -386,7 +386,7 @@ SilphCo7Text2: SilphCo7Text3: TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText @@ -407,7 +407,7 @@ SilphCo7Text3: SilphCo7Text4: TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm index ec54ea8e..26a89355 100755 --- a/scripts/silphco8.asm +++ b/scripts/silphco8.asm @@ -16,7 +16,7 @@ SilphCo8Script_5651a: ; 5651a (15:651a) ld hl, DataTable_5653e call SilphCo8Script_56541 call SilphCo8Script_5656d - CheckEvent EVENT_758 + CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR ret nz ld a, $5f ld [wd09f], a @@ -66,7 +66,7 @@ SilphCo8Script_5656d: ; 5656d (15:656d) ld a, [$ffe0] and a ret z - SetEvent EVENT_758 + SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR ret SilphCo8ScriptPointers: ; 56577 (15:6577) @@ -112,7 +112,7 @@ SilphCo8TrainerHeader2: ; 5659d (15:659d) SilphCo8Text1: ; 565aa (15:65aa) TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo8Text_565c3 jr nz, .asm_565b8 ld hl, SilphCo8Text_565be diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index 2c41e019..8960c290 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -16,7 +16,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld hl, DataTable_5d82e call SilphCo9Script_5d837 call SilphCo9Script_5d863 - CheckEvent EVENT_768 + CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1 jr nz, .asm_5d7f8 push af ld a, $5f @@ -25,7 +25,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) predef ReplaceTileBlock pop af .asm_5d7f8 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 jr nz, .asm_5d80b push af ld a, $54 @@ -34,7 +34,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) predef ReplaceTileBlock pop af .asm_5d80b - bit 2, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR2 jr nz, .asm_5d81e push af ld a, $54 @@ -43,7 +43,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) predef ReplaceTileBlock pop af .asm_5d81e - bit 3, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR3 ret nz ld a, $5f ld [wd09f], a @@ -90,28 +90,28 @@ SilphCo9Script_5d837: ; 5d837 (17:5837) ret SilphCo9Script_5d863: ; 5d863 (17:5863) - EventFlagAddress hl, EVENT_768 + EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next1 - SetEventReuseHL EVENT_768 + SetEventReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret .next1 cp $2 jr nz, .next2 - SetEventAfterBranchReuseHL EVENT_769, EVENT_768 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret .next2 cp $3 jr nz, .next3 - SetEventAfterBranchReuseHL EVENT_76A, EVENT_768 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret .next3 cp $4 ret nz - SetEventAfterBranchReuseHL EVENT_76B, EVENT_768 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret SilphCo9ScriptPointers: ; 5d885 (17:5885) @@ -157,7 +157,7 @@ SilphCo9TrainerHeader2: ; 5d8ab (17:58ab) SilphCo9Text1: ; 5d8b8 (17:58b8) TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .asm_5d8dc ld hl, SilphCo9Text_5d8e5 call PrintText diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index a47cc069..a445ad46 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -3,7 +3,7 @@ SSAnne7Script: ; 61895 (18:5895) jp EnableAutoTextBoxDrawing SSAnne7Script_6189b: ; 6189b (18:589b) - CheckEvent EVENT_5E1 + CheckEvent EVENT_RUBBED_CAPTAINS_BACK ret nz ld hl, wd72d set 5, [hl] @@ -16,7 +16,7 @@ SSAnne7TextPointers: ; 618a7 (18:58a7) SSAnne7Text1: ; 618ad (18:58ad) TX_ASM - CheckEvent EVENT_5E0 + CheckEvent EVENT_GOT_HM01 jr nz, .asm_797c4 ld hl, SSAnne7RubText call PrintText @@ -27,7 +27,7 @@ SSAnne7Text1: ; 618ad (18:58ad) jr nc, .BagFull ld hl, ReceivedHM01Text call PrintText - SetEvent EVENT_5E0 + SetEvent EVENT_GOT_HM01 jr .asm_0faf5 .BagFull ld hl, HM01NoRoomText @@ -62,7 +62,7 @@ SSAnne7RubText: ; 618ec (18:58ec) cp MUSIC_PKMN_HEALED jr z, .asm_61910 call PlayDefaultMusic - SetEvent EVENT_5E1 + SetEvent EVENT_RUBBED_CAPTAINS_BACK ld hl, wd72d res 5, [hl] jp TextScriptEnd diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 0d6ccbee..7448e8f9 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -23,8 +23,8 @@ VermilionCityScript_197c0: ; 197c0 (6:57c0) VermilionCityScript_197cb: ; 197cb (6:57cb) CheckEventHL EVENT_SS_ANNE_LEFT ret z - CheckEventReuseHL EVENT_5E3 - SetEventReuseHL EVENT_5E3 + CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT + SetEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT ret nz ld a, $2 ld [W_VERMILIONCITYCURSCRIPT], a diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 20288102..a65b3603 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -1,20 +1,20 @@ VermilionDockScript: ; 1db52 (7:5b52) call EnableAutoTextBoxDrawing - CheckEventHL EVENT_5E4 + CheckEventHL EVENT_STARTED_WALKING_OUT_OF_DOCK jr nz, .asm_1db8d - CheckEventReuseHL EVENT_5E0 + CheckEventReuseHL EVENT_GOT_HM01 ret z ld a, [wDestinationWarpID] cp $1 ret nz CheckEventReuseHL EVENT_SS_ANNE_LEFT jp z, VermilionDock_1db9b - SetEventReuseHL EVENT_5E4 + SetEventReuseHL EVENT_STARTED_WALKING_OUT_OF_DOCK call Delay3 ld hl, wd730 set 7, [hl] ld hl, wSimulatedJoypadStatesEnd - ld a, $40 + ld a, D_UP ld [hli], a ld [hli], a ld [hl], a @@ -27,13 +27,13 @@ VermilionDockScript: ; 1db52 (7:5b52) ld [wJoyIgnore], a ret .asm_1db8d - CheckEventAfterBranchReuseHL EVENT_5E5, EVENT_5E4 + CheckEventAfterBranchReuseHL EVENT_WALKED_OUT_OF_DOCK, EVENT_STARTED_WALKING_OUT_OF_DOCK ret nz ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld [wJoyIgnore], a - SetEventReuseHL EVENT_5E5 + SetEventReuseHL EVENT_WALKED_OUT_OF_DOCK ret VermilionDock_1db9b: ; 1db9b (7:5b9b) diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index e8b90e05..91e20ad3 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -11,7 +11,7 @@ VictoryRoad1Script: ; 5da0a (17:5a0a) ld [W_VICTORYROAD1CURSCRIPT], a ret .next - CheckEvent EVENT_917 + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret z ld a, $1d ld [wd09f], a @@ -24,14 +24,14 @@ VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) dw EndTrainerBattle VictoryRoad1Script0: ; 5da40 (17:5a40) - CheckEvent EVENT_917 + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH jp nz, CheckFightingMapTrainers ld hl, CoordsData_5da5c call CheckBoulderCoords jp nc, CheckFightingMapTrainers ld hl, wd126 set 5, [hl] - SetEvent EVENT_917 + SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret CoordsData_5da5c: ; 5da5c (17:5a5c) diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index 46755c46..b7aa40b5 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -16,10 +16,10 @@ VictoryRoad2Script: ; 5179d (14:579d) ret VictoryRoad2Script_517c4: ; 517c4 (14:57c4) - ResetEvent EVENT_917 + ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH VictoryRoad2Script_517c9: ; 517c9 (14:57c9) - CheckEvent EVENT_538 + CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 jr z, .asm_517da push af ld a, $15 @@ -46,17 +46,17 @@ VictoryRoad2Script0: ; 517f1 (14:57f1) ld hl, CoordsData_51816 call CheckBoulderCoords jp nc, CheckFightingMapTrainers - EventFlagAddress hl, EVENT_538 + EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ld a, [wCoordIndex] cp $2 jr z, .asm_5180b - CheckEventReuseHL EVENT_538 - SetEventReuseHL EVENT_538 + CheckEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 + SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ret nz jr .asm_51810 .asm_5180b - CheckEventAfterBranchReuseHL EVENT_53F, EVENT_538 - SetEventReuseHL EVENT_53F + CheckEventAfterBranchReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 + SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 ret nz .asm_51810 ld hl, wd126 diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index bbb64272..2984e4ae 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -13,7 +13,7 @@ VictoryRoad3Script_44996: ; 44996 (11:4996) bit 5, [hl] res 5, [hl] ret z - CheckEventHL EVENT_660 + CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ret z ld a, $1d ld [wd09f], a @@ -38,10 +38,10 @@ VictoryRoad3Script0: ; 449b7 (11:49b7) jr nz, .asm_449dc ld hl, wd126 set 5, [hl] - SetEvent EVENT_660 + SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ret .asm_449dc - CheckAndSetEvent EVENT_666 + CheckAndSetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 jr nz, .asm_449fe ld a, HS_VICTORY_ROAD_3_BOULDER ld [wcc4d], a diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index 2d55cc44..7cdf5ad8 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -15,12 +15,12 @@ ViridianCityScript0: ; 19005 (6:5005) jp ViridianCityScript_1903d ViridianCityScript_1900b: ; 1900b (6:500b) - CheckEvent EVENT_028 + CheckEvent EVENT_VIRIDIAN_GYM_OPEN ret nz ld a, [W_OBTAINEDBADGES] cp %01111111 jr nz, .asm_1901e - SetEvent EVENT_028 + SetEvent EVENT_VIRIDIAN_GYM_OPEN ret .asm_1901e ld a, [W_YCOORD] @@ -231,7 +231,7 @@ ViridianCityText_19191: ; 19191 (6:5191) ViridianCityText6: ; 19196 (6:5196) TX_ASM - CheckEvent EVENT_029 + CheckEvent EVENT_GOT_TM42 jr nz, .asm_4e5a0 ld hl, ViridianCityText_191ca call PrintText @@ -240,7 +240,7 @@ ViridianCityText6: ; 19196 (6:5196) jr nc, .BagFull ld hl, ReceivedTM42Text call PrintText - SetEvent EVENT_029 + SetEvent EVENT_GOT_TM42 jr .asm_3c73c .BagFull ld hl, TM42NoRoomText diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 1dd736cf..2124d965 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -165,7 +165,7 @@ ViridianGymScript3_74995: ; 74995 (1d:4995) ld a, HS_ROUTE_22_RIVAL_2 ld [wcc4d], a predef ShowObject - SetEvents EVENT_521, EVENT_527 + SetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT jp ViridianGymScript_748d6 ViridianGymTextPointers: ; 749ec (1d:49ec) diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 7008ba5b..986ac8f1 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -6,7 +6,7 @@ ViridianMartScript: ; 1d46e (7:546e) jp CallFunctionInTable ViridianMartScript_1d47d: ; 1d47d (7:547d) - CheckEvent EVENT_038 + CheckEvent EVENT_OAK_GOT_PARCEL jr nz, .asm_1d489 ld hl, ViridianMartTextPointers jr .asm_1d48c @@ -54,7 +54,7 @@ ViridianMartScript1: ; 1d4c0 (7:54c0) call DisplayTextID ld bc, (OAKS_PARCEL << 8) + 1 call GiveItem - SetEvent EVENT_039 + SetEvent EVENT_GOT_OAKS_PARCEL ld a, $2 ld [W_VIRIDIANMARKETCURSCRIPT], a ; fallthrough |