diff --git a/constants/event_flags.asm b/constants/event_flags.asm index 614e4ee1d..692db4882 100644 --- a/constants/event_flags.asm +++ b/constants/event_flags.asm @@ -30,11 +30,14 @@ EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER EQU $025 EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE EQU $026 EVENT_GOT_BERRY_FROM_ROUTE_30_HOUSE EQU $027 EVENT_MADE_WHITNEY_CRY EQU $028 +EVENT_HERDED_FARFETCHD EQU $029 EVENT_FOUGHT_SUDOWOODO EQU $02a EVENT_CLEARED_SLOWPOKE_WELL EQU $02b EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE EQU $02c EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE EQU $02d EVENT_MADE_UNOWN_APPEAR_IN_RUINS EQU $02e +EVENT_FAST_SHIP_DESTINATION_OLIVINE EQU $02f +EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS EQU $037 EVENT_HEALED_MOOMOO EQU $03d EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM EQU $03e EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO EQU $03f @@ -98,7 +101,14 @@ EVENT_RELEASED_THE_BEASTS EQU $07b EVENT_GOT_MASTER_BALL_FROM_ELM EQU $07c EVENT_FOUND_REVIVE_IN_ROCKET_BASE_B1F EQU $086 EVENT_MET_FLORIA EQU $0b9 +EVENT_BUGGING_KURT_TOO_MUCH EQU $0bb +EVENT_TALKED_TO_RUINS_COWARD EQU $0bc +EVENT_GOT_DRATINI EQU $0bd EVENT_CAN_GIVE_GS_BALL_TO_KURT EQU $0be +EVENT_GAVE_GS_BALL_TO_KURT EQU $0bf +EVENT_FOREST_IS_RESTLESS EQU $0c0 +EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG EQU $0c1 +EVENT_GOT_NUGGET_FROM_GUY EQU $0c8 EVENT_RETURNED_MACHINE_PART EQU $0c9 EVENT_MET_MANAGER_AT_POWER_PLANT EQU $0ca EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM EQU $0cb @@ -113,6 +123,7 @@ EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT_BUT_BAG_WAS_FULL EQU $0d3 EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT EQU $0d4 EVENT_TALKED_TO_SEAFOAM_GYM_GUY_ONCE EQU $0d5 EVENT_ENABLE_DIPLOMA_PRINTING EQU $0d6 +EVENT_CINNABAR_ROCKS_CLEARED EQU $0d7 EVENT_CLEARED_NUGGET_BRIDGE EQU $0d8 EVENT_TALKED_TO_WARDENS_GRANDDAUGHTER EQU $0d9 EVENT_GOT_TM03_CURSE EQU $0da @@ -126,9 +137,10 @@ EVENT_TALKED_TO_OAK_IN_KANTO EQU $0e1 EVENT_GOT_HP_UP_FROM_VERMILION_GUY EQU $0e2 EVENT_GOT_TM29_PSYCHIC EQU $0e3 EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE EQU $0f9 +EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY EQU $0fa EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM EQU $0fb EVENT_JACK_ASKED_FOR_PHONE_NUMBER EQU $25f -EVENT_SHOWED_BEVERLY_MARILL EQU $261 +EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER EQU $261 EVENT_HUEY_ASKED_FOR_PHONE_NUMBER EQU $263 EVENT_GOT_PROTEIN_FROM_HUEY EQU $265 EVENT_GOT_HP_UP_FROM_JOEY EQU $266 @@ -207,6 +219,13 @@ EVENT_EXPLODING_TRAP_21 EQU $2fd EVENT_EXPLODING_TRAP_22 EQU $2fe EVENT_LEARNED_HAIL_GIOVANNI EQU $2ff EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER EQU $300 +EVENT_LEARNED_SLOWPOKETAIL EQU $301 +EVENT_LEARNED_RATICATE_TAIL EQU $302 +EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE EQU $303 +EVENT_WAREHOUSE_LAYOUT_1 EQU $304 +EVENT_WAREHOUSE_LAYOUT_2 EQU $305 +EVENT_WAREHOUSE_LAYOUT_3 EQU $306 +EVENT_WAREHOUSE_BLOCKED_OFF EQU $307 EVENT_WILLS_ROOM_EXIT_OPEN EQU $30a EVENT_WILLS_ROOM_ENTRANCE_CLOSED EQU $30b EVENT_KOGAS_ROOM_EXIT_OPEN EQU $30c @@ -242,6 +261,8 @@ EVENT_WADE_HAS_BITTER_BERRY EQU $32e EVENT_WILTON_HAS_ULTRA_BALL EQU $32f EVENT_WILTON_HAS_GREAT_BALL EQU $330 EVENT_WILTON_HAS_POKE_BALL EQU $331 +EVENT_HOLE_IN_BURNED_TOWER EQU $332 +EVENT_FOUGHT_EUSINE EQU $333 EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER EQU $334 EVENT_FOUGHT_SUICUNE EQU $335 EVENT_GOT_RAINBOW_WING EQU $336 @@ -630,9 +651,11 @@ EVENT_BOULDER_IN_ICE_PATH_1 EQU $70d EVENT_BOULDER_IN_ICE_PATH_2 EQU $70e EVENT_BOULDER_IN_ICE_PATH_3 EQU $70f EVENT_BOULDER_IN_ICE_PATH_4 EQU $710 +EVENT_MET_BILL EQU $712 EVENT_OPENED_MT_SILVER EQU $74f EVENT_FOUGHT_SNORLAX EQU $750 EVENT_RED_IN_MT_SILVER EQU $762 +EVENT_RANG_CLEAR_BELL EQU $767 EVENT_FLORIA_AT_SUDOWOODO EQU $769 EVENT_TRAINERS_IN_CERULEAN_GYM EQU $76f EVENT_BLUE_IN_CINNABAR EQU $775 @@ -654,6 +677,7 @@ EVENT_PICKED_UP_GOLD_BERRY_FROM_AERODACTYL_ITEM_ROOM EQU $7a0 EVENT_PICKED_UP_MOON_STONE_FROM_AERODACTYL_ITEM_ROOM EQU $7a1 EVENT_PICKED_UP_HEAL_POWDER_FROM_AERODACTYL_ITEM_ROOM EQU $7a2 EVENT_PICKED_UP_ENERGY_ROOT_FROM_AERODACTYL_ITEM_ROOM EQU $7a3 +EVENT_EUSINE_IN_BURNED_TOWER EQU $7aa EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY EQU $7ae EVENT_SAW_SUICUNE_ON_ROUTE_42 EQU $7af EVENT_SAW_SUICUNE_ON_ROUTE_36 EQU $7b0 diff --git a/engine/std_scripts.asm b/engine/std_scripts.asm index 610c5ec87..65ed1cc77 100644 --- a/engine/std_scripts.asm +++ b/engine/std_scripts.asm @@ -291,7 +291,7 @@ GoldenrodRocketsScript: end RadioTowerRocketsScript: - setflag $0013 + setflag ENGINE_BIKE_SHOP_CALL_ENABLED setevent $06cf setevent $06d1 clearevent $06ce @@ -377,7 +377,7 @@ UnknownScript_0xbc2d4: setevent $0727 setevent $0728 setevent $0729 - setflag $0051 + setflag ENGINE_51 special PlayMapMusic end ; 0xbc31e @@ -583,7 +583,7 @@ InitializeEventsScript: setevent $06ed setevent $06f0 setevent $07a9 - setevent $07aa + setevent EVENT_EUSINE_IN_BURNED_TOWER setevent $06c8 setevent $07ac setevent $07ad diff --git a/main.asm b/main.asm index b7c7f86bb..62a3b6b2f 100644 --- a/main.asm +++ b/main.asm @@ -12384,9 +12384,9 @@ String_1224f: ; 1224f ; 122c1 UnknownScript_0x122c1: ; 0x122c1 - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iffalse .script_122cd - setflag $0051 + setflag ENGINE_51 special Function13a31 .script_122cd end @@ -12721,7 +12721,7 @@ UnknownScript_0x124ce: ; 0x124ce special Function8c084 pause 40 special HealParty - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue .script_64f2 callasm HalveMoney callasm Function12527 @@ -49267,7 +49267,7 @@ UnknownScript_0x506c8: ; 0x506c8 closetext callasm Function506ef iffalse UnknownScript_0x506e9 - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue UnknownScript_0x506e5 battlecheck startbattle diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm index 4a335e23e..40df738ed 100644 --- a/maps/AzaleaTown.asm +++ b/maps/AzaleaTown.asm @@ -157,7 +157,7 @@ UnknownScript_0x1980e5: closetext verbosegiveitem GS_BALL, 1 spriteface $d, LEFT - setflag $0064 + setflag ENGINE_HAVE_EXAMINED_GS_BALL clearevent $06ed setevent $06eb dotrigger $0 diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm index 7af8b0687..fbac84097 100644 --- a/maps/BluesHouse.asm +++ b/maps/BluesHouse.asm @@ -16,7 +16,7 @@ DaisyScript_0x19b0d0: end UnknownScript_0x19b0de: - checkflag $005c + checkflag ENGINE_TEA_IN_BLUES_HOUSE iftrue UnknownScript_0x19b11e writetext UnknownText_0x19b1b6 yesorno @@ -24,9 +24,9 @@ UnknownScript_0x19b0de: writetext UnknownText_0x19b244 closetext special Function741d - if_equal $0, UnknownScript_0x19b124 - if_equal $1, UnknownScript_0x19b12a - setflag $005c + if_equal 0, UnknownScript_0x19b124 + if_equal 1, UnknownScript_0x19b12a + setflag ENGINE_TEA_IN_BLUES_HOUSE writetext UnknownText_0x19b266 closetext loadmovesprites diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm index bd597374f..89f1a8f35 100644 --- a/maps/BurnedTower1F.asm +++ b/maps/BurnedTower1F.asm @@ -25,14 +25,14 @@ UnknownScript_0x185bf7: end UnknownScript_0x185bf8: - checkevent $0332 - iftrue UnknownScript_0x185c02 - changeblock $a, $8, $32 -UnknownScript_0x185c02: + checkevent EVENT_HOLE_IN_BURNED_TOWER + iftrue .Next + changeblock $a, $8, $32 ; hole +.Next checkevent EVENT_RELEASED_THE_BEASTS - iftrue UnknownScript_0x185c0c - changeblock $6, $e, $9 -UnknownScript_0x185c0c: + iftrue .Done + changeblock $6, $e, $9 ; ladder +.Done return UnknownScript_0x185c0d: @@ -114,7 +114,7 @@ UnknownScript_0x185c80: writetext UnknownText_0x185e75 closetext loadmovesprites - setevent $0332 + setevent EVENT_HOLE_IN_BURNED_TOWER pause 15 warpcheck end diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm index b6df79023..70178189e 100644 --- a/maps/BurnedTowerB1F.asm +++ b/maps/BurnedTowerB1F.asm @@ -259,4 +259,4 @@ BurnedTowerB1F_MapEventHeader: person_event SPRITE_ENTEI, 7, 16, $6, $0, 255, 255, $d0, 0, ObjectEvent, $074b person_event SPRITE_SUICUNE, 8, 14, $6, $0, 255, 255, $d0, 0, ObjectEvent, $074b person_event SPRITE_POKE_BALL, 8, 20, $1, $0, 255, 255, $1, 0, ItemFragment_0x186231, $0657 - person_event SPRITE_SUPER_NERD, 16, 14, $7, $0, 255, 255, $90, 0, SuperNerdScript_0x186212, $07aa + person_event SPRITE_SUPER_NERD, 16, 14, $7, $0, 255, 255, $90, 0, SuperNerdScript_0x186212, EVENT_EUSINE_IN_BURNED_TOWER diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm index 04b307b6a..3a8cb4d1b 100644 --- a/maps/CeruleanCity.asm +++ b/maps/CeruleanCity.asm @@ -86,7 +86,7 @@ YoungsterScript_0x184064: writetext UnknownText_0x1842a9 closetext loadmovesprites - checkevent $00fa + checkevent EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY iffalse UnknownScript_0x184072 end @@ -141,7 +141,7 @@ CeruleanCityMartSign: jumpstd martsign MapCeruleanCitySignpostItem8: - dw $00fa + dw EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY db BERSERK_GENE UnknownText_0x1840bc: diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm index e9be52601..debe2865c 100644 --- a/maps/CherrygroveCity.asm +++ b/maps/CherrygroveCity.asm @@ -68,7 +68,7 @@ CherrygroveCityGuideGent: keeptextopen stringtotext .mapcardname, $1 scall .UnknownScript_0x19c097 - setflag $0001 + setflag ENGINE_MAP_CARD writetext GotMapCardText keeptextopen writetext GuideGentPokegearText @@ -177,7 +177,7 @@ UnknownScript_0x19c12f: TeacherScript_0x19c146: faceplayer loadfont - checkflag $0001 + checkflag ENGINE_MAP_CARD iftrue UnknownScript_0x19c154 writetext UnknownText_0x19c650 closetext @@ -193,7 +193,7 @@ UnknownScript_0x19c154: YoungsterScript_0x19c15a: faceplayer loadfont - checkflag $000b + checkflag ENGINE_POKEDEX iftrue UnknownScript_0x19c168 writetext UnknownText_0x19c6d6 closetext diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm index e4aac515d..c5f1f6586 100644 --- a/maps/CianwoodCity.asm +++ b/maps/CianwoodCity.asm @@ -20,8 +20,8 @@ CianwoodCity_MapScriptHeader: .FlyPointAndSuicune setflag ENGINE_FLYPOINT_CIANWOOD - setevent $07aa - checkevent $0333 + setevent EVENT_EUSINE_IN_BURNED_TOWER + checkevent EVENT_FOUGHT_EUSINE iffalse UnknownScript_0x1a001d disappear $c UnknownScript_0x1a001d: @@ -42,9 +42,9 @@ UnknownScript_0x1a001e: dotrigger $0 clearevent EVENT_SAW_SUICUNE_ON_ROUTE_42 domaptrigger GROUP_ROUTE_42, MAP_ROUTE_42, $1 - checkevent $0333 - iftrue UnknownScript_0x1a0083 - setevent $0333 + checkevent EVENT_FOUGHT_EUSINE + iftrue .Done + setevent EVENT_FOUGHT_EUSINE playmusic MUSIC_MYSTICALMAN_ENCOUNTER appear $c applymovement $c, MovementData_0x1a00e7 @@ -69,7 +69,7 @@ UnknownScript_0x1a001e: special Functionc48f playmapmusic pause 10 -UnknownScript_0x1a0083: +.Done end PokefanFScript_0x1a0084: diff --git a/maps/CianwoodPharmacy.asm b/maps/CianwoodPharmacy.asm index 167a64312..8fc04f9e6 100644 --- a/maps/CianwoodPharmacy.asm +++ b/maps/CianwoodPharmacy.asm @@ -16,11 +16,11 @@ CianwoodPharmacist: loadfont checkevent EVENT_GOT_SECRETPOTION_FROM_PHARMACY iftrue .Mart - checkevent $0037 + checkevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS iffalse .Mart writetext PharmacistGiveSecretpotionText keeptextopen - giveitem SECRETPOTION, $1 + giveitem SECRETPOTION, 1 writetext ReceivedSecretpotionText playsound SFX_KEY_ITEM waitbutton diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm index 17239a426..65dabd73d 100644 --- a/maps/CopycatsHouse2F.asm +++ b/maps/CopycatsHouse2F.asm @@ -10,7 +10,7 @@ CopycatsHouse2F_MapScriptHeader: dbw 2, CopycatsHouse2FCallback CopycatsHouse2FCallback: - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part1 disappear $7 appear $2 @@ -29,7 +29,7 @@ Copycat: iftrue .Part13 checkitem LOST_ITEM iftrue .Part12 - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part1 applymovement $2, MovementData_0x18afd0 faceplayer @@ -45,7 +45,7 @@ Copycat: checkevent EVENT_RETURNED_MACHINE_PART iftrue .Part7 loadfont - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part3 writetext UnknownText_0x18afda jump .Part4 @@ -55,7 +55,7 @@ Copycat: .Part4 closetext loadmovesprites - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part5 applymovement $2, MovementData_0x18afd0 jump .Part6 @@ -74,7 +74,7 @@ Copycat: .Part7 loadfont - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part8 writetext UnknownText_0x18b064 jump .Part9 @@ -84,7 +84,7 @@ Copycat: .Part9 closetext loadmovesprites - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part10 applymovement $2, MovementData_0x18afd0 jump .Part11 @@ -125,7 +125,7 @@ Copycat: end .Part15 - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part16 applymovement $2, MovementData_0x18afd0 faceplayer @@ -139,7 +139,7 @@ Copycat: .Part17 special Function14209 loadfont - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part18 writetext UnknownText_0x18b298 jump .Part19 @@ -149,7 +149,7 @@ Copycat: .Part19 closetext loadmovesprites - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Part20 applymovement $2, MovementData_0x18afd0 jump .Part21 diff --git a/maps/DanceTheatre.asm b/maps/DanceTheatre.asm index f5933550e..1e1fce5ef 100644 --- a/maps/DanceTheatre.asm +++ b/maps/DanceTheatre.asm @@ -160,7 +160,7 @@ GentlemanScript_0x994c6: jump UnknownScript_0x99505 UnknownScript_0x994f3: - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue UnknownScript_0x994ff writetext UnknownText_0x99891 closetext diff --git a/maps/DayCare.asm b/maps/DayCare.asm index 00943f565..cb247592a 100644 --- a/maps/DayCare.asm +++ b/maps/DayCare.asm @@ -10,7 +10,7 @@ DayCare_MapScriptHeader: dbw 2, UnknownScript_0x62f7b UnknownScript_0x62f7b: - checkflag $0005 + checkflag ENGINE_DAYCARE_MONS_ARE_COMPATIBLE iftrue UnknownScript_0x62f88 clearevent $06e5 setevent $06e6 @@ -58,7 +58,7 @@ UnknownScript_0x62fbd: GrannyScript_0x62fc3: faceplayer loadfont - checkflag $0005 + checkflag ENGINE_DAYCARE_MONS_ARE_COMPATIBLE iftrue UnknownScript_0x62fd1 special Function1672a closetext diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm index f465f3cde..230acb5cd 100644 --- a/maps/DragonShrine.asm +++ b/maps/DragonShrine.asm @@ -99,7 +99,7 @@ UnknownScript_0x18d0cb: writetext UnknownText_0x18d816 closetext loadmovesprites - setevent $00c1 + setevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG loadfont checkevent $0005 iftrue UnknownScript_0x18d091 @@ -156,7 +156,7 @@ UnknownScript_0x18d100: loadfont writetext UnknownText_0x18d9bf closetext - setflag $0022 + setflag ENGINE_RISINGBADGE playsound SFX_GET_BADGE waitbutton special RestartMapMusic @@ -194,7 +194,7 @@ ElderScript_0x18d1a5: iftrue UnknownScript_0x18d1f9 checkevent $0006 iftrue UnknownScript_0x18d1ff - checkevent $00bd + checkevent EVENT_GOT_DRATINI iffalse UnknownScript_0x18d1c5 checkevent EVENT_BEAT_RIVAL_IN_MT_MOON iftrue UnknownScript_0x18d1f3 @@ -212,9 +212,9 @@ UnknownScript_0x18d1c5: playsound SFX_CAUGHT_MON waitbutton givepoke DRATINI, 15, 0, 0 - checkevent $00c1 + checkevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG special SpecialDratini - setevent $00bd + setevent EVENT_GOT_DRATINI setevent $0006 writetext UnknownText_0x18d6ca closetext diff --git a/maps/EcruteakHouse.asm b/maps/EcruteakHouse.asm index 7a13f21c2..e4fbf24ab 100644 --- a/maps/EcruteakHouse.asm +++ b/maps/EcruteakHouse.asm @@ -30,7 +30,7 @@ UnknownScript_0x9800f: UnknownScript_0x98022: clearevent $0766 - setevent $0767 + setevent EVENT_RANG_CLEAR_BELL setevent $07b1 checkitem CLEAR_BELL iftrue UnknownScript_0x98032 @@ -43,7 +43,7 @@ UnknownScript_0x98033: return UnknownScript_0x98037: - checkevent $0767 + checkevent EVENT_RANG_CLEAR_BELL iftrue UnknownScript_0x98061 applymovement $3, MovementData_0x980c7 moveperson $2, $4, $6 @@ -70,7 +70,7 @@ SageScript_0x98062: loadfont checkevent EVENT_CLEARED_RADIO_TOWER iftrue UnknownScript_0x9807c - checkflag $001e + checkflag ENGINE_FOGBADGE iftrue UnknownScript_0x98076 writetext UnknownText_0x980d1 closetext @@ -100,7 +100,7 @@ UnknownScript_0x98093: closetext loadmovesprites dotrigger $1 - setevent $0767 + setevent EVENT_RANG_CLEAR_BELL clearevent $0766 setevent $0000 end @@ -299,6 +299,6 @@ EcruteakHouse_MapEventHeader: ; people-events db 4 person_event SPRITE_SAGE, 10, 8, $6, $0, 255, 255, $0, 0, SageScript_0x98062, $0766 - person_event SPRITE_SAGE, 10, 9, $6, $0, 255, 255, $0, 0, SageScript_0x98062, $0767 + person_event SPRITE_SAGE, 10, 9, $6, $0, 255, 255, $0, 0, SageScript_0x98062, EVENT_RANG_CLEAR_BELL person_event SPRITE_SAGE, 13, 10, $2, $11, 255, 255, $0, 0, SageScript_0x980b0, $07b1 person_event SPRITE_GRAMPS, 15, 7, $2, $11, 255, 255, $0, 0, GrampsScript_0x980c4, $07b1 diff --git a/maps/EcruteakPokeCenter1F.asm b/maps/EcruteakPokeCenter1F.asm index 0509a5910..7493a2bbc 100644 --- a/maps/EcruteakPokeCenter1F.asm +++ b/maps/EcruteakPokeCenter1F.asm @@ -46,8 +46,8 @@ UnknownScript_0x98e95: applymovement $6, MovementData_0x98ece playsound SFX_EXIT_BUILDING disappear $6 - clearevent $0712 - setflag $0053 + clearevent EVENT_MET_BILL + setflag ENGINE_TIME_CAPSULE dotrigger $1 waitbutton end diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm index 9d0a23bfd..ea799700b 100644 --- a/maps/ElmsLab.asm +++ b/maps/ElmsLab.asm @@ -95,7 +95,7 @@ ProfElmScript: UnknownScript_0x78bee: checkevent EVENT_GOT_MASTER_BALL_FROM_ELM iftrue UnknownScript_0x78bfa - checkflag $0022 + checkflag ENGINE_RISINGBADGE iftrue ElmGiveMasterBallScript UnknownScript_0x78bfa: checkevent EVENT_GOT_EVERSTONE_FROM_ELM @@ -132,7 +132,7 @@ UnknownScript_0x78c35: UnknownScript_0x78c41: checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE ; why are we checking it again? iftrue ElmWaitingEggHatchScript - checkflag $001b + checkflag ENGINE_ZEPHYRBADGE iftrue ElmAideHasEggScript checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM iftrue ElmStudyingEggScript @@ -337,7 +337,7 @@ ElmAfterTheftScript: writetext ElmAfterTheftText5 keeptextopen setevent EVENT_GAVE_MYSTERY_EGG_TO_ELM - setflag $0010 + setflag ENGINE_BUG_CONTEST_ON domaptrigger GROUP_ROUTE_29, MAP_ROUTE_29, $1 clearevent $0715 setevent $0714 @@ -564,7 +564,7 @@ CopScript: ElmsLabWindow: loadfont - checkflag $0043 + checkflag ENGINE_FLYPOINT_VIOLET iftrue .Normal checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON iftrue .BreakIn diff --git a/maps/FastShip1F.asm b/maps/FastShip1F.asm index bc1709baf..ca6e3cbd1 100644 --- a/maps/FastShip1F.asm +++ b/maps/FastShip1F.asm @@ -43,22 +43,22 @@ SailorScript_0x75160: loadfont checkevent $0031 iftrue UnknownScript_0x7517a - checkevent $002f - iftrue UnknownScript_0x75174 + checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + iftrue .Olivine writetext UnknownText_0x7523b closetext loadmovesprites end -UnknownScript_0x75174: +.Olivine writetext UnknownText_0x7529b closetext loadmovesprites end UnknownScript_0x7517a: - checkevent $002f - iftrue UnknownScript_0x7519c + checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + iftrue .Olivine writetext UnknownText_0x754be closetext loadmovesprites @@ -71,7 +71,7 @@ UnknownScript_0x7517a: warp GROUP_VERMILION_PORT, MAP_VERMILION_PORT, $7, $11 end -UnknownScript_0x7519c: +.Olivine writetext UnknownText_0x7548d closetext loadmovesprites diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm index 25e32df29..2eebaa7c6 100644 --- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm @@ -48,7 +48,7 @@ TwinScript_0x75ebb: showemote $0, $3, 15 applymovement $4, MovementData_0x7600c spriteface $3, RIGHT - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue UnknownScript_0x75f03 loadfont writetext UnknownText_0x76284 diff --git a/maps/GoldenrodBikeShop.asm b/maps/GoldenrodBikeShop.asm index 057080397..1009de418 100644 --- a/maps/GoldenrodBikeShop.asm +++ b/maps/GoldenrodBikeShop.asm @@ -19,12 +19,12 @@ ClerkScript_0x54750: writetext UnknownText_0x547f8 keeptextopen waitbutton - giveitem BICYCLE, $1 + giveitem BICYCLE, 1 writetext UnknownText_0x54848 playsound SFX_KEY_ITEM waitbutton itemnotify - setflag $0014 + setflag ENGINE_14 setevent EVENT_GOT_BICYCLE UnknownScript_0x54775: writetext UnknownText_0x5485f diff --git a/maps/GoldenrodBillsHouse.asm b/maps/GoldenrodBillsHouse.asm index 08c7f5aec..0e53807e8 100644 --- a/maps/GoldenrodBillsHouse.asm +++ b/maps/GoldenrodBillsHouse.asm @@ -49,7 +49,7 @@ UnknownScript_0x54c1f: BillsMom: faceplayer loadfont - checkevent $0712 + checkevent EVENT_MET_BILL iffalse UnknownScript_0x54c33 writetext UnknownText_0x54ea8 closetext @@ -257,6 +257,6 @@ GoldenrodBillsHouse_MapEventHeader: ; people-events db 3 - person_event SPRITE_BILL, 7, 6, $9, $0, 255, 255, $0, 0, BillsHouseBill, $0712 + person_event SPRITE_BILL, 7, 6, $9, $0, 255, 255, $0, 0, BillsHouseBill, EVENT_MET_BILL person_event SPRITE_POKEFAN_F, 7, 9, $6, $0, 255, 255, $0, 0, BillsMom, $ffff person_event SPRITE_TWIN, 8, 9, $2, $11, 255, 255, $a0, 0, BillsSister, $ffff diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm index 08fec7e81..d49b94514 100644 --- a/maps/GoldenrodCity.asm +++ b/maps/GoldenrodCity.asm @@ -170,7 +170,7 @@ UnknownScript_0x1989f7: CooltrainerFScript_0x1989fd: faceplayer loadfont - checkflag $0000 + checkflag ENGINE_RADIO_CARD iftrue UnknownScript_0x198a0b writetext UnknownText_0x198b73 closetext diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm index e1bf34c89..b25b21f82 100644 --- a/maps/GoldenrodDeptStore5F.asm +++ b/maps/GoldenrodDeptStore5F.asm @@ -58,7 +58,7 @@ ReceptionistScript_0x560ce: loadfont checkcode VAR_WEEKDAY if_not_equal SUNDAY, UnknownScript_0x56112 - checkflag $005b + checkflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT iftrue UnknownScript_0x56112 special Function718d writetext UnknownText_0x56143 @@ -72,7 +72,7 @@ UnknownScript_0x560ee: keeptextopen verbosegiveitem TM_RETURN, 1 iffalse UnknownScript_0x56116 - setflag $005b + setflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT loadmovesprites end @@ -87,7 +87,7 @@ UnknownScript_0x56103: keeptextopen verbosegiveitem TM_FRUSTRATION, 1 iffalse UnknownScript_0x56116 - setflag $005b + setflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT loadmovesprites end diff --git a/maps/GoldenrodDeptStoreB1F.asm b/maps/GoldenrodDeptStoreB1F.asm index a0c35e385..bcea8ce1c 100644 --- a/maps/GoldenrodDeptStoreB1F.asm +++ b/maps/GoldenrodDeptStoreB1F.asm @@ -21,23 +21,23 @@ UnknownScript_0x7d78a: jump UnknownScript_0x7d791 UnknownScript_0x7d791: - checkevent $0305 - iftrue UnknownScript_0x7d7a2 - checkevent $0306 - iftrue UnknownScript_0x7d7a7 + checkevent EVENT_WAREHOUSE_LAYOUT_2 + iftrue .Layout2 + checkevent EVENT_WAREHOUSE_LAYOUT_3 + iftrue .Layout3 changeblock $a, $8, $d return -UnknownScript_0x7d7a2: +.Layout2 changeblock $4, $a, $d return -UnknownScript_0x7d7a7: +.Layout3 changeblock $a, $c, $d return UnknownScript_0x7d7ac: - clearevent $0307 + clearevent EVENT_WAREHOUSE_BLOCKED_OFF return BlackBeltScript_0x7d7b0: diff --git a/maps/GoldenrodDeptStoreElevator.asm b/maps/GoldenrodDeptStoreElevator.asm index 15f203ab3..040e82e37 100644 --- a/maps/GoldenrodDeptStoreElevator.asm +++ b/maps/GoldenrodDeptStoreElevator.asm @@ -9,38 +9,38 @@ MapGoldenrodDeptStoreElevatorSignpost0Script: loadfont elevator Elevator_0x566e0 loadmovesprites - iffalse UnknownScript_0x566df + iffalse .Done pause 5 playsound SFX_ELEVATOR earthquake 60 waitbutton - checkevent $0307 - iftrue UnknownScript_0x566df - checkevent $0304 - iftrue UnknownScript_0x566cb - checkevent $0305 - iftrue UnknownScript_0x566d5 - checkevent $0306 - iftrue UnknownScript_0x566c1 -UnknownScript_0x566c1: ;0x566c1 - setevent $0304 - clearevent $0305 - clearevent $0306 + checkevent EVENT_WAREHOUSE_BLOCKED_OFF + iftrue .Done + checkevent EVENT_WAREHOUSE_LAYOUT_1 + iftrue .BoxLayout1 + checkevent EVENT_WAREHOUSE_LAYOUT_2 + iftrue .BoxLayout2 + checkevent EVENT_WAREHOUSE_LAYOUT_3 + iftrue .BoxLayout3 +.BoxLayout3 + setevent EVENT_WAREHOUSE_LAYOUT_1 + clearevent EVENT_WAREHOUSE_LAYOUT_2 + clearevent EVENT_WAREHOUSE_LAYOUT_3 end -UnknownScript_0x566cb: - clearevent $0304 - setevent $0305 - clearevent $0306 +.BoxLayout1 + clearevent EVENT_WAREHOUSE_LAYOUT_1 + setevent EVENT_WAREHOUSE_LAYOUT_2 + clearevent EVENT_WAREHOUSE_LAYOUT_3 end -UnknownScript_0x566d5: - clearevent $0304 - clearevent $0305 - setevent $0306 +.BoxLayout2 + clearevent EVENT_WAREHOUSE_LAYOUT_1 + clearevent EVENT_WAREHOUSE_LAYOUT_2 + setevent EVENT_WAREHOUSE_LAYOUT_3 end -UnknownScript_0x566df: +.Done end diff --git a/maps/GoldenrodDeptStoreRoof.asm b/maps/GoldenrodDeptStoreRoof.asm index f3ff2470f..ef00784fb 100644 --- a/maps/GoldenrodDeptStoreRoof.asm +++ b/maps/GoldenrodDeptStoreRoof.asm @@ -12,7 +12,7 @@ GoldenrodDeptStoreRoof_MapScriptHeader: dbw 2, UnknownScript_0x5672b UnknownScript_0x5671b: - checkflag $0061 + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON iftrue UnknownScript_0x56722 return @@ -22,7 +22,7 @@ UnknownScript_0x56722: return UnknownScript_0x5672b: - checkflag $0061 + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON iftrue UnknownScript_0x56738 setevent $06f0 clearevent $06f1 diff --git a/maps/GoldenrodFlowerShop.asm b/maps/GoldenrodFlowerShop.asm index e015af7fa..b1e43d244 100644 --- a/maps/GoldenrodFlowerShop.asm +++ b/maps/GoldenrodFlowerShop.asm @@ -14,7 +14,7 @@ TeacherScript_0x5535d: iffalse UnknownScript_0x5539f checkevent $00ba iffalse UnknownScript_0x5538f - checkflag $001d + checkflag ENGINE_PLAINBADGE iffalse UnknownScript_0x5539c faceplayer loadfont diff --git a/maps/IlexForest.asm b/maps/IlexForest.asm index 5b3edf833..a7062ebed 100644 --- a/maps/IlexForest.asm +++ b/maps/IlexForest.asm @@ -79,7 +79,7 @@ UnknownScript_0x6eb74: YoungsterScript_0x6eb7b: faceplayer loadfont - checkevent $0029 + checkevent EVENT_HERDED_FARFETCHD iftrue UnknownScript_0x6eb89 writetext UnknownText_0x6ef5c closetext @@ -294,7 +294,7 @@ UnknownScript_0x6ed50: loadvar FarfetchdPosition, $a appear $4 setevent $06f7 - setevent $0029 + setevent EVENT_HERDED_FARFETCHD end UnknownScript_0x6ed74: @@ -439,7 +439,7 @@ MapIlexForestSignpost0Script: jumptext UnknownText_0x6f2de MapIlexForestSignpost4Script: - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iftrue UnknownScript_0x6ee30 jump UnknownScript_0x6ee35 @@ -459,7 +459,7 @@ UnknownScript_0x6ee38: UnknownScript_0x6ee42: takeitem GS_BALL, 1 - clearevent $00c0 + clearevent EVENT_FOREST_IS_RESTLESS setevent $07a4 disappear $8 clearevent $06eb diff --git a/maps/IndigoPlateauPokeCenter1F.asm b/maps/IndigoPlateauPokeCenter1F.asm index d7d3eec1a..3dd120d54 100644 --- a/maps/IndigoPlateauPokeCenter1F.asm +++ b/maps/IndigoPlateauPokeCenter1F.asm @@ -43,7 +43,7 @@ UnknownScript_0x18000a: UnknownScript_0x180053: checkevent EVENT_BEAT_RIVAL_IN_MT_MOON iffalse UnknownScript_0x18012b - checkflag $005d + checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT iftrue UnknownScript_0x18012b checkcode VAR_WEEKDAY if_equal SUNDAY, UnknownScript_0x18012b @@ -65,7 +65,7 @@ UnknownScript_0x180053: UnknownScript_0x180094: checkevent EVENT_BEAT_RIVAL_IN_MT_MOON iffalse UnknownScript_0x18012b - checkflag $005d + checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT iftrue UnknownScript_0x18012b checkcode VAR_WEEKDAY if_equal SUNDAY, UnknownScript_0x18012b @@ -128,7 +128,7 @@ UnknownScript_0x180113: disappear $5 dotrigger $0 playmapmusic - setflag $005d + setflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT UnknownScript_0x18012b: end diff --git a/maps/KrissHouse1F.asm b/maps/KrissHouse1F.asm index 877cc09a2..adb65e97e 100644 --- a/maps/KrissHouse1F.asm +++ b/maps/KrissHouse1F.asm @@ -35,8 +35,8 @@ UnknownScript_0x7a4f6: keeptextopen stringtotext GearName, $1 scall UnknownScript_0x7a57e - setflag $0004 - setflag $0002 + setflag ENGINE_POKEGEAR + setflag ENGINE_PHONE_CARD addcellnum $1 dotrigger $1 setevent $06c7 diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm index 4686c242b..db75bdb5e 100644 --- a/maps/KurtsHouse.asm +++ b/maps/KurtsHouse.asm @@ -12,9 +12,9 @@ KurtsHouse_MapScriptHeader: UnknownScript_0x18e154: checkevent EVENT_CLEARED_SLOWPOKE_WELL iffalse UnknownScript_0x18e177 - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iftrue UnknownScript_0x18e177 - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e16f disappear $5 appear $2 @@ -164,7 +164,7 @@ UnknownScript_0x18e293: UnknownScript_0x18e299: setevent $0000 - setflag $0050 + setflag ENGINE_KURT_MAKING_BALLS UnknownScript_0x18e29f: writetext UnknownText_0x18e779 closetext @@ -187,7 +187,7 @@ UnknownScript_0x18e2b2: end UnknownScript_0x18e2b4: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -198,7 +198,7 @@ UnknownScript_0x18e2c4: jump UnknownScript_0x18e2ab UnknownScript_0x18e2ca: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -209,7 +209,7 @@ UnknownScript_0x18e2da: jump UnknownScript_0x18e2ab UnknownScript_0x18e2e0: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -220,7 +220,7 @@ UnknownScript_0x18e2f0: jump UnknownScript_0x18e2ab UnknownScript_0x18e2f6: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -231,7 +231,7 @@ UnknownScript_0x18e306: jump UnknownScript_0x18e2ab UnknownScript_0x18e30c: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -242,7 +242,7 @@ UnknownScript_0x18e31c: jump UnknownScript_0x18e2ab UnknownScript_0x18e322: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -253,7 +253,7 @@ UnknownScript_0x18e332: jump UnknownScript_0x18e2ab UnknownScript_0x18e338: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iftrue UnknownScript_0x18e3c5 writetext UnknownText_0x18e7fb keeptextopen @@ -264,20 +264,20 @@ UnknownScript_0x18e348: jump UnknownScript_0x18e2ab UnknownScript_0x18e34e: - checkevent $00bf + checkevent EVENT_GAVE_GS_BALL_TO_KURT iftrue UnknownScript_0x18e368 checkitem GS_BALL iffalse UnknownScript_0x18e202 writetext UnknownText_0x18e8ab closetext loadmovesprites - setevent $00bf + setevent EVENT_GAVE_GS_BALL_TO_KURT takeitem GS_BALL, 1 - setflag $0050 + setflag ENGINE_KURT_MAKING_BALLS end UnknownScript_0x18e368: - checkflag $0050 + checkflag ENGINE_KURT_MAKING_BALLS iffalse UnknownScript_0x18e378 writetext UnknownText_0x18e934 closetext @@ -290,9 +290,9 @@ UnknownScript_0x18e378: writetext UnknownText_0x18e95c closetext loadmovesprites - setevent $00c0 + setevent EVENT_FOREST_IS_RESTLESS clearevent EVENT_CAN_GIVE_GS_BALL_TO_KURT - clearevent $00bf + clearevent EVENT_GAVE_GS_BALL_TO_KURT special Functionc48f pause 20 showemote $0, $2, 30 @@ -319,10 +319,10 @@ UnknownScript_0x18e3ac: KurtScript_0x18e3bd: faceplayer loadfont - checkevent $00bf + checkevent EVENT_GAVE_GS_BALL_TO_KURT iftrue UnknownScript_0x18e3e0 UnknownScript_0x18e3c5: - checkevent $00bb + checkevent EVENT_BUGGING_KURT_TOO_MUCH iffalse UnknownScript_0x18e3d4 writetext UnknownText_0x18e7d8 closetext @@ -335,7 +335,7 @@ UnknownScript_0x18e3d4: closetext loadmovesprites spriteface $5, UP - setevent $00bb + setevent EVENT_BUGGING_KURT_TOO_MUCH end UnknownScript_0x18e3e0: @@ -353,7 +353,7 @@ KurtsGranddaughter1: iftrue KurtsGranddaughter2Subscript checkevent $0001 iftrue KurtsGranddaughterFunScript - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iftrue .Lonely checkevent $0030 iftrue .Dad @@ -392,7 +392,7 @@ KurtsGranddaughter2: faceplayer KurtsGranddaughter2Subscript: loadfont - checkevent $00bf + checkevent EVENT_GAVE_GS_BALL_TO_KURT iftrue .GSBall writetext KurtsGranddaughterHelpText closetext diff --git a/maps/LavRadioTower1F.asm b/maps/LavRadioTower1F.asm index fee695b32..d570fa62b 100644 --- a/maps/LavRadioTower1F.asm +++ b/maps/LavRadioTower1F.asm @@ -17,7 +17,7 @@ SuperNerdScript_0x7ee69: GentlemanScript_0x7ee6c: faceplayer loadfont - checkflag $0003 + checkflag ENGINE_EXPN_CARD iftrue .UnknownScript_0x7ee8e checkevent EVENT_RETURNED_MACHINE_PART iftrue .UnknownScript_0x7ee80 @@ -31,7 +31,7 @@ GentlemanScript_0x7ee6c: keeptextopen stringtotext .expncardname, $1 scall .UnknownScript_0x7ee94 - setflag $0003 + setflag ENGINE_EXPN_CARD .UnknownScript_0x7ee8e writetext UnknownText_0x7f141 closetext @@ -48,7 +48,7 @@ GentlemanScript_0x7ee6c: SuperNerdScript_0x7eea2: faceplayer loadfont - checkflag $0003 + checkflag ENGINE_EXPN_CARD iftrue UnknownScript_0x7eeb0 writetext UnknownText_0x7f193 closetext diff --git a/maps/MahoganyRedGyaradosSpeechHouse.asm b/maps/MahoganyRedGyaradosSpeechHouse.asm index a0703f452..85fe4727e 100644 --- a/maps/MahoganyRedGyaradosSpeechHouse.asm +++ b/maps/MahoganyRedGyaradosSpeechHouse.asm @@ -11,7 +11,7 @@ BlackBeltScript_0x19997f: TeacherScript_0x199982: faceplayer loadfont - checkflag $0013 + checkflag ENGINE_BIKE_SHOP_CALL_ENABLED iftrue UnknownScript_0x199990 writetext UnknownText_0x199a0e closetext diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm index 4524c2f1a..c517bf6cb 100644 --- a/maps/ManiasHouse.asm +++ b/maps/ManiasHouse.asm @@ -28,7 +28,7 @@ RockerScript_0x9d278: end UnknownScript_0x9d2a4: - checkflag $0055 + checkflag ENGINE_SHUCKLE_GIVEN iffalse UnknownScript_0x9d2bc writetext UnknownText_0x9d3ed closetext diff --git a/maps/MountMoonSquare.asm b/maps/MountMoonSquare.asm index a8e791e6d..85dffc9cb 100644 --- a/maps/MountMoonSquare.asm +++ b/maps/MountMoonSquare.asm @@ -26,7 +26,7 @@ UnknownScript_0x77097: return UnknownScript_0x7709a: - checkflag $0058 + checkflag ENGINE_MT_MOON_SQUARE_CLEFAIRY iftrue UnknownScript_0x77117 checkcode VAR_WEEKDAY if_not_equal MONDAY, UnknownScript_0x77117 @@ -69,7 +69,7 @@ UnknownScript_0x7709a: disappear $3 stopfollow clearevent $00ec - setflag $0058 + setflag ENGINE_MT_MOON_SQUARE_CLEFAIRY end UnknownScript_0x77117: diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm index 30ab0c1d7..3574ce76e 100644 --- a/maps/MrPokemonsHouse.asm +++ b/maps/MrPokemonsHouse.asm @@ -92,7 +92,7 @@ UnknownScript_0x196ec9: writetext UnknownText_0x1973cc playsound SFX_ITEM waitbutton - setflag $000b + setflag ENGINE_POKEDEX writetext UnknownText_0x1973de closetext loadmovesprites diff --git a/maps/NationalPark.asm b/maps/NationalPark.asm index 8bf7b731b..a317d083c 100644 --- a/maps/NationalPark.asm +++ b/maps/NationalPark.asm @@ -244,11 +244,11 @@ PokefanfBeverly1Script: iftrue UnknownScript_0x5c19b checkpoke MARILL iffalse UnknownScript_0x5c189 - checkevent EVENT_SHOWED_BEVERLY_MARILL + checkevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER iftrue UnknownScript_0x5c160 writetext UnknownText_0x5c5bd keeptextopen - setevent EVENT_SHOWED_BEVERLY_MARILL + setevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER scall UnknownScript_0x5c18f jump UnknownScript_0x5c163 diff --git a/maps/OlivineLighthouse6F.asm b/maps/OlivineLighthouse6F.asm index 2b5686209..650f31c6b 100644 --- a/maps/OlivineLighthouse6F.asm +++ b/maps/OlivineLighthouse6F.asm @@ -10,11 +10,11 @@ JasmineScript_0x60b91: loadfont checkitem SECRETPOTION iftrue UnknownScript_0x60bab - checkevent $0037 + checkevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS iftrue UnknownScript_0x60ba5 writetext UnknownText_0x60c81 keeptextopen - setevent $0037 + setevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS UnknownScript_0x60ba5: writetext UnknownText_0x60d64 closetext diff --git a/maps/PokeCenter2F.asm b/maps/PokeCenter2F.asm index c039ac480..e3ee7c9be 100644 --- a/maps/PokeCenter2F.asm +++ b/maps/PokeCenter2F.asm @@ -295,9 +295,9 @@ UnknownScript_0x192a25: end LinkReceptionistScript_0x192a2d: - checkevent $0712 + checkevent EVENT_MET_BILL iftrue UnknownScript_0x192a25 - checkflag $0053 + checkflag ENGINE_TIME_CAPSULE iftrue UnknownScript_0x192a25 special Function29cfa faceplayer @@ -410,7 +410,7 @@ UnknownScript_0x192af7: end UnknownScript_0x192b04: - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue UnknownScript_0x192b12 applymovement2 MovementData_0x192cca applymovement $0, MovementData_0x192cde @@ -434,7 +434,7 @@ UnknownScript_0x192b12: writebyte $80 special Functionc225 applymovement $0, MovementData_0x192d1c - setflag $009f + setflag ENGINE_KRIS_IN_CABLE_CLUB special Functione4a loadfont writetext UnknownText_0x19329a @@ -445,7 +445,7 @@ UnknownScript_0x192b12: end UnknownScript_0x192b50: - checkflag $009f + checkflag ENGINE_KRIS_IN_CABLE_CLUB iftrue UnknownScript_0x192b63 applymovement $2, MovementData_0x192d04 applymovement $0, MovementData_0x192cf5 @@ -455,7 +455,7 @@ UnknownScript_0x192b50: UnknownScript_0x192b63: applymovement $2, MovementData_0x192d04 applymovement $0, MovementData_0x192d28 - clearflag $009f + clearflag ENGINE_KRIS_IN_CABLE_CLUB playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 @@ -467,7 +467,7 @@ UnknownScript_0x192b63: end UnknownScript_0x192b8a: - checkflag $009f + checkflag ENGINE_KRIS_IN_CABLE_CLUB iftrue UnknownScript_0x192b9d applymovement $3, MovementData_0x192d04 applymovement $0, MovementData_0x192cf5 @@ -477,7 +477,7 @@ UnknownScript_0x192b8a: UnknownScript_0x192b9d: applymovement $3, MovementData_0x192d04 applymovement $0, MovementData_0x192d28 - clearflag $009f + clearflag ENGINE_KRIS_IN_CABLE_CLUB playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 @@ -489,7 +489,7 @@ UnknownScript_0x192b9d: end UnknownScript_0x192bc4: - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue UnknownScript_0x192bec checkcode VAR_FACING if_equal $2, UnknownScript_0x192bdc @@ -543,7 +543,7 @@ UnknownScript_0x192c20: special Functionc225 applymovement $0, MovementData_0x192d22 faceperson $0, $4 - setflag $009f + setflag ENGINE_KRIS_IN_CABLE_CLUB special Functione4a loadfont writetext UnknownText_0x19329a @@ -555,7 +555,7 @@ UnknownScript_0x192c20: UnknownScript_0x192c4e: special Function29c92 - checkflag $009f + checkflag ENGINE_KRIS_IN_CABLE_CLUB iftrue UnknownScript_0x192c66 applymovement $4, MovementData_0x192d08 applymovement $0, MovementData_0x192cf9 @@ -565,7 +565,7 @@ UnknownScript_0x192c4e: UnknownScript_0x192c66: applymovement $4, MovementData_0x192d08 applymovement $0, MovementData_0x192cfc - clearflag $009f + clearflag ENGINE_KRIS_IN_CABLE_CLUB playsound SFX_TINGLE applymovement $0, MovementData_0x192d17 writebyte $90 diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm index 22223fc2d..35ae1654b 100644 --- a/maps/RadioTower1F.asm +++ b/maps/RadioTower1F.asm @@ -8,7 +8,7 @@ RadioTower1F_MapScriptHeader: ReceptionistScript_0x5cd29: faceplayer loadfont - checkflag $0013 + checkflag ENGINE_BIKE_SHOP_CALL_ENABLED iftrue UnknownScript_0x5cd37 writetext UnknownText_0x5ce77 closetext @@ -31,8 +31,8 @@ GentlemanScript_0x5cd3d: special Functionc422 UnknownScript_0x5cd4c: special Function4d9d3 - checkflag $004e - iftrue UnknownScript_0x5cd84 + checkflag ENGINE_LUCKY_NUMBER_SHOW + iftrue .GameOver writetext UnknownText_0x5cf3a keeptextopen loadmovesprites @@ -49,51 +49,51 @@ UnknownScript_0x5cd4c: loadmovesprites applymovement $6, MovementData_0x5ce74 loadfont - if_equal $1, UnknownScript_0x5cd8a - if_equal $2, UnknownScript_0x5cd9f - if_equal $3, UnknownScript_0x5cdb4 - jump UnknownScript_0x5cdc9 + if_equal 1, .FirstPlace + if_equal 2, .SecondPlace + if_equal 3, .ThirdPlace + jump .NoPrize -UnknownScript_0x5cd84: +.GameOver writetext UnknownText_0x5cf7e closetext loadmovesprites end -UnknownScript_0x5cd8a: +.FirstPlace writetext UnknownText_0x5cfb5 playsound SFX_1ST_PLACE waitbutton keeptextopen - giveitem MASTER_BALL, $1 + giveitem MASTER_BALL, 1 iffalse UnknownScript_0x5cdcf itemnotify - setflag $004e - jump UnknownScript_0x5cd84 + setflag ENGINE_LUCKY_NUMBER_SHOW + jump .GameOver -UnknownScript_0x5cd9f: +.SecondPlace writetext UnknownText_0x5d023 playsound SFX_2ND_PLACE waitbutton keeptextopen - giveitem EXP_SHARE, $1 + giveitem EXP_SHARE, 1 iffalse UnknownScript_0x5cdcf itemnotify - setflag $004e - jump UnknownScript_0x5cd84 + setflag ENGINE_LUCKY_NUMBER_SHOW + jump .GameOver -UnknownScript_0x5cdb4: +.ThirdPlace writetext UnknownText_0x5d076 playsound SFX_3RD_PLACE waitbutton keeptextopen - giveitem PP_UP, $1 + giveitem PP_UP, 1 iffalse UnknownScript_0x5cdcf itemnotify - setflag $004e - jump UnknownScript_0x5cd84 + setflag ENGINE_LUCKY_NUMBER_SHOW + jump .GameOver -UnknownScript_0x5cdc9: +.NoPrize writetext UnknownText_0x5d0c0 closetext loadmovesprites @@ -108,7 +108,7 @@ UnknownScript_0x5cdcf: CooltrainerFScript_0x5cdd5: faceplayer loadfont - checkflag $0000 + checkflag ENGINE_RADIO_CARD iftrue UnknownScript_0x5ce2d writetext UnknownText_0x5d12d yesorno @@ -144,7 +144,7 @@ CooltrainerFScript_0x5cdd5: scall UnknownScript_0x5ce3e writetext UnknownText_0x5d3c0 keeptextopen - setflag $0000 + setflag ENGINE_RADIO_CARD UnknownScript_0x5ce2d: writetext UnknownText_0x5d3e5 closetext diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm index 549ad3d93..9a2d6322c 100644 --- a/maps/RadioTower2F.asm +++ b/maps/RadioTower2F.asm @@ -14,7 +14,7 @@ SuperNerdScript_0x5d6fe: TeacherScript_0x5d701: faceplayer loadfont - checkflag $0013 + checkflag ENGINE_BIKE_SHOP_CALL_ENABLED iftrue UnknownScript_0x5d70f writetext UnknownText_0x5d956 closetext @@ -152,15 +152,15 @@ GruntF2Script: Buena: faceplayer loadfont - checkflag $0013 + checkflag ENGINE_BIKE_SHOP_CALL_ENABLED iftrue UnknownScript_0x5d865 checkevent EVENT_MET_BUENA iffalse UnknownScript_0x5d800 - checkflag $0060 + checkflag ENGINE_60 iftrue UnknownScript_0x5d82f checkcode VAR_HOUR if_less_than $12, UnknownScript_0x5d893 - checkflag $005f + checkflag ENGINE_5F iffalse UnknownScript_0x5d80a checkitem BLUE_CARD iffalse UnknownScript_0x5d86b @@ -197,7 +197,7 @@ UnknownScript_0x5d7be: writevarcode VAR_BLUECARDBALANCE waitbutton playsound SFX_TRANSACTION - setflag $0060 + setflag ENGINE_60 pause 20 spriteface $b, RIGHT loadfont @@ -252,7 +252,7 @@ UnknownScript_0x5d83f: end UnknownScript_0x5d845: - setflag $0060 + setflag ENGINE_60 loadfont writetext UnknownText_0x5e01c closetext diff --git a/maps/Route16.asm b/maps/Route16.asm index 416416096..65d1d4532 100644 --- a/maps/Route16.asm +++ b/maps/Route16.asm @@ -14,7 +14,7 @@ UnknownScript_0x1ad318: if_less_than $5, UnknownScript_0x1ad328 checkcode VAR_XCOORD if_greater_than $d, UnknownScript_0x1ad328 - setflag $0019 + setflag ENGINE_ALWAYS_ON_BIKE return UnknownScript_0x1ad328: diff --git a/maps/Route17.asm b/maps/Route17.asm index 85617640d..e5fd5d867 100644 --- a/maps/Route17.asm +++ b/maps/Route17.asm @@ -10,8 +10,8 @@ Route17_MapScriptHeader: dbw 5, UnknownScript_0x1ad0ab UnknownScript_0x1ad0ab: - setflag $0019 - setflag $001a + setflag ENGINE_ALWAYS_ON_BIKE + setflag ENGINE_DOWNHILL return TrainerBikerCharles: diff --git a/maps/Route19.asm b/maps/Route19.asm index dd7c800df..0b8d2c445 100644 --- a/maps/Route19.asm +++ b/maps/Route19.asm @@ -7,18 +7,18 @@ Route19_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x19e9de + dbw 1, .ClearRocks -UnknownScript_0x19e9de: - checkevent $00d7 - iftrue UnknownScript_0x19e9fc +.ClearRocks + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .Done changeblock $6, $6, $7a changeblock $8, $6, $7a changeblock $a, $6, $7a changeblock $c, $8, $7a changeblock $4, $8, $7a changeblock $a, $a, $7a -UnknownScript_0x19e9fc: +.Done return TrainerSwimmerfDawn: @@ -132,7 +132,7 @@ SwimmermTuckerScript: FisherScript_0x19ea4d: faceplayer loadfont - checkevent $00d7 + checkevent EVENT_CINNABAR_ROCKS_CLEARED iftrue UnknownScript_0x19ea5b writetext UnknownText_0x19ecaf closetext @@ -148,7 +148,7 @@ UnknownScript_0x19ea5b: FisherScript_0x19ea61: faceplayer loadfont - checkevent $00d7 + checkevent EVENT_CINNABAR_ROCKS_CLEARED iftrue UnknownScript_0x19ea6f writetext UnknownText_0x19ed45 closetext diff --git a/maps/Route19FuchsiaGate.asm b/maps/Route19FuchsiaGate.asm index ecb8ad09c..1b32a8183 100644 --- a/maps/Route19FuchsiaGate.asm +++ b/maps/Route19FuchsiaGate.asm @@ -8,14 +8,14 @@ Route19FuchsiaGate_MapScriptHeader: OfficerScript_0x1ab3f6: faceplayer loadfont - checkevent $00d7 - iftrue UnknownScript_0x1ab404 + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .RocksCleared writetext UnknownText_0x1ab40a closetext loadmovesprites end -UnknownScript_0x1ab404: +.RocksCleared writetext UnknownText_0x1ab48a closetext loadmovesprites diff --git a/maps/Route20.asm b/maps/Route20.asm index a049c156c..817f40884 100644 --- a/maps/Route20.asm +++ b/maps/Route20.asm @@ -7,10 +7,10 @@ Route20_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x1acd25 + dbw 5, .ClearRocks -UnknownScript_0x1acd25: - setevent $00d7 +.ClearRocks + setevent EVENT_CINNABAR_ROCKS_CLEARED return TrainerSwimmerfNicole: diff --git a/maps/Route29.asm b/maps/Route29.asm index 9978406a0..ddf029dce 100644 --- a/maps/Route29.asm +++ b/maps/Route29.asm @@ -20,7 +20,7 @@ UnknownScript_0x1a0f5a: end TuscanyCallback: - checkflag $001b + checkflag ENGINE_ZEPHYRBADGE iftrue .DoesTuscanyAppear .TuscanyDisappears diff --git a/maps/Route2NuggetSpeechHouse.asm b/maps/Route2NuggetSpeechHouse.asm index 1ccda9b22..be04b1495 100644 --- a/maps/Route2NuggetSpeechHouse.asm +++ b/maps/Route2NuggetSpeechHouse.asm @@ -8,17 +8,17 @@ Route2NuggetSpeechHouse_MapScriptHeader: FisherScript_0x9b847: faceplayer loadfont - checkevent $00c8 - iftrue UnknownScript_0x9b85c + checkevent EVENT_GOT_NUGGET_FROM_GUY + iftrue .GotItem writetext UnknownText_0x9b865 keeptextopen verbosegiveitem NUGGET, 1 - iffalse UnknownScript_0x9b860 - setevent $00c8 -UnknownScript_0x9b85c: + iffalse .Done + setevent EVENT_GOT_NUGGET_FROM_GUY +.GotItem writetext UnknownText_0x9b8e5 closetext -UnknownScript_0x9b860: +.Done loadmovesprites end diff --git a/maps/Route32.asm b/maps/Route32.asm index 35a078148..c85f6f234 100644 --- a/maps/Route32.asm +++ b/maps/Route32.asm @@ -39,7 +39,7 @@ UnknownScript_0x190470: loadfont checkevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32 iftrue UnknownScript_0x1904a5 - checkflag $001b + checkflag ENGINE_ZEPHYRBADGE iffalse UnknownScript_0x19049f checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE iftrue UnknownScript_0x19048f @@ -211,7 +211,7 @@ FisherRalph1Script: loadfont checkflag ENGINE_RALPH iftrue UnknownScript_0x19057d - checkflag $0052 + checkflag ENGINE_SPECIAL_WILDDATA iftrue UnknownScript_0x1905f1 checkcellnum $11 iftrue UnknownScript_0x190603 diff --git a/maps/Route33.asm b/maps/Route33.asm index f583e2a21..3f4d8700a 100644 --- a/maps/Route33.asm +++ b/maps/Route33.asm @@ -33,7 +33,7 @@ HikerAnthony2Script: loadfont checkflag ENGINE_ANTHONY iftrue UnknownScript_0x1ac051 - checkflag $00a0 + checkflag ENGINE_DUNSPARCE_SWARM iftrue UnknownScript_0x1ac0c5 checkcellnum $13 iftrue UnknownScript_0x1ac0d7 diff --git a/maps/Route34.asm b/maps/Route34.asm index 6d2cf7823..10732dd6a 100644 --- a/maps/Route34.asm +++ b/maps/Route34.asm @@ -10,7 +10,7 @@ Route34_MapScriptHeader: dbw 2, UnknownScript_0x78005 UnknownScript_0x78005: - checkflag $0005 + checkflag ENGINE_DAYCARE_MONS_ARE_COMPATIBLE iftrue UnknownScript_0x78014 clearevent $06e5 setevent $06e6 @@ -22,7 +22,7 @@ UnknownScript_0x78014: jump UnknownScript_0x7801d UnknownScript_0x7801d: - checkflag $0006 + checkflag ENGINE_DAYCARE_MAN_HAS_MON iffalse UnknownScript_0x78029 clearevent $06e7 jump UnknownScript_0x7802f @@ -32,7 +32,7 @@ UnknownScript_0x78029: jump UnknownScript_0x7802f UnknownScript_0x7802f: - checkflag $0007 + checkflag ENGINE_DAYCARE_LADY_HAS_MON iffalse UnknownScript_0x78039 clearevent $06e8 return @@ -48,7 +48,7 @@ GrampsScript_0x7803d: closetext loadmovesprites if_equal $1, UnknownScript_0x7805a - clearflag $0005 + clearflag ENGINE_DAYCARE_MONS_ARE_COMPATIBLE checkcode VAR_FACING if_equal $3, UnknownScript_0x7805b applymovement $8, MovementData_0x78333 @@ -100,7 +100,7 @@ CamperTodd1Script: loadfont checkflag ENGINE_TODD iftrue UnknownScript_0x780bd - checkflag $0061 + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON iftrue UnknownScript_0x78131 checkcellnum $14 iftrue UnknownScript_0x78143 diff --git a/maps/Route34IlexForestGate.asm b/maps/Route34IlexForestGate.asm index 7c611bbed..d3d5e1bdf 100644 --- a/maps/Route34IlexForestGate.asm +++ b/maps/Route34IlexForestGate.asm @@ -10,7 +10,7 @@ Route34IlexForestGate_MapScriptHeader: dbw 2, UnknownScript_0x62d2d UnknownScript_0x62d2d: - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iffalse UnknownScript_0x62d38 disappear $2 appear $5 @@ -22,7 +22,7 @@ UnknownScript_0x62d38: return UnknownScript_0x62d3d: - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iffalse UnknownScript_0x62d62 showemote $0, $5, 20 spriteface $5, LEFT @@ -42,7 +42,7 @@ UnknownScript_0x62d62: TeacherScript_0x62d63: faceplayer loadfont - checkevent $00c0 + checkevent EVENT_FOREST_IS_RESTLESS iftrue UnknownScript_0x62d84 checkevent EVENT_GOT_TM12_SWEET_SCENT iftrue UnknownScript_0x62d7e diff --git a/maps/Route35.asm b/maps/Route35.asm index b102d6260..c29e3148b 100644 --- a/maps/Route35.asm +++ b/maps/Route35.asm @@ -236,7 +236,7 @@ Bug_catcherArnie1Script: loadfont checkflag ENGINE_ARNIE iftrue UnknownScript_0x19c9bb - checkflag $00a1 + checkflag ENGINE_YANMA_SWARM iftrue UnknownScript_0x19ca2f checkcellnum $17 iftrue UnknownScript_0x19c90f diff --git a/maps/Route35NationalParkgate.asm b/maps/Route35NationalParkgate.asm index d80bdd7e4..29edbc46a 100644 --- a/maps/Route35NationalParkgate.asm +++ b/maps/Route35NationalParkgate.asm @@ -27,7 +27,7 @@ UnknownScript_0x6a19f: end UnknownScript_0x6a1a3: - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue UnknownScript_0x6a1ac dotrigger $0 return @@ -41,7 +41,7 @@ UnknownScript_0x6a1af: if_equal TUESDAY, UnknownScript_0x6a1ca if_equal THURSDAY, UnknownScript_0x6a1ca if_equal SATURDAY, UnknownScript_0x6a1ca - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue UnknownScript_0x6a1ac disappear $2 appear $3 @@ -88,7 +88,7 @@ OfficerScript_0x6a204: if_equal FRIDAY, UnknownScript_0x6a2c7 faceplayer loadfont - checkflag $0051 + checkflag ENGINE_51 iftrue UnknownScript_0x6a2c1 scall UnknownScript_0x6a2de writetext UnknownText_0x6a2eb @@ -99,7 +99,7 @@ OfficerScript_0x6a204: special Function13a12 clearevent $0308 UnknownScript_0x6a234: - setflag $0011 + setflag ENGINE_BUG_CONTEST_TIMER special PlayMapMusic writetext UnknownText_0x6a39d keeptextopen @@ -193,7 +193,7 @@ UnknownScript_0x6a2c7: OfficerScript_0x6a2ca: faceplayer loadfont - checkflag $0051 + checkflag ENGINE_51 iftrue UnknownScript_0x6a2c1 writetext UnknownText_0x6a894 closetext diff --git a/maps/Route36NationalParkgate.asm b/maps/Route36NationalParkgate.asm index da04603e2..1c824088e 100644 --- a/maps/Route36NationalParkgate.asm +++ b/maps/Route36NationalParkgate.asm @@ -27,7 +27,7 @@ UnknownScript_0x6ab13: end UnknownScript_0x6ab17: - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue UnknownScript_0x6ab20 dotrigger $0 return @@ -43,7 +43,7 @@ UnknownScript_0x6ab23: if_equal TUESDAY, UnknownScript_0x6ab42 if_equal THURSDAY, UnknownScript_0x6ab42 if_equal SATURDAY, UnknownScript_0x6ab42 - checkflag $0011 + checkflag ENGINE_BUG_CONTEST_TIMER iftrue UnknownScript_0x6ab42 disappear $2 appear $d @@ -140,7 +140,7 @@ OfficerScript_0x6abe0: if_equal FRIDAY, UnknownScript_0x6acf1 faceplayer loadfont - checkflag $0051 + checkflag ENGINE_51 iftrue UnknownScript_0x6ac91 scall UnknownScript_0x6ad02 writetext UnknownText_0x6add5 @@ -151,7 +151,7 @@ OfficerScript_0x6abe0: special Function13a12 clearevent $0308 UnknownScript_0x6ac10: - setflag $0011 + setflag ENGINE_BUG_CONTEST_TIMER special PlayMapMusic writetext UnknownText_0x6ae87 keeptextopen @@ -162,7 +162,7 @@ UnknownScript_0x6ac10: writetext UnknownText_0x6aecc closetext loadmovesprites - setflag $0011 + setflag ENGINE_BUG_CONTEST_TIMER special Function135db spriteface $0, LEFT playsound SFX_EXIT_BUILDING @@ -286,7 +286,7 @@ UnknownScript_0x6acf1: OfficerScript_0x6acf4: faceplayer loadfont - checkflag $0051 + checkflag ENGINE_51 iftrue UnknownScript_0x6ac91 writetext UnknownText_0x6b370 closetext diff --git a/maps/Route37.asm b/maps/Route37.asm index f0e244ac5..0796e331f 100644 --- a/maps/Route37.asm +++ b/maps/Route37.asm @@ -113,7 +113,7 @@ SunnyScript: keeptextopen setevent EVENT_MET_SUNNY_OF_SUNDAY .MetSunny - checkflag $0063 + checkflag ENGINE_PLAYER_IS_FEMALE iftrue .Kris writetext SunnyGivesGiftText1 keeptextopen diff --git a/maps/RuinsofAlphAerodactylChamber.asm b/maps/RuinsofAlphAerodactylChamber.asm index 66faea725..35a8393b2 100644 --- a/maps/RuinsofAlphAerodactylChamber.asm +++ b/maps/RuinsofAlphAerodactylChamber.asm @@ -63,7 +63,7 @@ MapRuinsofAlphAerodactylChamberSignpost2Script: UnknownScript_0x58df7: setevent $0705 setevent $02a3 - setflag $002d + setflag ENGINE_UNLOCKED_UNOWNS_3 domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1 earthquake 30 showemote $0, $0, 15 diff --git a/maps/RuinsofAlphHoOhChamber.asm b/maps/RuinsofAlphHoOhChamber.asm index e12c147d7..508cb7d21 100644 --- a/maps/RuinsofAlphHoOhChamber.asm +++ b/maps/RuinsofAlphHoOhChamber.asm @@ -64,7 +64,7 @@ MapRuinsofAlphHoOhChamberSignpost2Script: UnknownScript_0x585ba: setevent $0705 setevent $02a0 - setflag $002e + setflag ENGINE_UNLOCKED_UNOWNS_4 domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1 earthquake 30 showemote $0, $0, 15 diff --git a/maps/RuinsofAlphKabutoChamber.asm b/maps/RuinsofAlphKabutoChamber.asm index 3d294e997..fa0337a12 100644 --- a/maps/RuinsofAlphKabutoChamber.asm +++ b/maps/RuinsofAlphKabutoChamber.asm @@ -68,7 +68,7 @@ MapRuinsofAlphKabutoChamberSignpost2Script: UnknownScript_0x58778: setevent $0705 setevent $02a1 - setflag $002b + setflag ENGINE_UNLOCKED_UNOWNS_1 setevent $074e domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1 earthquake 30 diff --git a/maps/RuinsofAlphOmanyteChamber.asm b/maps/RuinsofAlphOmanyteChamber.asm index 435aaf470..9833267f9 100644 --- a/maps/RuinsofAlphOmanyteChamber.asm +++ b/maps/RuinsofAlphOmanyteChamber.asm @@ -64,7 +64,7 @@ MapRuinsofAlphOmanyteChamberSignpost2Script: UnknownScript_0x58c36: setevent $0705 setevent $02a2 - setflag $002c + setflag ENGINE_UNLOCKED_UNOWNS_2 domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1 earthquake 30 showemote $0, $0, 15 diff --git a/maps/RuinsofAlphOutside.asm b/maps/RuinsofAlphOutside.asm index c1e5c6d46..55dd13cb2 100644 --- a/maps/RuinsofAlphOutside.asm +++ b/maps/RuinsofAlphOutside.asm @@ -20,7 +20,7 @@ UnknownScript_0x5800e: end UnknownScript_0x5800f: - checkflag $000c + checkflag ENGINE_UNOWN_DEX iftrue UnknownScript_0x5802c checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS iftrue UnknownScript_0x5801e @@ -71,12 +71,12 @@ UnknownScript_0x58044: FisherScript_0x58061: faceplayer loadfont - checkevent $00bc - iftrue UnknownScript_0x58070 - setevent $00bc + checkevent EVENT_TALKED_TO_RUINS_COWARD + iftrue .Next + setevent EVENT_TALKED_TO_RUINS_COWARD writetext UnknownText_0x583a4 keeptextopen -UnknownScript_0x58070: ;0x58070 +.Next writetext UnknownText_0x58420 closetext loadmovesprites diff --git a/maps/RuinsofAlphResearchCenter.asm b/maps/RuinsofAlphResearchCenter.asm index 45b8eabad..a6df87fac 100644 --- a/maps/RuinsofAlphResearchCenter.asm +++ b/maps/RuinsofAlphResearchCenter.asm @@ -50,7 +50,7 @@ UnknownScript_0x59192: writetext UnknownText_0x592fa playsound SFX_ITEM waitbutton - setflag $000c + setflag ENGINE_UNOWN_DEX writetext UnknownText_0x59311 closetext loadmovesprites @@ -80,7 +80,7 @@ ScientistScript_0x591e5: loadfont checkcode VAR_UNOWNCOUNT if_equal 26, UnknownScript_0x5920b - checkflag $000c + checkflag ENGINE_UNOWN_DEX iftrue UnknownScript_0x59205 checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS iftrue UnknownScript_0x591ff diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm index 6ee78054e..49dc74f0a 100644 --- a/maps/TeamRocketBaseB3F.asm +++ b/maps/TeamRocketBaseB3F.asm @@ -29,7 +29,7 @@ UnknownScript_0x6dfef: end UnknownScript_0x6dff0: - checkevent $0303 + checkevent EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE iftrue UnknownScript_0x6dff7 return @@ -141,7 +141,7 @@ GruntF5Script: writetext UnknownText_0x6e611 closetext loadmovesprites - setevent $0301 + setevent EVENT_LEARNED_SLOWPOKETAIL end TrainerGruntM28: @@ -169,7 +169,7 @@ GruntM28Script: writetext UnknownText_0x6e737 closetext loadmovesprites - setevent $0302 + setevent EVENT_LEARNED_RATICATE_TAIL end TrainerScientistRoss: @@ -226,33 +226,32 @@ ScientistMitchScript: loadmovesprites end -MapTeamRocketBaseB3FSignpostPtr1: - dw $0303 - dw MapTeamRocketBaseB3FSignpost1Script +BossDoor: + dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE + dw .Script - -MapTeamRocketBaseB3FSignpost1Script: +.Script loadfont - checkevent $0301 - iffalse UnknownScript_0x6e105 - checkevent $0302 - iffalse UnknownScript_0x6e105 - jump UnknownScript_0x6e10b + checkevent EVENT_LEARNED_SLOWPOKETAIL + iffalse .NeedsPassword + checkevent EVENT_LEARNED_RATICATE_TAIL + iffalse .NeedsPassword + jump .OpenSesame -UnknownScript_0x6e105: +.NeedsPassword writetext UnknownText_0x6e970 closetext loadmovesprites end -UnknownScript_0x6e10b: +.OpenSesame writetext UnknownText_0x6e9a3 closetext playsound SFX_ENTER_DOOR changeblock $a, $8, $7 reloadmappart loadmovesprites - setevent $0303 + setevent EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE waitbutton end @@ -639,8 +638,8 @@ TeamRocketBaseB3F_MapEventHeader: ; signposts db 10 - signpost 9, 10, $6, MapTeamRocketBaseB3FSignpostPtr1 - signpost 9, 11, $6, MapTeamRocketBaseB3FSignpostPtr1 + signpost 9, 10, $6, BossDoor + signpost 9, 11, $6, BossDoor signpost 1, 10, $0, MapTeamRocketBaseB3FSignpost9Script signpost 1, 11, $0, MapTeamRocketBaseB3FSignpost9Script signpost 1, 12, $0, MapTeamRocketBaseB3FSignpost9Script diff --git a/maps/TrainerHouseB1F.asm b/maps/TrainerHouseB1F.asm index 976873f61..fe539100b 100644 --- a/maps/TrainerHouseB1F.asm +++ b/maps/TrainerHouseB1F.asm @@ -14,7 +14,7 @@ UnknownScript_0x9b38a: UnknownScript_0x9b38b: spriteface $0, UP loadfont - checkflag $0057 + checkflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY iftrue UnknownScript_0x9b3f7 writetext UnknownText_0x9b420 keeptextopen @@ -31,7 +31,7 @@ UnknownScript_0x9b3aa: writetext UnknownText_0x9b487 yesorno iffalse UnknownScript_0x9b3ed - setflag $0057 + setflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY writetext UnknownText_0x9b4a2 closetext loadmovesprites diff --git a/maps/UndergroundWarehouse.asm b/maps/UndergroundWarehouse.asm index 08b5a4214..a1de24533 100644 --- a/maps/UndergroundWarehouse.asm +++ b/maps/UndergroundWarehouse.asm @@ -119,9 +119,9 @@ GentlemanScript_0x7d9bf: keeptextopen verbosegiveitem CARD_KEY, 1 setevent $004a - setevent $0304 - clearevent $0305 - clearevent $0306 + setevent EVENT_WAREHOUSE_LAYOUT_1 + clearevent EVENT_WAREHOUSE_LAYOUT_2 + clearevent EVENT_WAREHOUSE_LAYOUT_3 writetext UnknownText_0x7dc5b keeptextopen UnknownScript_0x7d9de: diff --git a/maps/UnionCaveB2F.asm b/maps/UnionCaveB2F.asm index 0cf9e9c94..c47ff8284 100644 --- a/maps/UnionCaveB2F.asm +++ b/maps/UnionCaveB2F.asm @@ -10,7 +10,7 @@ UnionCaveB2F_MapScriptHeader: dbw 2, UnknownScript_0x5a30d UnknownScript_0x5a30d: - checkflag $0059 + checkflag ENGINE_UNION_CAVE_LAPRAS iftrue UnknownScript_0x5a319 checkcode VAR_WEEKDAY if_equal FRIDAY, UnknownScript_0x5a31c @@ -28,7 +28,7 @@ SurfScript_0x5a31f: loadpokedata LAPRAS, 20 startbattle disappear $7 - setflag $0059 + setflag ENGINE_UNION_CAVE_LAPRAS returnafterbattle end diff --git a/maps/WarehouseEntrance.asm b/maps/WarehouseEntrance.asm index 50ce87cc0..6a69998c9 100644 --- a/maps/WarehouseEntrance.asm +++ b/maps/WarehouseEntrance.asm @@ -224,7 +224,7 @@ UnknownScript_0x7c140: GrampsScript_0x7c146: loadfont - checkflag $0056 + checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED iftrue UnknownScript_0x7c300 checkcode VAR_WEEKDAY if_equal MONDAY, UnknownScript_0x7c156 @@ -246,7 +246,7 @@ SuperNerdScript_0x7c161: jump UnknownScript_0x7c300 UnknownScript_0x7c173: - checkflag $005a + checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT iftrue UnknownScript_0x7c208 special Function24ae8 writetext UnknownText_0x7c5f9 @@ -259,7 +259,7 @@ UnknownScript_0x7c173: special Function7413 if_equal $0, UnknownScript_0x7c1fc if_equal $1, UnknownScript_0x7c1fc - setflag $005a + setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT if_equal $2, UnknownScript_0x7c1a9 if_equal $3, UnknownScript_0x7c1b5 jump UnknownScript_0x7c1c1 @@ -329,7 +329,7 @@ SuperNerdScript_0x7c20e: jump UnknownScript_0x7c300 UnknownScript_0x7c220: - checkflag $005a + checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT iftrue UnknownScript_0x7c2b5 special Function24ae8 writetext UnknownText_0x7c75c @@ -342,7 +342,7 @@ UnknownScript_0x7c220: special Function7418 if_equal $0, UnknownScript_0x7c2a9 if_equal $1, UnknownScript_0x7c2a9 - setflag $005a + setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT if_equal $2, UnknownScript_0x7c256 if_equal $3, UnknownScript_0x7c262 jump UnknownScript_0x7c26e