diff options
66 files changed, 1271 insertions, 1539 deletions
diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index b74e60d1f..f1bef0721 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -332,7 +332,7 @@ sub_806CAC8: @ 806CAC8 movs r2, 0x2 ldrsh r1, [r4, r2] movs r2, 0xFF - bl sub_8058F48 + bl MapGridGetMetatileAttributeAt mov r8, r0 mov r0, sp movs r1, 0 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index 5510caceb..6e425d2c7 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -2921,7 +2921,7 @@ IsPlayerFacingSurfableFishableWater: @ 805C8B0 ldrsh r0, [r0, r1] movs r2, 0 ldrsh r1, [r5, r2] - bl sub_805C938 + bl MetatileAtCoordsIsWaterTile lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2940,24 +2940,24 @@ _0805C92E: bx r1 thumb_func_end IsPlayerFacingSurfableFishableWater - thumb_func_start sub_805C938 -sub_805C938: @ 805C938 + thumb_func_start MetatileAtCoordsIsWaterTile +MetatileAtCoordsIsWaterTile: @ 805C938 push {lr} lsls r0, 16 asrs r0, 16 lsls r1, 16 asrs r1, 16 movs r2, 0x1 - bl sub_8058F48 + bl MapGridGetMetatileAttributeAt lsls r0, 24 lsrs r0, 24 movs r1, 0x2 - bl sub_805A2BC + bl TestMetatileAttributeBit lsls r0, 24 lsrs r0, 24 pop {r1} bx r1 - thumb_func_end sub_805C938 + thumb_func_end MetatileAtCoordsIsWaterTile thumb_func_start ClearPlayerAvatarInfo ClearPlayerAvatarInfo: @ 805C95C diff --git a/asm/fldeff_cut.s b/asm/fldeff_cut.s deleted file mode 100644 index c0266194e..000000000 --- a/asm/fldeff_cut.s +++ /dev/null @@ -1,535 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8097874 -sub_8097874: @ 8097874 - push {lr} - lsls r0, 16 - asrs r0, 16 - lsls r1, 16 - asrs r1, 16 - movs r2, 0x1 - bl sub_8058F48 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - bl sub_805A2BC - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_8097874 - - thumb_func_start SetUpFieldMove_Cut -SetUpFieldMove_Cut: @ 8097898 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - ldr r4, _080978CC @ =gUnknown_2039874 - movs r0, 0 - strb r0, [r4] - bl CutMoveRuinValleyCheck - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _080978E0 - movs r0, 0x5F - bl CheckObjectGraphicsInFrontOfPlayer - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08097904 - ldr r1, _080978D0 @ =gFieldCallback2 - ldr r0, _080978D4 @ =FieldCallback_PrepareFadeInFromMenu - str r0, [r1] - ldr r1, _080978D8 @ =gPostMenuFieldCallback - ldr r0, _080978DC @ =sub_80979D0 - b _080978EC - .align 2, 0 -_080978CC: .4byte gUnknown_2039874 -_080978D0: .4byte gFieldCallback2 -_080978D4: .4byte FieldCallback_PrepareFadeInFromMenu -_080978D8: .4byte gPostMenuFieldCallback -_080978DC: .4byte sub_80979D0 -_080978E0: - strb r0, [r4] -_080978E2: - ldr r1, _080978F4 @ =gFieldCallback2 - ldr r0, _080978F8 @ =FieldCallback_PrepareFadeInFromMenu - str r0, [r1] - ldr r1, _080978FC @ =gPostMenuFieldCallback - ldr r0, _08097900 @ =sub_8097984 -_080978EC: - str r0, [r1] - movs r0, 0x1 - b _08097970 - .align 2, 0 -_080978F4: .4byte gFieldCallback2 -_080978F8: .4byte FieldCallback_PrepareFadeInFromMenu -_080978FC: .4byte gPostMenuFieldCallback -_08097900: .4byte sub_8097984 -_08097904: - ldr r4, _0809797C @ =gPlayerFacingPosition - adds r1, r4, 0x2 - adds r0, r4, 0 - bl PlayerGetDestCoords - movs r7, 0 - adds r2, r4, 0 - ldr r0, _08097980 @ =0x0000ffff - mov r8, r0 -_08097916: - mov r1, r8 - adds r0, r1, r7 - ldrh r1, [r2, 0x2] - adds r0, r1 - movs r6, 0 - lsls r0, 16 - asrs r5, r0, 16 -_08097924: - mov r1, r8 - adds r0, r1, r6 - ldrh r1, [r2] - adds r0, r1 - lsls r0, 16 - asrs r4, r0, 16 - adds r0, r4, 0 - adds r1, r5, 0 - str r2, [sp] - bl MapGridGetZCoordAt - lsls r0, 24 - lsrs r0, 24 - ldr r2, [sp] - movs r1, 0x4 - ldrsb r1, [r2, r1] - cmp r0, r1 - bne _0809795A - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8097874 - lsls r0, 24 - lsrs r0, 24 - ldr r2, [sp] - cmp r0, 0x1 - beq _080978E2 -_0809795A: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0x2 - bls _08097924 - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x2 - bls _08097916 - movs r0, 0 -_08097970: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0809797C: .4byte gPlayerFacingPosition -_08097980: .4byte 0x0000ffff - thumb_func_end SetUpFieldMove_Cut - - thumb_func_start sub_8097984 -sub_8097984: @ 8097984 - push {lr} - movs r0, 0x1 - bl FieldEffectStart - bl GetCursorSelectionMonId - ldr r1, _0809799C @ =gFieldEffectArguments - lsls r0, 24 - lsrs r0, 24 - str r0, [r1] - pop {r0} - bx r0 - .align 2, 0 -_0809799C: .4byte gFieldEffectArguments - thumb_func_end sub_8097984 - - thumb_func_start sub_80979A0 -sub_80979A0: @ 80979A0 - push {lr} - bl oei_task_add - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080979C8 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldr r2, _080979CC @ =sub_8097A20 - lsrs r0, r2, 16 - strh r0, [r1, 0x18] - strh r2, [r1, 0x1A] - movs r0, 0x12 - bl IncrementGameStat - movs r0, 0 - pop {r1} - bx r1 - .align 2, 0 -_080979C8: .4byte gTasks -_080979CC: .4byte sub_8097A20 - thumb_func_end sub_80979A0 - - thumb_func_start sub_80979D0 -sub_80979D0: @ 80979D0 - push {lr} - bl GetCursorSelectionMonId - ldr r1, _080979E8 @ =gFieldEffectArguments - lsls r0, 24 - lsrs r0, 24 - str r0, [r1] - ldr r0, _080979EC @ =EventScript_FldEffCut - bl ScriptContext1_SetupScript - pop {r0} - bx r0 - .align 2, 0 -_080979E8: .4byte gFieldEffectArguments -_080979EC: .4byte EventScript_FldEffCut - thumb_func_end sub_80979D0 - - thumb_func_start sub_80979F0 -sub_80979F0: @ 80979F0 - push {lr} - bl oei_task_add - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08097A18 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldr r2, _08097A1C @ =sub_8097C6C - lsrs r0, r2, 16 - strh r0, [r1, 0x18] - strh r2, [r1, 0x1A] - movs r0, 0x12 - bl IncrementGameStat - movs r0, 0 - pop {r1} - bx r1 - .align 2, 0 -_08097A18: .4byte gTasks -_08097A1C: .4byte sub_8097C6C - thumb_func_end sub_80979F0 - - thumb_func_start sub_8097A20 -sub_8097A20: @ 8097A20 - push {lr} - movs r0, 0x1 - bl FieldEffectActiveListRemove - ldr r0, _08097A38 @ =gUnknown_2039874 - ldrb r0, [r0] - cmp r0, 0x1 - bne _08097A3C - bl CutMoveOpenDottedHoleDoor - b _08097A42 - .align 2, 0 -_08097A38: .4byte gUnknown_2039874 -_08097A3C: - movs r0, 0x3A - bl FieldEffectStart -_08097A42: - pop {r0} - bx r0 - thumb_func_end sub_8097A20 - - thumb_func_start sub_8097A48 -sub_8097A48: @ 8097A48 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r7, 0 - movs r0, 0x79 - bl PlaySE - ldr r4, _08097B38 @ =gPlayerFacingPosition - adds r1, r4, 0x2 - adds r0, r4, 0 - bl PlayerGetDestCoords - mov r8, r4 - ldr r0, _08097B3C @ =0x0000ffff - mov r9, r0 -_08097A68: - mov r1, r9 - adds r0, r1, r7 - mov r2, r8 - ldrh r2, [r2, 0x2] - adds r0, r2 - movs r6, 0 - lsls r0, 16 - asrs r5, r0, 16 -_08097A78: - mov r1, r9 - adds r0, r1, r6 - mov r2, r8 - ldrh r2, [r2] - adds r0, r2 - lsls r0, 16 - asrs r4, r0, 16 - adds r0, r4, 0 - adds r1, r5, 0 - bl MapGridGetZCoordAt - lsls r0, 24 - lsrs r0, 24 - mov r2, r8 - movs r1, 0x4 - ldrsb r1, [r2, r1] - cmp r0, r1 - bne _08097ABC - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8097874 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08097ABC - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8097B50 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_805F378 -_08097ABC: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0x2 - bls _08097A78 - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x2 - bls _08097A68 - bl DrawWholeMapView - ldr r4, _08097B40 @ =gUnknown_2039870 - movs r0, 0x8 - bl Alloc - str r0, [r4] - movs r7, 0 - ldr r5, _08097B44 @ =gSprites -_08097AE2: - ldr r0, _08097B48 @ =gPlayerAvatar - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - ldrh r1, [r0, 0x2] - lsls r1, 23 - lsrs r1, 7 - movs r2, 0x80 - lsls r2, 12 - adds r1, r2 - asrs r1, 16 - ldrb r2, [r0] - adds r2, 0x14 - ldr r0, _08097B4C @ =gUnknown_83D414C - movs r3, 0 - bl CreateSprite - ldr r1, [r4] - adds r1, r7 - strb r0, [r1] - ldr r0, [r4] - adds r0, r7 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - lsls r1, r7, 5 - strh r1, [r0, 0x32] - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x7 - bls _08097AE2 - movs r0, 0 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_08097B38: .4byte gPlayerFacingPosition -_08097B3C: .4byte 0x0000ffff -_08097B40: .4byte gUnknown_2039870 -_08097B44: .4byte gSprites -_08097B48: .4byte gPlayerAvatar -_08097B4C: .4byte gUnknown_83D414C - thumb_func_end sub_8097A48 - - thumb_func_start sub_8097B50 -sub_8097B50: @ 8097B50 - push {r4-r7,lr} - lsls r0, 16 - lsls r1, 16 - movs r4, 0 - lsrs r6, r0, 16 - asrs r0, 16 - lsrs r7, r1, 16 - asrs r1, 16 - bl MapGridGetMetatileIdAt - lsls r0, 16 - lsrs r2, r0, 16 - ldr r1, _08097B84 @ =gUnknown_83D4100 - ldr r5, _08097B88 @ =0x0000ffff - mov r12, r1 -_08097B6E: - lsls r3, r4, 2 - adds r0, r3, r1 - ldrh r0, [r0] - cmp r0, r5 - beq _08097BA0 - cmp r0, r2 - beq _08097B8C - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - b _08097B6E - .align 2, 0 -_08097B84: .4byte gUnknown_83D4100 -_08097B88: .4byte 0x0000ffff -_08097B8C: - lsls r0, r6, 16 - asrs r0, 16 - lsls r1, r7, 16 - asrs r1, 16 - mov r2, r12 - adds r2, 0x2 - adds r2, r3, r2 - ldrh r2, [r2] - bl MapGridSetMetatileIdAt -_08097BA0: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8097B50 - - thumb_func_start objc_8097BA8 -objc_8097BA8: @ 8097BA8 - movs r2, 0 - movs r1, 0x8 - strh r1, [r0, 0x2E] - strh r2, [r0, 0x30] - strh r2, [r0, 0x34] - ldr r1, _08097BB8 @ =objc_8097BBC - str r1, [r0, 0x1C] - bx lr - .align 2, 0 -_08097BB8: .4byte objc_8097BBC - thumb_func_end objc_8097BA8 - - thumb_func_start objc_8097BBC -objc_8097BBC: @ 8097BBC - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x32 - ldrsh r0, [r4, r1] - movs r2, 0x2E - ldrsh r1, [r4, r2] - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x32 - ldrsh r0, [r4, r1] - movs r2, 0x2E - ldrsh r1, [r4, r2] - bl Cos - strh r0, [r4, 0x26] - ldrh r0, [r4, 0x32] - adds r0, 0x8 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x32] - ldrh r1, [r4, 0x2E] - adds r1, 0x1 - ldrh r2, [r4, 0x34] - lsls r0, r2, 16 - asrs r0, 18 - adds r1, r0 - strh r1, [r4, 0x2E] - adds r2, 0x1 - strh r2, [r4, 0x34] - ldrh r1, [r4, 0x30] - movs r2, 0x30 - ldrsh r0, [r4, r2] - cmp r0, 0x1C - beq _08097C08 - adds r0, r1, 0x1 - strh r0, [r4, 0x30] - b _08097C0C -_08097C08: - ldr r0, _08097C14 @ =sub_8097C18 - str r0, [r4, 0x1C] -_08097C0C: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08097C14: .4byte sub_8097C18 - thumb_func_end objc_8097BBC - - thumb_func_start sub_8097C18 -sub_8097C18: @ 8097C18 - push {r4-r6,lr} - movs r4, 0x1 -_08097C1C: - ldr r6, _08097C64 @ =gUnknown_2039870 - ldr r0, [r6] - adds r0, r4 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r5, _08097C68 @ =gSprites - adds r0, r5 - bl DestroySprite - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bls _08097C1C - ldr r0, [r6] - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x3A - bl FieldEffectStop - ldr r0, [r6] - bl Free - bl sub_80696C0 - bl ScriptContext2_Disable - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08097C64: .4byte gUnknown_2039870 -_08097C68: .4byte gSprites - thumb_func_end sub_8097C18 - - thumb_func_start sub_8097C6C -sub_8097C6C: @ 8097C6C - push {lr} - movs r0, 0x79 - bl PlaySE - movs r0, 0x2 - bl FieldEffectActiveListRemove - bl EnableBothScriptContexts - pop {r0} - bx r0 - thumb_func_end sub_8097C6C - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/fldeff_flash.s b/asm/fldeff_flash.s index f550d2291..c6cc17f82 100644 --- a/asm/fldeff_flash.s +++ b/asm/fldeff_flash.s @@ -42,7 +42,7 @@ _080C9B6E: thumb_func_start sub_80C9B74 sub_80C9B74: @ 80C9B74 push {r4,lr} - bl oei_task_add + bl CreateFieldEffectShowMon adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 diff --git a/data/event_scripts.s b/data/event_scripts.s index f66b4da77..3867cf0d7 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1330,16 +1330,14 @@ EventScript_SetResultFalse:: @ 81A77B0 setvar VAR_RESULT, FALSE return -Route16_NorthEntrance_1F_EventScript_1A77B6:: @ 81A77B6 -Route18_EastEntrance_1F_EventScript_1A77B6:: @ 81A77B6 +EventScript_SetExitingCyclingRoad:: @ 81A77B6 lockall clearflag FLAG_SYS_ON_CYCLING_ROAD setvar VAR_MAP_SCENE_ROUTE16, 0 releaseall end -Route16_NorthEntrance_1F_EventScript_1A77C1:: @ 81A77C1 -Route18_EastEntrance_1F_EventScript_1A77C1:: @ 81A77C1 +EventScript_SetEnteringCyclingRoad:: @ 81A77C1 lockall setvar VAR_MAP_SCENE_ROUTE16, 1 releaseall diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index de50ed39d..cac76bea9 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -78,11 +78,11 @@ gFldEffScript_ExclamationMarkIcon:: @ 81D97C4 end gFldEffScript_UseCutOnGrass:: @ 81D97CA - callnative sub_80979A0 + callnative FldEff_UseCutOnGrass end gFldEffScript_UseCutOnTree:: @ 81D97D0 - callnative sub_80979F0 + callnative FldEff_UseCutOnTree end gFldEffScript_Shadow:: @ 81D97D6 @@ -299,7 +299,7 @@ gFldEffScript_SecretPowerShrub:: @ 81D9964 end gFldEffScript_CutGrass:: @ 81D9965 - loadfadedpal_callnative gUnknown_83D4144, sub_8097A48 + loadfadedpal_callnative gFldEffPalette_CutGrass, FldEff_CutGrass end gFldEffScript_FieldMoveShowMonInit:: @ 81D996F diff --git a/data/fldeff_cut.s b/data/fldeff_cut.s deleted file mode 100644 index ca25b396a..000000000 --- a/data/fldeff_cut.s +++ /dev/null @@ -1,40 +0,0 @@ -#include "constants/maps.h" -#include "constants/species.h" - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnknown_83D4100:: @ 83D4100 - .2byte 0x000d, 0x0001 - .2byte 0x000a, 0x0013 - .2byte 0x000b, 0x000e - .2byte 0x000c, 0x000f - .2byte 0x0352, 0x033e - .2byte 0x0300, 0x0310 - .2byte 0x0301, 0x0311 - .2byte 0x0302, 0x0312 - .2byte 0x0284, 0x0281 - .2byte 0xffff, 0xffff - - .align 2 -gOamData_83D4128:: - .4byte 0x00000000, 0x00001401 - -gAnimCmd_83D4130:: - obj_image_anim_frame 0, 30 - obj_image_anim_jump 0 - -gSpriteAnimTable_83D4138:: - .4byte gAnimCmd_83D4130 - -gUnknown_83D413C:: - obj_frame_tiles gUnknown_8398648, 0x20 - -gUnknown_83D4144:: - obj_pal gUnknown_8398688, 4096 - -gUnknown_83D414C:: @ 83D414C - spr_template 0xFFFF, 4096, gOamData_83D4128, gSpriteAnimTable_83D4138, gUnknown_83D413C, gDummySpriteAffineAnimTable, objc_8097BA8 - diff --git a/data/maps/Route15/map.json b/data/maps/Route15/map.json index cd0581a20..ef6dee02a 100644 --- a/data/maps/Route15/map.json +++ b/data/maps/Route15/map.json @@ -36,7 +36,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AAD67", + "script": "Route15_EventScript_Yazmin", "flag": "0" }, { @@ -49,7 +49,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 5, - "script": "Route15_EventScript_1AACEB", + "script": "Route15_EventScript_Edwin", "flag": "0" }, { @@ -62,7 +62,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 2, - "script": "Route15_EventScript_1AAD29", + "script": "Route15_EventScript_Chester", "flag": "0" }, { @@ -75,7 +75,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AADA5", + "script": "Route15_EventScript_Kindra", "flag": "0" }, { @@ -88,7 +88,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 2, - "script": "Route15_EventScript_1AACAD", + "script": "Route15_EventScript_Olivia", "flag": "0" }, { @@ -101,7 +101,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 2, - "script": "Route15_EventScript_1AAC31", + "script": "Route15_EventScript_Alex", "flag": "0" }, { @@ -114,7 +114,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AABF3", + "script": "Route15_EventScript_Ernest", "flag": "0" }, { @@ -127,7 +127,7 @@ "movement_range_y": 4, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AADE3", + "script": "Route15_EventScript_Becky", "flag": "0" }, { @@ -140,7 +140,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 2, - "script": "Route15_EventScript_1AAC6F", + "script": "Route15_EventScript_Grace", "flag": "0" }, { @@ -153,7 +153,7 @@ "movement_range_y": 4, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AAE21", + "script": "Route15_EventScript_Celia", "flag": "0" }, { @@ -179,7 +179,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AAEA5", + "script": "Route15_EventScript_Ron", "flag": "0" }, { @@ -192,7 +192,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route15_EventScript_1AAE5F", + "script": "Route15_EventScript_Mya", "flag": "0" }, { @@ -233,7 +233,7 @@ "x": 41, "y": 11, "elevation": 0, - "script": "Route15_EventScript_1680DC" + "script": "Route15_EventScript_RouteSign" } ] } diff --git a/data/maps/Route15/scripts.inc b/data/maps/Route15/scripts.inc index 40890250c..85d24e49b 100644 --- a/data/maps/Route15/scripts.inc +++ b/data/maps/Route15/scripts.inc @@ -1,6 +1,6 @@ Route15_MapScripts:: @ 81680DB .byte 0 -Route15_EventScript_1680DC:: @ 81680DC - msgbox gUnknown_8186A77, MSGBOX_SIGN +Route15_EventScript_RouteSign:: @ 81680DC + msgbox Route15_Text_RouteSign, MSGBOX_SIGN end diff --git a/data/maps/Route15/text.inc b/data/maps/Route15/text.inc index 33c60e7dc..be3e38e6c 100644 --- a/data/maps/Route15/text.inc +++ b/data/maps/Route15/text.inc @@ -1,154 +1,154 @@ -Text_18650B:: @ 818650B +Route15_Text_KindraIntro:: @ 818650B .string "I just got some POKéMON in trades.\n" .string "Can I try them out on you?$" -Text_186549:: @ 8186549 +Route15_Text_KindraDefeat:: @ 8186549 .string "Not good enough!$" -Text_18655A:: @ 818655A +Route15_Text_KindraPostBattle:: @ 818655A .string "You can't change the nickname of\n" .string "any POKéMON you get in a trade.\p" .string "Only the Original TRAINER can get\n" .string "the nickname changed.$" -Text_1865D3:: @ 81865D3 +Route15_Text_BeckyIntro:: @ 81865D3 .string "You look gentle, so I think I can\n" .string "beat you.\p" .string "I'll give it a go!$" -Text_186612:: @ 8186612 +Route15_Text_BeckyDefeat:: @ 8186612 .string "No, wrong!$" -Text_18661D:: @ 818661D +Route15_Text_BeckyPostBattle:: @ 818661D .string "I'm afraid of BIKERS. They look so\n" .string "ugly and mean!$" -Text_18664F:: @ 818664F +Route15_Text_EdwinIntro:: @ 818664F .string "When I whistle, I can summon bird\n" .string "POKéMON.$" -Text_18667A:: @ 818667A +Route15_Text_EdwinDefeat:: @ 818667A .string "Ow!\n" .string "That's tragic!$" -Text_18668D:: @ 818668D +Route15_Text_EdwinPostBattle:: @ 818668D .string "Maybe I'm not cut out for battles.\n" .string "I'm not the right type, I guess.$" -Text_1866D1:: @ 81866D1 +Route15_Text_ChesterIntro:: @ 81866D1 .string "Hmm? My birds are shivering!\n" .string "You're good, aren't you?$" -Text_186707:: @ 8186707 +Route15_Text_ChesterDefeat:: @ 8186707 .string "Just as I thought!$" -Text_18671A:: @ 818671A +Route15_Text_ChesterPostBattle:: @ 818671A .string "This is so obvious, you should know\n" .string "this, but…\p" .string "Moves like EARTHQUAKE and FISSURE\n" .string "have no effect on bird POKéMON.$" -Text_18678B:: @ 818678B +Route15_Text_GraceIntro:: @ 818678B .string "Oh, you're a little cutie!\n" .string "So like a darling POKéMON!$" -Text_1867C1:: @ 81867C1 +Route15_Text_GraceDefeat:: @ 81867C1 .string "You looked so cute, too!$" -Text_1867DA:: @ 81867DA +Route15_Text_GracePostBattle:: @ 81867DA .string "I forgive you.\n" .string "I can take it.\l" .string "I'm a big girl now.$" -Text_18680C:: @ 818680C +Route15_Text_OliviaIntro:: @ 818680C .string "I raise POKéMON for protection\n" .string "because I live alone.$" -Text_186841:: @ 8186841 +Route15_Text_OliviaDefeat:: @ 8186841 .string "POKéMON isn't about winning or\n" .string "losing for me.$" -Text_18686F:: @ 818686F +Route15_Text_OliviaPostBattle:: @ 818686F .string "I love having my POKéMON greet me\n" .string "when I get home.\p" .string "It's so reassuring.$" -Text_1868B6:: @ 81868B6 +Route15_Text_ErnestIntro:: @ 81868B6 .string "Hey, kid! C'mon!\n" .string "I just got these off some loser!$" -Text_1868E8:: @ 81868E8 +Route15_Text_ErnestDefeat:: @ 81868E8 .string "Why not?$" -Text_1868F1:: @ 81868F1 +Route15_Text_ErnestPostBattle:: @ 81868F1 .string "Life's too short.\n" .string "It's cool to live as an outlaw.\l" .string "TEAM ROCKET RULES!$" -Text_186936:: @ 8186936 +Route15_Text_AlexIntro:: @ 8186936 .string "Fork over all your cash when you\n" .string "lose to me, kid!$" -Text_186968:: @ 8186968 +Route15_Text_AlexDefeat:: @ 8186968 .string "That can't be true!$" -Text_18697C:: @ 818697C +Route15_Text_AlexPostBattle:: @ 818697C .string "I was just joking about the money.\n" .string "Don't take me all serious.$" -Text_1869BA:: @ 81869BA +Route15_Text_CeliaIntro:: @ 81869BA .string "What's cool and happening?\n" .string "Trading POKéMON!$" -Text_1869E6:: @ 81869E6 +Route15_Text_CeliaDefeat:: @ 81869E6 .string "I said trade!$" -Text_1869F4:: @ 81869F4 +Route15_Text_CeliaPostBattle:: @ 81869F4 .string "I trade POKéMON with my friends\n" .string "all the time.$" -Text_186A22:: @ 8186A22 +Route15_Text_YazminIntro:: @ 8186A22 .string "Want to play with my POKéMON?$" -Text_186A40:: @ 8186A40 +Route15_Text_YazminDefeat:: @ 8186A40 .string "I was too impatient!$" -Text_186A55:: @ 8186A55 +Route15_Text_YazminPostBattle:: @ 8186A55 .string "I'll go train with weaker people.$" -gUnknown_8186A77:: @ 8186A77 +Route15_Text_RouteSign:: @ 8186A77 .string "ROUTE 15\n" .string "West to FUCHSIA CITY$" -Text_186A95:: @ 8186A95 +Route15_Text_MyaIntro:: @ 8186A95 .string "MYA: You're perfect.\n" .string "Help me train my little brother?$" -Text_186ACB:: @ 8186ACB +Route15_Text_MyaDefeat:: @ 8186ACB .string "MYA: RON, you have to focus!\n" .string "Concentrate on what you're doing!$" -Text_186B0A:: @ 8186B0A +Route15_Text_MyaPostBattle:: @ 8186B0A .string "MYA: Okay, we'll turn it up.\n" .string "I'll add to our training menu!$" -Text_186B46:: @ 8186B46 +Route15_Text_MyaNotEnoughMons:: @ 8186B46 .string "MYA: Do you want to challenge us?\n" .string "You'll need two POKéMON, though.$" -Text_186B89:: @ 8186B89 +Route15_Text_RonIntro:: @ 8186B89 .string "RON: My sister gets scary when we\n" .string "lose.$" -Text_186BB1:: @ 8186BB1 +Route15_Text_RonDefeat:: @ 8186BB1 .string "RON: Oh, no, no…\n" .string "Sis, I'm sorry!$" -Text_186BD2:: @ 8186BD2 +Route15_Text_RonPostBattle:: @ 8186BD2 .string "RON: Oh, bleah…\n" .string "I wish I had a nice sister…$" -Text_186BFE:: @ 8186BFE +Route15_Text_RonNotEnoughMons:: @ 8186BFE .string "RON: Did you want to battle with\n" .string "my sister and me?\p" .string "You need two POKéMON, then.$" diff --git a/data/maps/Route15_WestEntrance_1F/map.json b/data/maps/Route15_WestEntrance_1F/map.json index 39bf0cb41..fb1f9cacd 100644 --- a/data/maps/Route15_WestEntrance_1F/map.json +++ b/data/maps/Route15_WestEntrance_1F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route15_WestEntrance_1F_EventScript_170089", + "script": "Route15_WestEntrance_1F_EventScript_Guard", "flag": "0" } ], diff --git a/data/maps/Route15_WestEntrance_1F/scripts.inc b/data/maps/Route15_WestEntrance_1F/scripts.inc index 9f753e6c9..222be2356 100644 --- a/data/maps/Route15_WestEntrance_1F/scripts.inc +++ b/data/maps/Route15_WestEntrance_1F/scripts.inc @@ -1,6 +1,6 @@ Route15_WestEntrance_1F_MapScripts:: @ 8170088 .byte 0 -Route15_WestEntrance_1F_EventScript_170089:: @ 8170089 - msgbox gUnknown_819F560, MSGBOX_NPC +Route15_WestEntrance_1F_EventScript_Guard:: @ 8170089 + msgbox Route15_WestEntrance_1F_Text_OaksAideCameByHere, MSGBOX_NPC end diff --git a/data/maps/Route15_WestEntrance_1F/text.inc b/data/maps/Route15_WestEntrance_1F/text.inc index e843e10a8..6cdbe8a2a 100644 --- a/data/maps/Route15_WestEntrance_1F/text.inc +++ b/data/maps/Route15_WestEntrance_1F/text.inc @@ -1,4 +1,4 @@ -gUnknown_819F560:: @ 819F560 +Route15_WestEntrance_1F_Text_OaksAideCameByHere:: @ 819F560 .string "Are you the kid who's working on\n" .string "a POKéDEX?\p" .string "PROF. OAK's AIDE came by here.$" diff --git a/data/maps/Route15_WestEntrance_2F/map.json b/data/maps/Route15_WestEntrance_2F/map.json index b11b7224a..8317b4d84 100644 --- a/data/maps/Route15_WestEntrance_2F/map.json +++ b/data/maps/Route15_WestEntrance_2F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route15_WestEntrance_2F_EventScript_1700B9", + "script": "Route15_WestEntrance_2F_EventScript_Aide", "flag": "0" } ], @@ -45,14 +45,14 @@ "x": 4, "y": 1, "elevation": 0, - "script": "Route15_WestEntrance_2F_EventScript_170093" + "script": "Route15_WestEntrance_2F_EventScript_LeftBinoculars" }, { "type": "bg_event_type_0", "x": 8, "y": 1, "elevation": 0, - "script": "Route15_WestEntrance_2F_EventScript_1700B0" + "script": "Route15_WestEntrance_2F_EventScript_RightBinoculars" } ] } diff --git a/data/maps/Route15_WestEntrance_2F/scripts.inc b/data/maps/Route15_WestEntrance_2F/scripts.inc index 088a65876..851ceb07f 100644 --- a/data/maps/Route15_WestEntrance_2F/scripts.inc +++ b/data/maps/Route15_WestEntrance_2F/scripts.inc @@ -1,9 +1,11 @@ +.equ REQUIRED_CAUGHT_MONS, 50 + Route15_WestEntrance_2F_MapScripts:: @ 8170092 .byte 0 -Route15_WestEntrance_2F_EventScript_170093:: @ 8170093 +Route15_WestEntrance_2F_EventScript_LeftBinoculars:: @ 8170093 lockall - msgbox gUnknown_819F79C + msgbox Route15_WestEntrance_2F_Text_LargeShiningBird drawmonpic SPECIES_ARTICUNO, 10, 3 delay 20 waitbuttonpress @@ -13,40 +15,40 @@ Route15_WestEntrance_2F_EventScript_170093:: @ 8170093 releaseall end -Route15_WestEntrance_2F_EventScript_1700B0:: @ 81700B0 - msgbox gUnknown_819F7F8, MSGBOX_SIGN +Route15_WestEntrance_2F_EventScript_RightBinoculars:: @ 81700B0 + msgbox Route15_WestEntrance_2F_Text_SmallIslandOnHorizon, MSGBOX_SIGN end -Route15_WestEntrance_2F_EventScript_1700B9:: @ 81700B9 +Route15_WestEntrance_2F_EventScript_Aide:: @ 81700B9 lock faceplayer - call EventScript_170145 - goto_if_set FLAG_GOT_EXP_SHARE_FROM_OAKS_AIDE, EventScript_17013B - msgbox gUnknown_819F5AB, MSGBOX_YESNO + call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo + goto_if_set FLAG_GOT_EXP_SHARE_FROM_OAKS_AIDE, Route15_WestEntrance_2F_EventScript_AlreadyGotExpShare + msgbox Route15_WestEntrance_2F_Text_GiveItemIfCaughtEnough, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, Special_GetPokedexCount getnumberstring 2, VAR_0x8006 - call EventScript_170145 - compare VAR_0x8006, 50 + call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo + compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough - msgbox gUnknown_819F6AA + msgbox Route15_WestEntrance_2F_Text_GreatHereYouGo checkitemspace ITEM_EXP_SHARE, 1 compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem - giveitem_msg gUnknown_819F6FD, ITEM_EXP_SHARE + giveitem_msg Route15_WestEntrance_2F_Text_ReceivedItemFromAide, ITEM_EXP_SHARE setflag FLAG_GOT_EXP_SHARE_FROM_OAKS_AIDE - msgbox gUnknown_819F71F + msgbox Route15_WestEntrance_2F_Text_ExplainExpShare release end -EventScript_17013B:: @ 817013B - msgbox gUnknown_819F71F +Route15_WestEntrance_2F_EventScript_AlreadyGotExpShare:: @ 817013B + msgbox Route15_WestEntrance_2F_Text_ExplainExpShare release end -EventScript_170145:: @ 8170145 - getnumberstring 0, 50 +Route15_WestEntrance_2F_EventScript_GetAideRequestInfo:: @ 8170145 + getnumberstring 0, REQUIRED_CAUGHT_MONS getitemname 1, ITEM_EXP_SHARE return diff --git a/data/maps/Route15_WestEntrance_2F/text.inc b/data/maps/Route15_WestEntrance_2F/text.inc index e5518b8e2..c3c9866eb 100644 --- a/data/maps/Route15_WestEntrance_2F/text.inc +++ b/data/maps/Route15_WestEntrance_2F/text.inc @@ -1,4 +1,4 @@ -gUnknown_819F5AB:: @ 819F5AB +Route15_WestEntrance_2F_Text_GiveItemIfCaughtEnough:: @ 819F5AB .string "Hi! Remember me?\n" .string "I'm one of PROF. OAK's AIDES.\p" .string "If your POKéDEX has complete data\n" @@ -10,30 +10,30 @@ gUnknown_819F5AB:: @ 819F5AB .string "Have you gathered data on at least\n" .string "{STR_VAR_1} kinds of POKéMON?$" -gUnknown_819F6AA:: @ 819F6AA +Route15_WestEntrance_2F_Text_GreatHereYouGo:: @ 819F6AA .string "Great! You have caught or owned\n" .string "{STR_VAR_3} kinds of POKéMON!\p" .string "Congratulations!\n" .string "Here you go!$" -gUnknown_819F6FD:: @ 819F6FD +Route15_WestEntrance_2F_Text_ReceivedItemFromAide:: @ 819F6FD .string "{PLAYER} received the {STR_VAR_2}\n" .string "from the AIDE.$" -gUnknown_819F71F:: @ 819F71F +Route15_WestEntrance_2F_Text_ExplainExpShare:: @ 819F71F .string "EXP. SHARE is an item to be held\n" .string "by a POKéMON.\p" .string "The POKéMON will receive a share\n" .string "of the EXP. Points without having\l" .string "to battle.$" -gUnknown_819F79C:: @ 819F79C +Route15_WestEntrance_2F_Text_LargeShiningBird:: @ 819F79C .string "Let's see what the binoculars have\n" .string "to show…\p" .string "A large, shining bird is flying\n" .string "toward the sea.$" -gUnknown_819F7F8:: @ 819F7F8 +Route15_WestEntrance_2F_Text_SmallIslandOnHorizon:: @ 819F7F8 .string "Let's see what the binoculars have\n" .string "to show…\p" .string "It looks like a small island on\n" diff --git a/data/maps/Route16/map.json b/data/maps/Route16/map.json index 45617a334..b88cbe12c 100644 --- a/data/maps/Route16/map.json +++ b/data/maps/Route16/map.json @@ -36,7 +36,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AAEEB", + "script": "Route16_EventScript_Lao", "flag": "0" }, { @@ -49,7 +49,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AAFA5", + "script": "Route16_EventScript_Koji", "flag": "0" }, { @@ -62,7 +62,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AAFE3", + "script": "Route16_EventScript_Luke", "flag": "0" }, { @@ -75,7 +75,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AAF67", + "script": "Route16_EventScript_Ruben", "flag": "0" }, { @@ -88,7 +88,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AAF29", + "script": "Route16_EventScript_Hideo", "flag": "0" }, { @@ -101,7 +101,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AB021", + "script": "Route16_EventScript_Camron", "flag": "0" }, { @@ -127,7 +127,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AB0A5", + "script": "Route16_EventScript_Lea", "flag": "0" }, { @@ -140,7 +140,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route16_EventScript_1AB05F", + "script": "Route16_EventScript_Jed", "flag": "0" }, { diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc index 1d7c6657c..27a5efccc 100644 --- a/data/maps/Route16/scripts.inc +++ b/data/maps/Route16/scripts.inc @@ -14,18 +14,18 @@ Route16_EventScript_RemoveSnorlax:: @ 81680FF Route16_OnTransition:: @ 8168103 compare VAR_MAP_SCENE_ROUTE16, 1 - call_if_eq Route16_EventScript_EnterCyclingRoad + call_if_eq Route16_OnTransitionCyclingRoad end -Route16_EventScript_EnterCyclingRoad:: @ 816810F +Route16_OnTransitionCyclingRoad:: @ 816810F setflag FLAG_SYS_ON_CYCLING_ROAD return Route16_OnWarp:: @ 8168113 - map_script_2 VAR_MAP_SCENE_ROUTE16, 1, Route16_EventScript_WarpIntoCyclingRoad + map_script_2 VAR_MAP_SCENE_ROUTE16, 1, Route16_OnWarpCyclingRoad .2byte 0 -Route16_EventScript_WarpIntoCyclingRoad:: @ 816811D +Route16_OnWarpCyclingRoad:: @ 816811D special Special_ForcePlayerOntoBike end diff --git a/data/maps/Route16/text.inc b/data/maps/Route16/text.inc index 5131934b1..ca3507cc7 100644 --- a/data/maps/Route16/text.inc +++ b/data/maps/Route16/text.inc @@ -1,66 +1,66 @@ -Text_186C4D:: @ 8186C4D +Route16_Text_LaoIntro:: @ 8186C4D .string "What do you want?$" -Text_186C5F:: @ 8186C5F +Route16_Text_LaoDefeat:: @ 8186C5F .string "Don't you dare laugh!$" -Text_186C75:: @ 8186C75 +Route16_Text_LaoPostBattle:: @ 8186C75 .string "We like just hanging here.\n" .string "What's it to you?$" -Text_186CA2:: @ 8186CA2 +Route16_Text_KojiIntro:: @ 8186CA2 .string "Nice BIKE!\n" .string "Hand it over!$" -Text_186CBB:: @ 8186CBB +Route16_Text_KojiDefeat:: @ 8186CBB .string "Knockout!$" -Text_186CC5:: @ 8186CC5 +Route16_Text_KojiPostBattle:: @ 8186CC5 .string "Forget it, who needs your BIKE!$" -Text_186CE5:: @ 8186CE5 +Route16_Text_LukeIntro:: @ 8186CE5 .string "Come out and play, little mouse!$" -Text_186D06:: @ 8186D06 +Route16_Text_LukeDefeat:: @ 8186D06 .string "You little rat!$" -Text_186D16:: @ 8186D16 +Route16_Text_LukePostBattle:: @ 8186D16 .string "I hate losing!\n" .string "Get out of my face!$" -Text_186D39:: @ 8186D39 +Route16_Text_HideoIntro:: @ 8186D39 .string "Hey, you just bumped me!$" -Text_186D52:: @ 8186D52 +Route16_Text_HideoDefeat:: @ 8186D52 .string "Kaboom!$" -Text_186D5A:: @ 8186D5A +Route16_Text_HideoPostBattle:: @ 8186D5A .string "We'll always be hanging around here\n" .string "even if you don't like it.\p" .string "You can detour to VERMILION from\n" .string "FUCHSIA going along the coast.$" -Text_186DD9:: @ 8186DD9 +Route16_Text_CamronIntro:: @ 8186DD9 .string "I'm feeling hungry and mean!\n" .string "I need a punching bag!$" -Text_186E0D:: @ 8186E0D +Route16_Text_CamronDefeat:: @ 8186E0D .string "Bad, bad, bad!$" -Text_186E1C:: @ 8186E1C +Route16_Text_CamronPostBattle:: @ 8186E1C .string "If I'm going to have POKéMON, they\n" .string "may as well be ferocious.\p" .string "I'd use them to leave my enemies\n" .string "in tatters.$" -Text_186E86:: @ 8186E86 +Route16_Text_RubenIntro:: @ 8186E86 .string "Hey, there!\n" .string "Let's have ourselves a good time!$" -Text_186EB4:: @ 8186EB4 +Route16_Text_RubenDefeat:: @ 8186EB4 .string "Don't make me mad!$" -Text_186EC7:: @ 8186EC7 +Route16_Text_RubenPostBattle:: @ 8186EC7 .string "I get my kicks by harassing people\n" .string "with my stinking POKéMON.\p" .string "They're great for startling people.\n" @@ -78,35 +78,35 @@ Route16_Text_RouteSign:: @ 8186F98 .string "ROUTE 16\n" .string "CELADON CITY - FUCHSIA CITY$" -Text_186FBD:: @ 8186FBD +Route16_Text_JedIntro:: @ 8186FBD .string "JED: Our love knows no bounds.\n" .string "We're in love and we show it!$" -Text_186FFA:: @ 8186FFA +Route16_Text_JedDefeat:: @ 8186FFA .string "JED: Oh, no!\n" .string "My love has seen me as a loser!$" -Text_187027:: @ 8187027 +Route16_Text_JedPostBattle:: @ 8187027 .string "JED: Listen, LEA.\n" .string "You need to focus less on me.$" -Text_187057:: @ 8187057 +Route16_Text_JedNotEnoughMons:: @ 8187057 .string "JED: You have just one POKéMON?\n" .string "Is there no love in your heart?$" -Text_187097:: @ 8187097 +Route16_Text_LeaIntro:: @ 8187097 .string "LEA: Sometimes, the intensity of\n" .string "our love scares me.$" -Text_1870CC:: @ 81870CC +Route16_Text_LeaDefeat:: @ 81870CC .string "LEA: Ohh! But JED looks cool\n" .string "even in a loss!$" -Text_1870F9:: @ 81870F9 +Route16_Text_LeaPostBattle:: @ 81870F9 .string "LEA: Ehehe, I'm sorry.\n" .string "JED is so cool.$" -Text_187120:: @ 8187120 +Route16_Text_LeaNotEnoughMons:: @ 8187120 .string "LEA: Oh, you don't have two\n" .string "POKéMON with you?\p" .string "Doesn't it feel lonely for you or\n" diff --git a/data/maps/Route16_House/map.json b/data/maps/Route16_House/map.json index ec7b219d3..3421f6eba 100644 --- a/data/maps/Route16_House/map.json +++ b/data/maps/Route16_House/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_House_EventScript_17014F", + "script": "Route16_House_EventScript_Woman", "flag": "0" }, { @@ -38,7 +38,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_House_EventScript_1701AF", + "script": "Route16_House_EventScript_Fearow", "flag": "0" } ], diff --git a/data/maps/Route16_House/scripts.inc b/data/maps/Route16_House/scripts.inc index 94ed9b932..baf6fcc32 100644 --- a/data/maps/Route16_House/scripts.inc +++ b/data/maps/Route16_House/scripts.inc @@ -1,36 +1,36 @@ Route16_House_MapScripts:: @ 817014E .byte 0 -Route16_House_EventScript_17014F:: @ 817014F +Route16_House_EventScript_Woman:: @ 817014F lock faceplayer - goto_if_set FLAG_GOT_HM02, EventScript_1701A5 - msgbox gUnknown_819F851 + goto_if_set FLAG_GOT_HM02, Route16_House_EventScript_AlreadyGotHM02 + msgbox Route16_House_Text_FoundMySecretRetreat checkitemspace ITEM_HM02, 1 compare VAR_RESULT, FALSE - goto_if_eq EventScript_17019B - giveitem_msg gUnknown_819F8C0, ITEM_HM02 - msgbox gUnknown_819F8E0 + goto_if_eq Route16_House_EventScript_NoRoomForHM02 + giveitem_msg Route16_House_Text_ReceivedHM02FromGirl, ITEM_HM02 + msgbox Route16_House_Text_ExplainHM02 setflag FLAG_GOT_HM02 release end -EventScript_17019B:: @ 817019B - msgbox gUnknown_819F92D +Route16_House_EventScript_NoRoomForHM02:: @ 817019B + msgbox Route16_House_Text_DontHaveAnyRoomForThis release end -EventScript_1701A5:: @ 81701A5 - msgbox gUnknown_819F8E0 +Route16_House_EventScript_AlreadyGotHM02:: @ 81701A5 + msgbox Route16_House_Text_ExplainHM02 release end -Route16_House_EventScript_1701AF:: @ 81701AF +Route16_House_EventScript_Fearow:: @ 81701AF lock faceplayer waitse playmoncry SPECIES_FEAROW, 0 - msgbox gUnknown_819F94F + msgbox Route16_House_Text_Fearow waitmoncry release end diff --git a/data/maps/Route16_House/text.inc b/data/maps/Route16_House/text.inc index 136cf9604..2cdfe38d9 100644 --- a/data/maps/Route16_House/text.inc +++ b/data/maps/Route16_House/text.inc @@ -1,21 +1,21 @@ -gUnknown_819F851:: @ 819F851 +Route16_House_Text_FoundMySecretRetreat:: @ 819F851 .string "Oh, dear.\n" .string "You've found my secret retreat.\p" .string "Please don't tell anyone I'm here.\n" .string "I'll make it up to you with this!$" -gUnknown_819F8C0:: @ 819F8C0 +Route16_House_Text_ReceivedHM02FromGirl:: @ 819F8C0 .string "{PLAYER} received HM02\n" .string "from the girl.$" -gUnknown_819F8E0:: @ 819F8E0 +Route16_House_Text_ExplainHM02:: @ 819F8E0 .string "HM02 is FLY.\n" .string "It's a wonderfully convenient move.\p" .string "Please, put it to good use.$" -gUnknown_819F92D:: @ 819F92D +Route16_House_Text_DontHaveAnyRoomForThis:: @ 819F92D .string "You don't have any room for this.$" -gUnknown_819F94F:: @ 819F94F +Route16_House_Text_Fearow:: @ 819F94F .string "FEAROW: Kyueen!$" diff --git a/data/maps/Route16_NorthEntrance_1F/map.json b/data/maps/Route16_NorthEntrance_1F/map.json index 133fd5b09..515800a2c 100644 --- a/data/maps/Route16_NorthEntrance_1F/map.json +++ b/data/maps/Route16_NorthEntrance_1F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1701DB", + "script": "Route16_NorthEntrance_1F_EventScript_Guard", "flag": "0" }, { @@ -38,7 +38,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1702B5", + "script": "Route16_NorthEntrance_1F_EventScript_OldMan", "flag": "0" } ], @@ -87,7 +87,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route16_NorthEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -96,7 +96,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" }, { "type": "trigger", @@ -105,7 +105,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1701E4" + "script": "Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerTop" }, { "type": "trigger", @@ -114,7 +114,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1701F0" + "script": "Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMidTop" }, { "type": "trigger", @@ -123,7 +123,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" }, { "type": "trigger", @@ -132,7 +132,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" }, { "type": "trigger", @@ -141,7 +141,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route16_NorthEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -150,7 +150,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route16_NorthEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -159,7 +159,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_1701FC" + "script": "Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMid" }, { "type": "trigger", @@ -168,7 +168,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_170208" + "script": "Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMidBottom" }, { "type": "trigger", @@ -177,7 +177,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route16_NorthEntrance_1F_EventScript_170214" + "script": "Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerBottom" } ], "bg_events": [] diff --git a/data/maps/Route16_NorthEntrance_1F/scripts.inc b/data/maps/Route16_NorthEntrance_1F/scripts.inc index a99a1ec18..d00ba5805 100644 --- a/data/maps/Route16_NorthEntrance_1F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_1F/scripts.inc @@ -4,115 +4,115 @@ Route16_NorthEntrance_1F_MapScripts:: @ 81701C2 Route16_NorthEntrance_1F_OnTransition:: @ 81701C8 clearflag FLAG_SYS_ON_CYCLING_ROAD - call_if_set FLAG_GOT_BICYCLE, EventScript_1701D5 + call_if_set FLAG_GOT_BICYCLE, Route16_NorthEntrance_1F_EventScript_DisableNeedBikeTrigger end -EventScript_1701D5:: @ 81701D5 +Route16_NorthEntrance_1F_EventScript_DisableNeedBikeTrigger:: @ 81701D5 setvar VAR_TEMP_1, 1 return -Route16_NorthEntrance_1F_EventScript_1701DB:: @ 81701DB - msgbox gUnknown_819F98B, MSGBOX_NPC +Route16_NorthEntrance_1F_EventScript_Guard:: @ 81701DB + msgbox Route16_NorthEntrance_1F_Text_CyclingRoadIsDownhillCourse, MSGBOX_NPC end -Route16_NorthEntrance_1F_EventScript_1701E4:: @ 81701E4 +Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerTop:: @ 81701E4 lockall setvar VAR_0x8008, 0 - goto EventScript_170220 + goto Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger end -Route16_NorthEntrance_1F_EventScript_1701F0:: @ 81701F0 +Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMidTop:: @ 81701F0 lockall setvar VAR_0x8008, 1 - goto EventScript_170220 + goto Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger end -Route16_NorthEntrance_1F_EventScript_1701FC:: @ 81701FC +Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMid:: @ 81701FC lockall setvar VAR_0x8008, 2 - goto EventScript_170220 + goto Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger end -Route16_NorthEntrance_1F_EventScript_170208:: @ 8170208 +Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerMidBottom:: @ 8170208 lockall setvar VAR_0x8008, 3 - goto EventScript_170220 + goto Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger end -Route16_NorthEntrance_1F_EventScript_170214:: @ 8170214 +Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerBottom:: @ 8170214 lockall setvar VAR_0x8008, 4 - goto EventScript_170220 + goto Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger end -EventScript_170220:: @ 8170220 +Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger:: @ 8170220 textcolor 0 - msgbox gUnknown_819F9CC + msgbox Route16_NorthEntrance_1F_Text_ExcuseMeWaitUp closemessage applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 delay 20 compare VAR_0x8008, 1 - call_if_eq EventScript_170279 + call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidTop compare VAR_0x8008, 2 - call_if_eq EventScript_170284 + call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMid compare VAR_0x8008, 3 - call_if_eq EventScript_17028F + call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidBottom compare VAR_0x8008, 4 - call_if_eq EventScript_17029A - msgbox gUnknown_819F95F + call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterBottom + msgbox Route16_NorthEntrance_1F_Text_NoPedestriansOnCyclingRoad closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_1702B3 + applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkRight waitmovement 0 releaseall end -EventScript_170279:: @ 8170279 - applymovement OBJ_EVENT_ID_PLAYER, Movement_1702A5 +Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidTop:: @ 8170279 + applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkUp waitmovement 0 return -EventScript_170284:: @ 8170284 - applymovement OBJ_EVENT_ID_PLAYER, Movement_1702A7 +Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMid:: @ 8170284 + applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkUp2 waitmovement 0 return -EventScript_17028F:: @ 817028F - applymovement OBJ_EVENT_ID_PLAYER, Movement_1702AA +Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidBottom:: @ 817028F + applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkUp3 waitmovement 0 return -EventScript_17029A:: @ 817029A - applymovement OBJ_EVENT_ID_PLAYER, Movement_1702AE +Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterBottom:: @ 817029A + applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkUp4 waitmovement 0 return -Movement_1702A5:: @ 81702A5 +Route16_NorthEntrance_1F_Movement_WalkUp:: @ 81702A5 walk_up step_end -Movement_1702A7:: @ 81702A7 +Route16_NorthEntrance_1F_Movement_WalkUp2:: @ 81702A7 walk_up walk_up step_end -Movement_1702AA:: @ 81702AA +Route16_NorthEntrance_1F_Movement_WalkUp3:: @ 81702AA walk_up walk_up walk_up step_end -Movement_1702AE:: @ 81702AE +Route16_NorthEntrance_1F_Movement_WalkUp4:: @ 81702AE walk_up walk_up walk_up walk_up step_end -Movement_1702B3:: @ 81702B3 +Route16_NorthEntrance_1F_Movement_WalkRight:: @ 81702B3 walk_right step_end -Route16_NorthEntrance_1F_EventScript_1702B5:: @ 81702B5 - msgbox gUnknown_819F9E8, MSGBOX_NPC +Route16_NorthEntrance_1F_EventScript_OldMan:: @ 81702B5 + msgbox Route16_NorthEntrance_1F_Text_HowdYouGetInGoodEffort, MSGBOX_NPC end diff --git a/data/maps/Route16_NorthEntrance_1F/text.inc b/data/maps/Route16_NorthEntrance_1F/text.inc index 8cc60117c..156e93bfa 100644 --- a/data/maps/Route16_NorthEntrance_1F/text.inc +++ b/data/maps/Route16_NorthEntrance_1F/text.inc @@ -1,16 +1,16 @@ -gUnknown_819F95F:: @ 819F95F +Route16_NorthEntrance_1F_Text_NoPedestriansOnCyclingRoad:: @ 819F95F .string "No pedestrians are allowed on\n" .string "CYCLING ROAD!$" -gUnknown_819F98B:: @ 819F98B +Route16_NorthEntrance_1F_Text_CyclingRoadIsDownhillCourse:: @ 819F98B .string "CYCLING ROAD is a downhill course\n" .string "by the sea. It's a great ride.$" -gUnknown_819F9CC:: @ 819F9CC +Route16_NorthEntrance_1F_Text_ExcuseMeWaitUp:: @ 819F9CC .string "Excuse me!\n" .string "Wait up, please!$" -gUnknown_819F9E8:: @ 819F9E8 +Route16_NorthEntrance_1F_Text_HowdYouGetInGoodEffort:: @ 819F9E8 .string "How'd you get in?\n" .string "Good effort!$" diff --git a/data/maps/Route16_NorthEntrance_2F/map.json b/data/maps/Route16_NorthEntrance_2F/map.json index 03d205867..103929172 100644 --- a/data/maps/Route16_NorthEntrance_2F/map.json +++ b/data/maps/Route16_NorthEntrance_2F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_NorthEntrance_2F_EventScript_1702BF", + "script": "Route16_NorthEntrance_2F_EventScript_LittleBoy", "flag": "0" }, { @@ -38,7 +38,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_NorthEntrance_2F_EventScript_1702C8", + "script": "Route16_NorthEntrance_2F_EventScript_LittleGirl", "flag": "0" }, { @@ -51,7 +51,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route16_NorthEntrance_2F_EventScript_1702E3", + "script": "Route16_NorthEntrance_2F_EventScript_Aide", "flag": "0" } ], @@ -71,14 +71,14 @@ "x": 4, "y": 1, "elevation": 0, - "script": "Route16_NorthEntrance_2F_EventScript_1702D1" + "script": "Route16_NorthEntrance_2F_EventScript_LeftBinoculars" }, { "type": "bg_event_type_0", "x": 8, "y": 1, "elevation": 0, - "script": "Route16_NorthEntrance_2F_EventScript_1702DA" + "script": "Route16_NorthEntrance_2F_EventScript_RightBinoculars" } ] } diff --git a/data/maps/Route16_NorthEntrance_2F/scripts.inc b/data/maps/Route16_NorthEntrance_2F/scripts.inc index 7ccba34c8..0843978f2 100644 --- a/data/maps/Route16_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_2F/scripts.inc @@ -1,52 +1,54 @@ +.equ REQUIRED_CAUGHT_MONS, 40 + Route16_NorthEntrance_2F_MapScripts:: @ 81702BE .byte 0 -Route16_NorthEntrance_2F_EventScript_1702BF:: @ 81702BF - msgbox gUnknown_819FA07, MSGBOX_NPC +Route16_NorthEntrance_2F_EventScript_LittleBoy:: @ 81702BF + msgbox Route16_NorthEntrance_2F_Text_OnBikeRideWithGirlfriend, MSGBOX_NPC end -Route16_NorthEntrance_2F_EventScript_1702C8:: @ 81702C8 - msgbox gUnknown_819FA41, MSGBOX_NPC +Route16_NorthEntrance_2F_EventScript_LittleGirl:: @ 81702C8 + msgbox Route16_NorthEntrance_2F_Text_RidingTogetherOnNewBikes, MSGBOX_NPC end -Route16_NorthEntrance_2F_EventScript_1702D1:: @ 81702D1 - msgbox gUnknown_819FA6F, MSGBOX_SIGN +Route16_NorthEntrance_2F_EventScript_LeftBinoculars:: @ 81702D1 + msgbox Route16_NorthEntrance_2F_Text_ItsCeladonDeptStore, MSGBOX_SIGN end -Route16_NorthEntrance_2F_EventScript_1702DA:: @ 81702DA - msgbox gUnknown_819FAB9, MSGBOX_SIGN +Route16_NorthEntrance_2F_EventScript_RightBinoculars:: @ 81702DA + msgbox Route16_NorthEntrance_2F_Text_LongPathOverWater, MSGBOX_SIGN end -Route16_NorthEntrance_2F_EventScript_1702E3:: @ 81702E3 +Route16_NorthEntrance_2F_EventScript_Aide:: @ 81702E3 lock faceplayer - call EventScript_17036F - goto_if_set FLAG_GOT_AMULET_COIN_FROM_OAKS_AIDE, EventScript_170365 - msgbox gUnknown_819FB0E, MSGBOX_YESNO + call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo + goto_if_set FLAG_GOT_AMULET_COIN_FROM_OAKS_AIDE, Route16_NorthEntrance_2F_EventScript_AlreadyGotAmuletCoin + msgbox Route16_NorthEntrance_2F_Text_GiveAmuletCoinIfCaught40, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, Special_GetPokedexCount getnumberstring 2, VAR_0x8006 - call EventScript_17036F - compare VAR_0x8006, 40 + call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo + compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough - msgbox gUnknown_819FC15 + msgbox Route16_NorthEntrance_2F_Text_GreatHereYouGo checkitemspace ITEM_AMULET_COIN, 1 compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem - giveitem_msg gUnknown_819FC68, ITEM_AMULET_COIN + giveitem_msg Route16_NorthEntrance_2F_Text_ReceivedAmuletCoinFromAide, ITEM_AMULET_COIN setflag FLAG_GOT_AMULET_COIN_FROM_OAKS_AIDE - msgbox gUnknown_819FC93 + msgbox Route16_NorthEntrance_2F_Text_ExplainAmuletCoin release end -EventScript_170365:: @ 8170365 - msgbox gUnknown_819FC93 +Route16_NorthEntrance_2F_EventScript_AlreadyGotAmuletCoin:: @ 8170365 + msgbox Route16_NorthEntrance_2F_Text_ExplainAmuletCoin release end -EventScript_17036F:: @ 817036F - getnumberstring 0, 40 +Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo:: @ 817036F + getnumberstring 0, REQUIRED_CAUGHT_MONS getitemname 1, ITEM_AMULET_COIN return diff --git a/data/maps/Route16_NorthEntrance_2F/text.inc b/data/maps/Route16_NorthEntrance_2F/text.inc index 4839bfe8a..37c518fb4 100644 --- a/data/maps/Route16_NorthEntrance_2F/text.inc +++ b/data/maps/Route16_NorthEntrance_2F/text.inc @@ -1,23 +1,23 @@ -gUnknown_819FA07:: @ 819FA07 +Route16_NorthEntrance_2F_Text_OnBikeRideWithGirlfriend:: @ 819FA07 .string "I'm on a relaxing ride on my new\n" .string "bike with my girlfriend.$" -gUnknown_819FA41:: @ 819FA41 +Route16_NorthEntrance_2F_Text_RidingTogetherOnNewBikes:: @ 819FA41 .string "We're going riding together on our\n" .string "new bikes.$" -gUnknown_819FA6F:: @ 819FA6F +Route16_NorthEntrance_2F_Text_ItsCeladonDeptStore:: @ 819FA6F .string "Let's see what the binoculars have\n" .string "to show…\p" .string "It's the CELADON DEPT. STORE!$" -gUnknown_819FAB9:: @ 819FAB9 +Route16_NorthEntrance_2F_Text_LongPathOverWater:: @ 819FAB9 .string "Let's see what the binoculars have\n" .string "to show…\p" .string "There's a long path over water far\n" .string "away.$" -gUnknown_819FB0E:: @ 819FB0E +Route16_NorthEntrance_2F_Text_GiveAmuletCoinIfCaught40:: @ 819FB0E .string "Hi! Remember me?\n" .string "I'm one of PROF. OAK's AIDES.\p" .string "If your POKéDEX has complete data\n" @@ -29,17 +29,17 @@ gUnknown_819FB0E:: @ 819FB0E .string "Have you gathered data on at least\n" .string "40 kinds of POKéMON?$" -gUnknown_819FC15:: @ 819FC15 +Route16_NorthEntrance_2F_Text_GreatHereYouGo:: @ 819FC15 .string "Great! You have caught or owned\n" .string "{STR_VAR_3} kinds of POKéMON!\p" .string "Congratulations!\n" .string "Here you go!$" -gUnknown_819FC68:: @ 819FC68 +Route16_NorthEntrance_2F_Text_ReceivedAmuletCoinFromAide:: @ 819FC68 .string "{PLAYER} received the AMULET COIN\n" .string "from the AIDE.$" -gUnknown_819FC93:: @ 819FC93 +Route16_NorthEntrance_2F_Text_ExplainAmuletCoin:: @ 819FC93 .string "An AMULET COIN is an item to be\n" .string "held by a POKéMON.\p" .string "If the POKéMON appears in a winning\n" diff --git a/data/maps/Route17/map.json b/data/maps/Route17/map.json index fd640db01..43ec14e88 100644 --- a/data/maps/Route17/map.json +++ b/data/maps/Route17/map.json @@ -36,7 +36,7 @@ "movement_range_y": 6, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB319", + "script": "Route17_EventScript_Virgil", "flag": "0" }, { @@ -49,7 +49,7 @@ "movement_range_y": 5, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB221", + "script": "Route17_EventScript_Isaiah", "flag": "0" }, { @@ -62,7 +62,7 @@ "movement_range_y": 2, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB1E3", + "script": "Route17_EventScript_Raul", "flag": "0" }, { @@ -75,7 +75,7 @@ "movement_range_y": 5, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB129", + "script": "Route17_EventScript_Nikolas", "flag": "0" }, { @@ -88,7 +88,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 5, - "script": "Route17_EventScript_1AB0EB", + "script": "Route17_EventScript_Billy", "flag": "0" }, { @@ -101,7 +101,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 4, - "script": "Route17_EventScript_1AB29D", + "script": "Route17_EventScript_Jamal", "flag": "0" }, { @@ -114,7 +114,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 3, - "script": "Route17_EventScript_1AB25F", + "script": "Route17_EventScript_Zeek", "flag": "0" }, { @@ -127,7 +127,7 @@ "movement_range_y": 5, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB2DB", + "script": "Route17_EventScript_Corey", "flag": "0" }, { @@ -140,7 +140,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB1A5", + "script": "Route17_EventScript_William", "flag": "0" }, { @@ -153,7 +153,7 @@ "movement_range_y": 5, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route17_EventScript_1AB167", + "script": "Route17_EventScript_Jaxon", "flag": "0" } ], @@ -165,42 +165,42 @@ "x": 12, "y": 97, "elevation": 0, - "script": "Route17_EventScript_1681DB" + "script": "Route17_EventScript_RouteSign" }, { "type": "bg_event_type_0", "x": 12, "y": 83, "elevation": 0, - "script": "Route17_EventScript_1681D2" + "script": "Route17_EventScript_TrainerTips2" }, { "type": "bg_event_type_0", "x": 12, "y": 68, "elevation": 0, - "script": "Route17_EventScript_1681C9" + "script": "Route17_EventScript_TrainerTips1" }, { "type": "bg_event_type_0", "x": 12, "y": 53, "elevation": 0, - "script": "Route17_EventScript_1681C0" + "script": "Route17_EventScript_ItemsNotice" }, { "type": "bg_event_type_0", "x": 12, "y": 125, "elevation": 3, - "script": "Route17_EventScript_1681E4" + "script": "Route17_EventScript_BallsNotice" }, { "type": "bg_event_type_0", "x": 11, "y": 157, "elevation": 0, - "script": "Route17_EventScript_1681ED" + "script": "Route17_EventScript_CyclingRoadSign" }, { "type": "hidden_item", diff --git a/data/maps/Route17/scripts.inc b/data/maps/Route17/scripts.inc index 8633ab23e..787e68e04 100644 --- a/data/maps/Route17/scripts.inc +++ b/data/maps/Route17/scripts.inc @@ -1,26 +1,26 @@ Route17_MapScripts:: @ 81681BF .byte 0 -Route17_EventScript_1681C0:: @ 81681C0 - msgbox gUnknown_81874E4, MSGBOX_SIGN +Route17_EventScript_ItemsNotice:: @ 81681C0 + msgbox Route17_Text_WatchOutForDiscardedItems, MSGBOX_SIGN end -Route17_EventScript_1681C9:: @ 81681C9 - msgbox gUnknown_8187512, MSGBOX_SIGN +Route17_EventScript_TrainerTips1:: @ 81681C9 + msgbox Route17_Text_SameSpeciesGrowDifferentRates, MSGBOX_SIGN end -Route17_EventScript_1681D2:: @ 81681D2 - msgbox gUnknown_818757B, MSGBOX_SIGN +Route17_EventScript_TrainerTips2:: @ 81681D2 + msgbox Route17_Text_PressBToStayInPlace, MSGBOX_SIGN end -Route17_EventScript_1681DB:: @ 81681DB - msgbox gUnknown_81875BE, MSGBOX_SIGN +Route17_EventScript_RouteSign:: @ 81681DB + msgbox Route17_Text_RouteSign, MSGBOX_SIGN end -Route17_EventScript_1681E4:: @ 81681E4 - msgbox gUnknown_81875E3, MSGBOX_SIGN +Route17_EventScript_BallsNotice:: @ 81681E4 + msgbox Route17_Text_DontThrowGameThrowBalls, MSGBOX_SIGN end -Route17_EventScript_1681ED:: @ 81681ED - msgbox gUnknown_8187622, MSGBOX_SIGN +Route17_EventScript_CyclingRoadSign:: @ 81681ED + msgbox Route17_Text_CyclingRoadSign, MSGBOX_SIGN end diff --git a/data/maps/Route17/text.inc b/data/maps/Route17/text.inc index eff5f0726..21d7978a3 100644 --- a/data/maps/Route17/text.inc +++ b/data/maps/Route17/text.inc @@ -1,131 +1,131 @@ -Text_18717E:: @ 818717E +Route17_Text_RaulIntro:: @ 818717E .string "There's no getting rich quick in\n" .string "battling kids.$" -Text_1871AE:: @ 81871AE +Route17_Text_RaulDefeat:: @ 81871AE .string "Burned out!$" -Text_1871BA:: @ 81871BA +Route17_Text_RaulPostBattle:: @ 81871BA .string "You can find good stuff lying\n" .string "around on CYCLING ROAD.\p" .string "There's good money in picking them\n" .string "up and selling them.$" -Text_187228:: @ 8187228 +Route17_Text_IsaiahIntro:: @ 8187228 .string "I'm mighty proud of my bod, kiddo.\n" .string "Come on!$" -Text_187254:: @ 8187254 +Route17_Text_IsaiahDefeat:: @ 8187254 .string "Whoo!$" -Text_18725A:: @ 818725A +Route17_Text_IsaiahPostBattle:: @ 818725A .string "I could belly-bump you outta\n" .string "here!$" -Text_18727D:: @ 818727D +Route17_Text_VirgilIntro:: @ 818727D .string "You heading to FUCHSIA?$" -Text_187295:: @ 8187295 +Route17_Text_VirgilDefeat:: @ 8187295 .string "Crash and burn!$" -Text_1872A5:: @ 81872A5 +Route17_Text_VirgilPostBattle:: @ 81872A5 .string "I love racing downhill!$" -Text_1872BD:: @ 81872BD +Route17_Text_BillyIntro:: @ 81872BD .string "We're BIKERS!\n" .string "We rule the roads, man!$" -Text_1872E3:: @ 81872E3 +Route17_Text_BillyDefeat:: @ 81872E3 .string "Smoked!$" -Text_1872EB:: @ 81872EB +Route17_Text_BillyPostBattle:: @ 81872EB .string "Are you looking for adventure?$" -Text_18730A:: @ 818730A +Route17_Text_NikolasIntro:: @ 818730A .string "Let VOLTORB electrify you!$" -Text_187325:: @ 8187325 +Route17_Text_NikolasDefeat:: @ 8187325 .string "Grounded out!$" -Text_187333:: @ 8187333 +Route17_Text_NikolasPostBattle:: @ 8187333 .string "I got my VOLTORB at the abandoned\n" .string "POWER PLANT.$" -Text_187362:: @ 8187362 +Route17_Text_ZeekIntro:: @ 8187362 .string "I leveled up my POKéMON, but it\n" .string "won't evolve. Why?$" -Text_187395:: @ 8187395 +Route17_Text_ZeekDefeat:: @ 8187395 .string "Why, you!$" -Text_18739F:: @ 818739F +Route17_Text_ZeekPostBattle:: @ 818739F .string "Maybe some POKéMON need element\n" .string "STONES to evolve.$" -Text_1873D1:: @ 81873D1 +Route17_Text_JamalIntro:: @ 81873D1 .string "I need a little exercise!$" -Text_1873EB:: @ 81873EB +Route17_Text_JamalDefeat:: @ 81873EB .string "Whew!\n" .string "Good workout!$" -Text_1873FF:: @ 81873FF +Route17_Text_JamalPostBattle:: @ 81873FF .string "I'm sure I lost weight there!$" -Text_18741D:: @ 818741D +Route17_Text_CoreyIntro:: @ 818741D .string "Be a rebel!$" -Text_187429:: @ 8187429 +Route17_Text_CoreyDefeat:: @ 8187429 .string "Aaaargh!$" -Text_187432:: @ 8187432 +Route17_Text_CoreyPostBattle:: @ 8187432 .string "Be ready to fight for your beliefs!$" -Text_187456:: @ 8187456 +Route17_Text_JaxonIntro:: @ 8187456 .string "Nice BIKE!\n" .string "How's it handle?$" -Text_187472:: @ 8187472 +Route17_Text_JaxonDefeat:: @ 8187472 .string "Shoot!$" -Text_187479:: @ 8187479 +Route17_Text_JaxonPostBattle:: @ 8187479 .string "The slope makes it hard to steer.$" -Text_18749B:: @ 818749B +Route17_Text_WilliamIntro:: @ 818749B .string "Get lost, kid!\n" .string "I'm bushed!$" -Text_1874B6:: @ 81874B6 +Route17_Text_WilliamDefeat:: @ 81874B6 .string "Are you satisfied?$" -Text_1874C9:: @ 81874C9 +Route17_Text_WilliamPostBattle:: @ 81874C9 .string "I need to catch a few z's!$" -gUnknown_81874E4:: @ 81874E4 +Route17_Text_WatchOutForDiscardedItems:: @ 81874E4 .string "It's a notice.\p" .string "Watch out for discarded items.$" -gUnknown_8187512:: @ 8187512 +Route17_Text_SameSpeciesGrowDifferentRates:: @ 8187512 .string "TRAINER TIPS\p" .string "All POKéMON are unique.\p" .string "Even POKéMON of the same species\n" .string "and level grow at different rates.$" -gUnknown_818757B:: @ 818757B +Route17_Text_PressBToStayInPlace:: @ 818757B .string "TRAINER TIPS\p" .string "Press the B Button to stay in place\n" .string "while on a slope.$" -gUnknown_81875BE:: @ 81875BE +Route17_Text_RouteSign:: @ 81875BE .string "ROUTE 17\n" .string "CELADON CITY - FUCHSIA CITY$" -gUnknown_81875E3:: @ 81875E3 +Route17_Text_DontThrowGameThrowBalls:: @ 81875E3 .string "It's a notice!\p" .string "Don't throw the game, throw POKé\n" .string "BALLS instead!$" -gUnknown_8187622:: @ 8187622 +Route17_Text_CyclingRoadSign:: @ 8187622 .string "CYCLING ROAD\n" .string "Slope ends here!$" diff --git a/data/maps/Route18/map.json b/data/maps/Route18/map.json index 86eb04352..6976a7570 100644 --- a/data/maps/Route18/map.json +++ b/data/maps/Route18/map.json @@ -36,7 +36,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 4, - "script": "Route18_EventScript_1AB3D3", + "script": "Route18_EventScript_Jacob", "flag": "0" }, { @@ -49,7 +49,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route18_EventScript_1AB395", + "script": "Route18_EventScript_Ramiro", "flag": "0" }, { @@ -62,7 +62,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 6, - "script": "Route18_EventScript_1AB357", + "script": "Route18_EventScript_Wilton", "flag": "0" } ], @@ -89,14 +89,14 @@ "x": 37, "y": 7, "elevation": 0, - "script": "Route18_EventScript_168228" + "script": "Route18_EventScript_CyclingRoadSign" }, { "type": "bg_event_type_0", "x": 52, "y": 7, "elevation": 0, - "script": "Route18_EventScript_16821F" + "script": "Route18_EventScript_RouteSign" } ] } diff --git a/data/maps/Route18/scripts.inc b/data/maps/Route18/scripts.inc index 25fda03c2..43d2b029e 100644 --- a/data/maps/Route18/scripts.inc +++ b/data/maps/Route18/scripts.inc @@ -5,25 +5,25 @@ Route18_MapScripts:: @ 81681F6 Route18_OnTransition:: @ 8168201 compare VAR_MAP_SCENE_ROUTE16, 1 - call_if_eq EventScript_16820D + call_if_eq Route18_OnTransitionCyclingRoad end -EventScript_16820D:: @ 816820D +Route18_OnTransitionCyclingRoad:: @ 816820D setflag FLAG_SYS_ON_CYCLING_ROAD return Route18_OnWarp:: @ 8168211 - map_script_2 VAR_MAP_SCENE_ROUTE16, 1, EventScript_16821B + map_script_2 VAR_MAP_SCENE_ROUTE16, 1, Route18_OnWarpCyclingRoad .2byte 0 -EventScript_16821B:: @ 816821B +Route18_OnWarpCyclingRoad:: @ 816821B special Special_ForcePlayerOntoBike end -Route18_EventScript_16821F:: @ 816821F - msgbox gUnknown_8187757, MSGBOX_SIGN +Route18_EventScript_RouteSign:: @ 816821F + msgbox Route18_Text_RouteSign, MSGBOX_SIGN end -Route18_EventScript_168228:: @ 8168228 - msgbox gUnknown_818777C, MSGBOX_SIGN +Route18_EventScript_CyclingRoadSign:: @ 8168228 + msgbox Route18_Text_CyclingRoadSign, MSGBOX_SIGN end diff --git a/data/maps/Route18/text.inc b/data/maps/Route18/text.inc index c22a6360a..107804cfb 100644 --- a/data/maps/Route18/text.inc +++ b/data/maps/Route18/text.inc @@ -1,40 +1,40 @@ -Text_187640:: @ 8187640 +Route18_Text_WiltonIntro:: @ 8187640 .string "I always check every grassy area\n" .string "for new POKéMON.$" -Text_187672:: @ 8187672 +Route18_Text_WiltonDefeat:: @ 8187672 .string "Tch!$" -Text_187677:: @ 8187677 +Route18_Text_WiltonPostBattle:: @ 8187677 .string "I wish I had a BIKE!$" -Text_18768C:: @ 818768C +Route18_Text_RamiroIntro:: @ 818768C .string "Kurukkoo!\n" .string "How do you like my birdcall?$" -Text_1876B3:: @ 81876B3 +Route18_Text_RamiroDefeat:: @ 81876B3 .string "I had to bug you!$" -Text_1876C5:: @ 81876C5 +Route18_Text_RamiroPostBattle:: @ 81876C5 .string "I collect sea POKéMON on weekends\n" .string "because the sea is so close.$" -Text_187704:: @ 8187704 +Route18_Text_JacobIntro:: @ 8187704 .string "This is my turf!\n" .string "Get out of here!$" -Text_187726:: @ 8187726 +Route18_Text_JacobDefeat:: @ 8187726 .string "Darn!$" -Text_18772C:: @ 818772C +Route18_Text_JacobPostBattle:: @ 818772C .string "This is my fave area for catching\n" .string "POKéMON.$" -gUnknown_8187757:: @ 8187757 +Route18_Text_RouteSign:: @ 8187757 .string "ROUTE 18\n" .string "CELADON CITY - FUCHSIA CITY$" -gUnknown_818777C:: @ 818777C +Route18_Text_CyclingRoadSign:: @ 818777C .string "CYCLING ROAD\n" .string "No pedestrians permitted!$" diff --git a/data/maps/Route18_EastEntrance_1F/map.json b/data/maps/Route18_EastEntrance_1F/map.json index 9b1250ac4..c7c04b124 100644 --- a/data/maps/Route18_EastEntrance_1F/map.json +++ b/data/maps/Route18_EastEntrance_1F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route18_EastEntrance_1F_EventScript_170391", + "script": "Route18_EastEntrance_1F_EventScript_Guard", "flag": "0" } ], @@ -60,7 +60,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" }, { "type": "trigger", @@ -69,7 +69,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_17039A" + "script": "Route18_EastEntrance_1F_EventScript_NeedBikeTriggerTop" }, { "type": "trigger", @@ -78,7 +78,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1703A6" + "script": "Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMidTop" }, { "type": "trigger", @@ -87,7 +87,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1703B2" + "script": "Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMid" }, { "type": "trigger", @@ -96,7 +96,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1703BE" + "script": "Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMidBottom" }, { "type": "trigger", @@ -105,7 +105,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1703CA" + "script": "Route18_EastEntrance_1F_EventScript_NeedBikeTriggerBottom" }, { "type": "trigger", @@ -114,7 +114,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route18_EastEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -123,7 +123,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route18_EastEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -132,7 +132,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 1, - "script": "Route18_EastEntrance_1F_EventScript_1A77B6" + "script": "EventScript_SetExitingCyclingRoad" }, { "type": "trigger", @@ -141,7 +141,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" }, { "type": "trigger", @@ -150,7 +150,7 @@ "elevation": 3, "var": "VAR_MAP_SCENE_ROUTE16", "var_value": 0, - "script": "Route18_EastEntrance_1F_EventScript_1A77C1" + "script": "EventScript_SetEnteringCyclingRoad" } ], "bg_events": [] diff --git a/data/maps/Route18_EastEntrance_1F/scripts.inc b/data/maps/Route18_EastEntrance_1F/scripts.inc index e49eb285f..0a6b3b56f 100644 --- a/data/maps/Route18_EastEntrance_1F/scripts.inc +++ b/data/maps/Route18_EastEntrance_1F/scripts.inc @@ -4,111 +4,111 @@ Route18_EastEntrance_1F_MapScripts:: @ 8170378 Route18_EastEntrance_1F_OnTransition:: @ 817037E clearflag FLAG_SYS_ON_CYCLING_ROAD - call_if_set FLAG_GOT_BICYCLE, EventScript_17038B + call_if_set FLAG_GOT_BICYCLE, Route18_EastEntrance_1F_EventScript_DisableNeedBikeTrigger end -EventScript_17038B:: @ 817038B +Route18_EastEntrance_1F_EventScript_DisableNeedBikeTrigger:: @ 817038B setvar VAR_TEMP_1, 1 return -Route18_EastEntrance_1F_EventScript_170391:: @ 8170391 - msgbox gUnknown_819FD3A, MSGBOX_NPC +Route18_EastEntrance_1F_EventScript_Guard:: @ 8170391 + msgbox Route18_EastEntrance_1F_Text_CyclingRoadAllUphillFromHere, MSGBOX_NPC end -Route18_EastEntrance_1F_EventScript_17039A:: @ 817039A +Route18_EastEntrance_1F_EventScript_NeedBikeTriggerTop:: @ 817039A lockall setvar VAR_0x8008, 0 - goto EventScript_1703D6 + goto Route18_EastEntrance_1F_EventScript_NeedBikeTrigger end -Route18_EastEntrance_1F_EventScript_1703A6:: @ 81703A6 +Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMidTop:: @ 81703A6 lockall setvar VAR_0x8008, 1 - goto EventScript_1703D6 + goto Route18_EastEntrance_1F_EventScript_NeedBikeTrigger end -Route18_EastEntrance_1F_EventScript_1703B2:: @ 81703B2 +Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMid:: @ 81703B2 lockall setvar VAR_0x8008, 2 - goto EventScript_1703D6 + goto Route18_EastEntrance_1F_EventScript_NeedBikeTrigger end -Route18_EastEntrance_1F_EventScript_1703BE:: @ 81703BE +Route18_EastEntrance_1F_EventScript_NeedBikeTriggerMidBottom:: @ 81703BE lockall setvar VAR_0x8008, 3 - goto EventScript_1703D6 + goto Route18_EastEntrance_1F_EventScript_NeedBikeTrigger end -Route18_EastEntrance_1F_EventScript_1703CA:: @ 81703CA +Route18_EastEntrance_1F_EventScript_NeedBikeTriggerBottom:: @ 81703CA lockall setvar VAR_0x8008, 4 - goto EventScript_1703D6 + goto Route18_EastEntrance_1F_EventScript_NeedBikeTrigger end -EventScript_1703D6:: @ 81703D6 +Route18_EastEntrance_1F_EventScript_NeedBikeTrigger:: @ 81703D6 textcolor 0 - msgbox gUnknown_819FD60 + msgbox Route18_EastEntrance_1F_Text_ExcuseMe closemessage applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 delay 20 compare VAR_0x8008, 1 - call_if_eq EventScript_17042F + call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidTop compare VAR_0x8008, 2 - call_if_eq EventScript_17043A + call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMid compare VAR_0x8008, 3 - call_if_eq EventScript_170445 + call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidBottom compare VAR_0x8008, 4 - call_if_eq EventScript_170450 - msgbox gUnknown_819FD0C + call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterBottom + msgbox Route18_EastEntrance_1F_Text_NeedBicycleForCyclingRoad closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_170469 + applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkRight waitmovement 0 releaseall end -EventScript_17042F:: @ 817042F - applymovement OBJ_EVENT_ID_PLAYER, Movement_17045B +Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidTop:: @ 817042F + applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkUp waitmovement 0 return -EventScript_17043A:: @ 817043A - applymovement OBJ_EVENT_ID_PLAYER, Movement_17045D +Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMid:: @ 817043A + applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkUp2 waitmovement 0 return -EventScript_170445:: @ 8170445 - applymovement OBJ_EVENT_ID_PLAYER, Movement_170460 +Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidBottom:: @ 8170445 + applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkUp3 waitmovement 0 return -EventScript_170450:: @ 8170450 - applymovement OBJ_EVENT_ID_PLAYER, Movement_170464 +Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterBottom:: @ 8170450 + applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkUp4 waitmovement 0 return -Movement_17045B:: @ 817045B +Route18_EastEntrance_1F_Movement_WalkUp:: @ 817045B walk_up step_end -Movement_17045D:: @ 817045D +Route18_EastEntrance_1F_Movement_WalkUp2:: @ 817045D walk_up walk_up step_end -Movement_170460:: @ 8170460 +Route18_EastEntrance_1F_Movement_WalkUp3:: @ 8170460 walk_up walk_up walk_up step_end -Movement_170464:: @ 8170464 +Route18_EastEntrance_1F_Movement_WalkUp4:: @ 8170464 walk_up walk_up walk_up walk_up step_end -Movement_170469:: @ 8170469 +Route18_EastEntrance_1F_Movement_WalkRight:: @ 8170469 walk_right step_end diff --git a/data/maps/Route18_EastEntrance_1F/text.inc b/data/maps/Route18_EastEntrance_1F/text.inc index 5de293cba..9551d993f 100644 --- a/data/maps/Route18_EastEntrance_1F/text.inc +++ b/data/maps/Route18_EastEntrance_1F/text.inc @@ -1,11 +1,11 @@ -gUnknown_819FD0C:: @ 819FD0C +Route18_EastEntrance_1F_Text_NeedBicycleForCyclingRoad:: @ 819FD0C .string "You need a BICYCLE to go out on\n" .string "CYCLING ROAD!$" -gUnknown_819FD3A:: @ 819FD3A +Route18_EastEntrance_1F_Text_CyclingRoadAllUphillFromHere:: @ 819FD3A .string "CYCLING ROAD is all uphill from\n" .string "here.$" -gUnknown_819FD60:: @ 819FD60 +Route18_EastEntrance_1F_Text_ExcuseMe:: @ 819FD60 .string "Excuse me!$" diff --git a/data/maps/Route18_EastEntrance_2F/map.json b/data/maps/Route18_EastEntrance_2F/map.json index b542ae540..c5c7b0853 100644 --- a/data/maps/Route18_EastEntrance_2F/map.json +++ b/data/maps/Route18_EastEntrance_2F/map.json @@ -25,7 +25,7 @@ "movement_range_y": 1, "trainer_type": 0, "trainer_sight_or_berry_tree_id": 0, - "script": "Route18_EastEntrance_2F_EventScript_17047E", + "script": "Route18_EastEntrance_2F_EventScript_Haden", "flag": "0" } ], @@ -45,14 +45,14 @@ "x": 4, "y": 1, "elevation": 0, - "script": "Route18_EastEntrance_2F_EventScript_17046C" + "script": "Route18_EastEntrance_2F_EventScript_LeftBinoculars" }, { "type": "bg_event_type_0", "x": 8, "y": 1, "elevation": 0, - "script": "Route18_EastEntrance_2F_EventScript_170475" + "script": "Route18_EastEntrance_2F_EventScript_RightBinoculars" } ] } diff --git a/data/maps/Route18_EastEntrance_2F/scripts.inc b/data/maps/Route18_EastEntrance_2F/scripts.inc index ed29859ab..910f238e4 100644 --- a/data/maps/Route18_EastEntrance_2F/scripts.inc +++ b/data/maps/Route18_EastEntrance_2F/scripts.inc @@ -1,47 +1,47 @@ Route18_EastEntrance_2F_MapScripts:: @ 817046B .byte 0 -Route18_EastEntrance_2F_EventScript_17046C:: @ 817046C - msgbox gUnknown_819FD6B, MSGBOX_SIGN +Route18_EastEntrance_2F_EventScript_LeftBinoculars:: @ 817046C + msgbox Route18_EastEntrance_2F_Text_PalletTownInWest, MSGBOX_SIGN end -Route18_EastEntrance_2F_EventScript_170475:: @ 8170475 - msgbox gUnknown_819FDB3, MSGBOX_SIGN +Route18_EastEntrance_2F_EventScript_RightBinoculars:: @ 8170475 + msgbox Route18_EastEntrance_2F_Text_PeopleSwimming, MSGBOX_SIGN end -Route18_EastEntrance_2F_EventScript_17047E:: @ 817047E +Route18_EastEntrance_2F_EventScript_Haden:: @ 817047E lock faceplayer setvar VAR_0x8008, INGAME_TRADE_LICKITUNG call EventScript_GetInGameTradeSpeciesInfo - goto_if_set FLAG_DID_MARC_TRADE, EventScript_1704F0 + goto_if_set FLAG_DID_MARC_TRADE, Route18_EastEntrance_2F_EventScript_AlreadyTraded msgbox Trade_Text_LookingForMonWannaTradeForMon, MSGBOX_YESNO compare VAR_RESULT, NO - goto_if_eq EventScript_1704D8 + goto_if_eq Route18_EastEntrance_2F_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade compare VAR_0x8004, PARTY_SIZE - goto_if_ge EventScript_1704D8 + goto_if_ge Route18_EastEntrance_2F_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies compare VAR_RESULT, VAR_0x8009 - goto_if_ne EventScript_1704E2 + goto_if_ne Route18_EastEntrance_2F_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_HeyThanks setflag FLAG_DID_MARC_TRADE release end -EventScript_1704D8:: @ 81704D8 +Route18_EastEntrance_2F_EventScript_DeclineTrade:: @ 81704D8 msgbox Trade_Text_AwwOhWell release end -EventScript_1704E2:: @ 81704E2 +Route18_EastEntrance_2F_EventScript_NotRequestedMon:: @ 81704E2 getspeciesname 0, VAR_0x8009 msgbox Trade_Text_WhatThatsNoMon release end -EventScript_1704F0:: @ 81704F0 +Route18_EastEntrance_2F_EventScript_AlreadyTraded:: @ 81704F0 msgbox Trade_Text_IsntMyOldMonGreat release end diff --git a/data/maps/Route18_EastEntrance_2F/text.inc b/data/maps/Route18_EastEntrance_2F/text.inc index 8a479371c..aac533f71 100644 --- a/data/maps/Route18_EastEntrance_2F/text.inc +++ b/data/maps/Route18_EastEntrance_2F/text.inc @@ -1,9 +1,9 @@ -gUnknown_819FD6B:: @ 819FD6B +Route18_EastEntrance_2F_Text_PalletTownInWest:: @ 819FD6B .string "Let's see what the binoculars have\n" .string "to show…\p" .string "PALLET TOWN is in the west.$" -gUnknown_819FDB3:: @ 819FDB3 +Route18_EastEntrance_2F_Text_PeopleSwimming:: @ 819FDB3 .string "Let's see what the binoculars have\n" .string "to show…\p" .string "There are people swimming.$" diff --git a/data/maps/Route19/map.json b/data/maps/Route19/map.json index b25ce0fec..d8f35ad21 100644 --- a/data/maps/Route19/map.json +++ b/data/maps/Route19/map.json @@ -36,7 +36,7 @@ "movement_range_y": 3, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 3, - "script": "Route19_EventScript_1AB44F", + "script": "Route19_EventScript_Reece", "flag": "0" }, { @@ -49,7 +49,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 3, - "script": "Route19_EventScript_1AB411", + "script": "Route19_EventScript_Richard", "flag": "0" }, { @@ -62,7 +62,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 3, - "script": "Route19_EventScript_1AB547", + "script": "Route19_EventScript_Tony", "flag": "0" }, { @@ -75,7 +75,7 @@ "movement_range_y": 3, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB48D", + "script": "Route19_EventScript_Matthew", "flag": "0" }, { @@ -88,7 +88,7 @@ "movement_range_y": 2, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB4CB", + "script": "Route19_EventScript_Douglas", "flag": "0" }, { @@ -101,7 +101,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 6, - "script": "Route19_EventScript_1AB509", + "script": "Route19_EventScript_David", "flag": "0" }, { @@ -114,7 +114,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB585", + "script": "Route19_EventScript_Axle", "flag": "0" }, { @@ -127,7 +127,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB601", + "script": "Route19_EventScript_Alice", "flag": "0" }, { @@ -140,7 +140,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB63F", + "script": "Route19_EventScript_Connie", "flag": "0" }, { @@ -153,7 +153,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB5C3", + "script": "Route19_EventScript_Anya", "flag": "0" }, { @@ -166,7 +166,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB67D", + "script": "Route19_EventScript_Lia", "flag": "0" }, { @@ -179,7 +179,7 @@ "movement_range_y": 1, "trainer_type": 1, "trainer_sight_or_berry_tree_id": 1, - "script": "Route19_EventScript_1AB6C3", + "script": "Route19_EventScript_Luc", "flag": "0" } ], @@ -191,7 +191,7 @@ "x": 13, "y": 12, "elevation": 0, - "script": "Route19_EventScript_168232" + "script": "Route19_EventScript_RouteSign" } ] } diff --git a/data/maps/Route19/scripts.inc b/data/maps/Route19/scripts.inc index 16d6e4669..10b361e83 100644 --- a/data/maps/Route19/scripts.inc +++ b/data/maps/Route19/scripts.inc @@ -1,6 +1,6 @@ Route19_MapScripts:: @ 8168231 .byte 0 -Route19_EventScript_168232:: @ 8168232 - msgbox gUnknown_8187C06, MSGBOX_SIGN +Route19_EventScript_RouteSign:: @ 8168232 + msgbox Route19_Text_RouteSign, MSGBOX_SIGN end diff --git a/data/maps/Route19/text.inc b/data/maps/Route19/text.inc index 7d399f364..a414146b4 100644 --- a/data/maps/Route19/text.inc +++ b/data/maps/Route19/text.inc @@ -1,154 +1,154 @@ -Text_1877A3:: @ 81877A3 +Route19_Text_RichardIntro:: @ 81877A3 .string "I have to exercise and warm up\n" .string "before going out for a swim.$" -Text_1877DF:: @ 81877DF +Route19_Text_RichardDefeat:: @ 81877DF .string "All warmed up!$" -Text_1877EE:: @ 81877EE +Route19_Text_RichardPostBattle:: @ 81877EE .string "Thanks, kid!\n" .string "I'm ready for a swim.$" -Text_187811:: @ 8187811 +Route19_Text_ReeceIntro:: @ 8187811 .string "Wait! Slow down!\n" .string "You'll have a heart attack!$" -Text_18783E:: @ 818783E +Route19_Text_ReeceDefeat:: @ 818783E .string "Ooh!\n" .string "That's chilly!$" -Text_187852:: @ 8187852 +Route19_Text_ReecePostBattle:: @ 8187852 .string "Watch out for TENTACOOL.\n" .string "They sting so painfully.$" -Text_187884:: @ 8187884 +Route19_Text_MatthewIntro:: @ 8187884 .string "I love swimming!\n" .string "What about you?$" -Text_1878A5:: @ 81878A5 +Route19_Text_MatthewDefeat:: @ 81878A5 .string "Belly flop!$" -Text_1878B1:: @ 81878B1 +Route19_Text_MatthewPostBattle:: @ 81878B1 .string "I can beat even marine POKéMON\n" .string "at swimming.$" -Text_1878DD:: @ 81878DD +Route19_Text_DouglasIntro:: @ 81878DD .string "What's beyond the horizon?$" -Text_1878F8:: @ 81878F8 +Route19_Text_DouglasDefeat:: @ 81878F8 .string "Glub!$" -Text_1878FE:: @ 81878FE +Route19_Text_DouglasPostBattle:: @ 81878FE .string "I see a couple of islands over\n" .string "yonder!$" -Text_187925:: @ 8187925 +Route19_Text_DavidIntro:: @ 8187925 .string "I tried diving for POKéMON, but it\n" .string "was a no-go.$" -Text_187955:: @ 8187955 +Route19_Text_DavidDefeat:: @ 8187955 .string "Help!$" -Text_18795B:: @ 818795B +Route19_Text_DavidPostBattle:: @ 818795B .string "I guess you have to fish for sea\n" .string "POKéMON.$" -Text_187985:: @ 8187985 +Route19_Text_TonyIntro:: @ 8187985 .string "I look at the sea to forget all\n" .string "the bad things that happened.$" -Text_1879C3:: @ 81879C3 +Route19_Text_TonyDefeat:: @ 81879C3 .string "Ooh!\n" .string "Traumatic!$" -Text_1879D3:: @ 81879D3 +Route19_Text_TonyPostBattle:: @ 81879D3 .string "I'm looking at the sea to forget\n" .string "the bad thing that happened!$" -Text_187A11:: @ 8187A11 +Route19_Text_AnyaIntro:: @ 8187A11 .string "Oh, I just love your ride!\n" .string "Can I have it if I win?$" -Text_187A44:: @ 8187A44 +Route19_Text_AnyaDefeat:: @ 8187A44 .string "Oh! I lost!$" -Text_187A50:: @ 8187A50 +Route19_Text_AnyaPostBattle:: @ 8187A50 .string "It's still a long way to go to\n" .string "SEAFOAM ISLANDS…\p" .string "I want to go back to FUCHSIA…$" -Text_187A9E:: @ 8187A9E +Route19_Text_AliceIntro:: @ 8187A9E .string "Swimming's great!\n" .string "Sunburns aren't!$" -Text_187AC1:: @ 8187AC1 +Route19_Text_AliceDefeat:: @ 8187AC1 .string "Shocker!$" -Text_187ACA:: @ 8187ACA +Route19_Text_AlicePostBattle:: @ 8187ACA .string "My boyfriend wanted to swim to\n" .string "SEAFOAM ISLANDS.$" -Text_187AFA:: @ 8187AFA +Route19_Text_AxleIntro:: @ 8187AFA .string "Ahoy, there!\n" .string "These waters are treacherous!$" -Text_187B25:: @ 8187B25 +Route19_Text_AxleDefeat:: @ 8187B25 .string "Ooh!\n" .string "Dangerous!$" -Text_187B35:: @ 8187B35 +Route19_Text_AxlePostBattle:: @ 8187B35 .string "M-my legs! They cramped up!\n" .string "Glub, glub…$" -Text_187B5D:: @ 8187B5D +Route19_Text_ConnieIntro:: @ 8187B5D .string "I swam here with my friends…\n" .string "I'm tired…$" -Text_187B85:: @ 8187B85 +Route19_Text_ConnieDefeat:: @ 8187B85 .string "I'm exhausted…$" -Text_187B94:: @ 8187B94 +Route19_Text_ConniePostBattle:: @ 8187B94 .string "If I were to ride a POKéMON on\n" .string "the sea, I'd like a LAPRAS.\p" .string "LAPRAS is so big, I bet it\n" .string "would keep me dry on water.$" -gUnknown_8187C06:: @ 8187C06 +Route19_Text_RouteSign:: @ 8187C06 .string "SEA ROUTE 19\n" .string "FUCHSIA CITY - SEAFOAM ISLANDS$" -Text_187C32:: @ 8187C32 +Route19_Text_LiaIntro:: @ 8187C32 .string "LIA: I'm looking after my brother.\n" .string "He just became a TRAINER.$" -Text_187C6F:: @ 8187C6F +Route19_Text_LiaDefeat:: @ 8187C6F .string "LIA: That's no way to treat my\n" .string "little brother!$" -Text_187C9E:: @ 8187C9E +Route19_Text_LiaPostBattle:: @ 8187C9E .string "LIA: Do you have a younger\n" .string "brother?\p" .string "I hope you're teaching him all\n" .string "sorts of things.$" -Text_187CF2:: @ 8187CF2 +Route19_Text_LiaNotEnoughMons:: @ 8187CF2 .string "LIA: I want to battle together\n" .string "with my little brother.\p" .string "Don't you have two POKéMON?$" -Text_187D45:: @ 8187D45 +Route19_Text_LucIntro:: @ 8187D45 .string "LUC: My big sis taught me how\n" .string "to swim and train POKéMON.$" -Text_187D7E:: @ 8187D7E +Route19_Text_LucDefeat:: @ 8187D7E .string "LUC: Oh, wow!\n" .string "Someone tougher than my big sis!$" -Text_187DAD:: @ 8187DAD +Route19_Text_LucPostBattle:: @ 8187DAD .string "LUC: My big sis is strong and nice.\n" .string "I think she's awesome!$" -Text_187DE8:: @ 8187DE8 +Route19_Text_LucNotEnoughMons:: @ 8187DE8 .string "LUC: I don't want to if I can't\n" .string "battle you with my big sis.\p" .string "Don't you have two POKéMON?$" diff --git a/data/scripts/trainers.inc b/data/scripts/trainers.inc index d89d5a110..8b38ec600 100644 --- a/data/scripts/trainers.inc +++ b/data/scripts/trainers.inc @@ -1285,589 +1285,589 @@ Route14_EventScript_JanRematch:: @ 81AABD8 msgbox Route14_Text_JanPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AABF3:: @ 81AABF3 - trainerbattle_single TRAINER_BIKER_ERNEST, Text_1868B6, Text_1868E8 +Route15_EventScript_Ernest:: @ 81AABF3 + trainerbattle_single TRAINER_BIKER_ERNEST, Route15_Text_ErnestIntro, Route15_Text_ErnestDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAC1A - msgbox Text_1868F1, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_ErnestRematch + msgbox Route15_Text_ErnestPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAC1A:: @ 81AAC1A - trainerbattle_rematch TRAINER_BIKER_ERNEST, Text_1C27E7, Text_1868E8 - msgbox Text_1868F1, MSGBOX_AUTOCLOSE +Route15_EventScript_ErnestRematch:: @ 81AAC1A + trainerbattle_rematch TRAINER_BIKER_ERNEST, Route15_Text_ErnestRematchIntro, Route15_Text_ErnestDefeat + msgbox Route15_Text_ErnestPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAC31:: @ 81AAC31 - trainerbattle_single TRAINER_BIKER_ALEX, Text_186936, Text_186968 +Route15_EventScript_Alex:: @ 81AAC31 + trainerbattle_single TRAINER_BIKER_ALEX, Route15_Text_AlexIntro, Route15_Text_AlexDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAC58 - msgbox Text_18697C, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_AlexRematch + msgbox Route15_Text_AlexPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAC58:: @ 81AAC58 - trainerbattle_rematch TRAINER_BIKER_ALEX, Text_1C2814, Text_186968 - msgbox Text_18697C, MSGBOX_AUTOCLOSE +Route15_EventScript_AlexRematch:: @ 81AAC58 + trainerbattle_rematch TRAINER_BIKER_ALEX, Route15_Text_AlexRematchIntro, Route15_Text_AlexDefeat + msgbox Route15_Text_AlexPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAC6F:: @ 81AAC6F - trainerbattle_single TRAINER_BEAUTY_GRACE, Text_18678B, Text_1867C1 +Route15_EventScript_Grace:: @ 81AAC6F + trainerbattle_single TRAINER_BEAUTY_GRACE, Route15_Text_GraceIntro, Route15_Text_GraceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAC96 - msgbox Text_1867DA, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_GraceRematch + msgbox Route15_Text_GracePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAC96:: @ 81AAC96 - trainerbattle_rematch TRAINER_BEAUTY_GRACE, Text_1C2753, Text_1867C1 - msgbox Text_1867DA, MSGBOX_AUTOCLOSE +Route15_EventScript_GraceRematch:: @ 81AAC96 + trainerbattle_rematch TRAINER_BEAUTY_GRACE, Route15_Text_GraceRematchIntro, Route15_Text_GraceDefeat + msgbox Route15_Text_GracePostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AACAD:: @ 81AACAD - trainerbattle_single TRAINER_BEAUTY_OLIVIA, Text_18680C, Text_186841 +Route15_EventScript_Olivia:: @ 81AACAD + trainerbattle_single TRAINER_BEAUTY_OLIVIA, Route15_Text_OliviaIntro, Route15_Text_OliviaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AACD4 - msgbox Text_18686F, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_OliviaRematch + msgbox Route15_Text_OliviaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AACD4:: @ 81AACD4 - trainerbattle_rematch TRAINER_BEAUTY_OLIVIA, Text_1C279D, Text_186841 - msgbox Text_18686F, MSGBOX_AUTOCLOSE +Route15_EventScript_OliviaRematch:: @ 81AACD4 + trainerbattle_rematch TRAINER_BEAUTY_OLIVIA, Route15_Text_OliviaRematchIntro, Route15_Text_OliviaDefeat + msgbox Route15_Text_OliviaPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AACEB:: @ 81AACEB - trainerbattle_single TRAINER_BIRD_KEEPER_EDWIN, Text_18664F, Text_18667A +Route15_EventScript_Edwin:: @ 81AACEB + trainerbattle_single TRAINER_BIRD_KEEPER_EDWIN, Route15_Text_EdwinIntro, Route15_Text_EdwinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAD12 - msgbox Text_18668D, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_EdwinRematch + msgbox Route15_Text_EdwinPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAD12:: @ 81AAD12 - trainerbattle_rematch TRAINER_BIRD_KEEPER_EDWIN, Text_1C26D3, Text_18667A - msgbox Text_18668D, MSGBOX_AUTOCLOSE +Route15_EventScript_EdwinRematch:: @ 81AAD12 + trainerbattle_rematch TRAINER_BIRD_KEEPER_EDWIN, Route15_Text_EdwinRematchIntro, Route15_Text_EdwinDefeat + msgbox Route15_Text_EdwinPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAD29:: @ 81AAD29 - trainerbattle_single TRAINER_BIRD_KEEPER_CHESTER, Text_1866D1, Text_186707 +Route15_EventScript_Chester:: @ 81AAD29 + trainerbattle_single TRAINER_BIRD_KEEPER_CHESTER, Route15_Text_ChesterIntro, Route15_Text_ChesterDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAD50 - msgbox Text_18671A, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_ChesterRematch + msgbox Route15_Text_ChesterPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAD50:: @ 81AAD50 - trainerbattle_rematch TRAINER_BIRD_KEEPER_CHESTER, Text_1C2717, Text_186707 - msgbox Text_18671A, MSGBOX_AUTOCLOSE +Route15_EventScript_ChesterRematch:: @ 81AAD50 + trainerbattle_rematch TRAINER_BIRD_KEEPER_CHESTER, Route15_Text_ChesterRematchIntro, Route15_Text_ChesterDefeat + msgbox Route15_Text_ChesterPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAD67:: @ 81AAD67 - trainerbattle_single TRAINER_PICNICKER_YAZMIN, Text_186A22, Text_186A40 +Route15_EventScript_Yazmin:: @ 81AAD67 + trainerbattle_single TRAINER_PICNICKER_YAZMIN, Route15_Text_YazminIntro, Route15_Text_YazminDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAD8E - msgbox Text_186A55, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_YazminRematch + msgbox Route15_Text_YazminPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAD8E:: @ 81AAD8E - trainerbattle_rematch TRAINER_PICNICKER_YAZMIN, Text_1C287D, Text_186A40 - msgbox Text_186A55, MSGBOX_AUTOCLOSE +Route15_EventScript_YazminRematch:: @ 81AAD8E + trainerbattle_rematch TRAINER_PICNICKER_YAZMIN, Route15_Text_YazminRematchIntro, Route15_Text_YazminDefeat + msgbox Route15_Text_YazminPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AADA5:: @ 81AADA5 - trainerbattle_single TRAINER_PICNICKER_KINDRA, Text_18650B, Text_186549 +Route15_EventScript_Kindra:: @ 81AADA5 + trainerbattle_single TRAINER_PICNICKER_KINDRA, Route15_Text_KindraIntro, Route15_Text_KindraDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AADCC - msgbox Text_18655A, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_KindraRematch + msgbox Route15_Text_KindraPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AADCC:: @ 81AADCC - trainerbattle_rematch TRAINER_PICNICKER_KINDRA, Text_1C2650, Text_186549 - msgbox Text_18655A, MSGBOX_AUTOCLOSE +Route15_EventScript_KindraRematch:: @ 81AADCC + trainerbattle_rematch TRAINER_PICNICKER_KINDRA, Route15_Text_KindraRematchIntro, Route15_Text_KindraDefeat + msgbox Route15_Text_KindraPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AADE3:: @ 81AADE3 - trainerbattle_single TRAINER_PICNICKER_BECKY, Text_1865D3, Text_186612 +Route15_EventScript_Becky:: @ 81AADE3 + trainerbattle_single TRAINER_PICNICKER_BECKY, Route15_Text_BeckyIntro, Route15_Text_BeckyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAE0A - msgbox Text_18661D, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_BeckyRematch + msgbox Route15_Text_BeckyPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAE0A:: @ 81AAE0A - trainerbattle_rematch TRAINER_PICNICKER_BECKY, Text_1C268D, Text_186612 - msgbox Text_18661D, MSGBOX_AUTOCLOSE +Route15_EventScript_BeckyRematch:: @ 81AAE0A + trainerbattle_rematch TRAINER_PICNICKER_BECKY, Route15_Text_BeckyRematchIntro, Route15_Text_BeckyDefeat + msgbox Route15_Text_BeckyPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAE21:: @ 81AAE21 - trainerbattle_single TRAINER_PICNICKER_CELIA, Text_1869BA, Text_1869E6 +Route15_EventScript_Celia:: @ 81AAE21 + trainerbattle_single TRAINER_PICNICKER_CELIA, Route15_Text_CeliaIntro, Route15_Text_CeliaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAE48 - msgbox Text_1869F4, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_CeliaRematch + msgbox Route15_Text_CeliaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAE48:: @ 81AAE48 - trainerbattle_rematch TRAINER_PICNICKER_CELIA, Text_1C2846, Text_1869E6 - msgbox Text_1869F4, MSGBOX_AUTOCLOSE +Route15_EventScript_CeliaRematch:: @ 81AAE48 + trainerbattle_rematch TRAINER_PICNICKER_CELIA, Route15_Text_CeliaRematchIntro, Route15_Text_CeliaDefeat + msgbox Route15_Text_CeliaPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAE5F:: @ 81AAE5F - trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Text_186A95, Text_186ACB, Text_186B46 +Route15_EventScript_Mya:: @ 81AAE5F + trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_MyaIntro, Route15_Text_MyaDefeat, Route15_Text_MyaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAE8A - msgbox Text_186B0A, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_MyaRematch + msgbox Route15_Text_MyaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAE8A:: @ 81AAE8A - trainerbattle_rematch_double TRAINER_CRUSH_KIN_RON_MYA, Text_1C28A1, Text_186ACB, Text_186B46 - msgbox Text_186B0A, MSGBOX_AUTOCLOSE +Route15_EventScript_MyaRematch:: @ 81AAE8A + trainerbattle_rematch_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_MyaRematchIntro, Route15_Text_MyaDefeat, Route15_Text_MyaNotEnoughMons + msgbox Route15_Text_MyaPostBattle, MSGBOX_AUTOCLOSE end -Route15_EventScript_1AAEA5:: @ 81AAEA5 - trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Text_186B89, Text_186BB1, Text_186BFE +Route15_EventScript_Ron:: @ 81AAEA5 + trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_RonIntro, Route15_Text_RonDefeat, Route15_Text_RonNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAED0 - msgbox Text_186BD2, MSGBOX_AUTOCLOSE + goto_if_eq Route15_EventScript_RonRematch + msgbox Route15_Text_RonPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAED0:: @ 81AAED0 - trainerbattle_rematch_double TRAINER_CRUSH_KIN_RON_MYA, Text_1C28EC, Text_186BB1, Text_186BFE - msgbox Text_186BD2, MSGBOX_AUTOCLOSE +Route15_EventScript_RonRematch:: @ 81AAED0 + trainerbattle_rematch_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_RonRematchIntro, Route15_Text_RonDefeat, Route15_Text_RonNotEnoughMons + msgbox Route15_Text_RonPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AAEEB:: @ 81AAEEB - trainerbattle_single TRAINER_BIKER_LAO, Text_186C4D, Text_186C5F +Route16_EventScript_Lao:: @ 81AAEEB + trainerbattle_single TRAINER_BIKER_LAO, Route16_Text_LaoIntro, Route16_Text_LaoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAF12 - msgbox Text_186C75, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_LaoRematch + msgbox Route16_Text_LaoPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAF12:: @ 81AAF12 - trainerbattle_rematch TRAINER_BIKER_LAO, Text_1C2913, Text_186C5F - msgbox Text_186C75, MSGBOX_AUTOCLOSE +Route16_EventScript_LaoRematch:: @ 81AAF12 + trainerbattle_rematch TRAINER_BIKER_LAO, Route16_Text_LaoRematchIntro, Route16_Text_LaoDefeat + msgbox Route16_Text_LaoPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AAF29:: @ 81AAF29 - trainerbattle_single TRAINER_BIKER_HIDEO, Text_186D39, Text_186D52 +Route16_EventScript_Hideo:: @ 81AAF29 + trainerbattle_single TRAINER_BIKER_HIDEO, Route16_Text_HideoIntro, Route16_Text_HideoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAF50 - msgbox Text_186D5A, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_HideoRematch + msgbox Route16_Text_HideoPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAF50:: @ 81AAF50 - trainerbattle_rematch TRAINER_BIKER_HIDEO, Text_1C297B, Text_186D52 - msgbox Text_186D5A, MSGBOX_AUTOCLOSE +Route16_EventScript_HideoRematch:: @ 81AAF50 + trainerbattle_rematch TRAINER_BIKER_HIDEO, Route16_Text_HideoRematchIntro, Route16_Text_HideoDefeat + msgbox Route16_Text_HideoPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AAF67:: @ 81AAF67 - trainerbattle_single TRAINER_BIKER_RUBEN, Text_186E86, Text_186EB4 +Route16_EventScript_Ruben:: @ 81AAF67 + trainerbattle_single TRAINER_BIKER_RUBEN, Route16_Text_RubenIntro, Route16_Text_RubenDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAF8E - msgbox Text_186EC7, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_RubenRematch + msgbox Route16_Text_RubenPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAF8E:: @ 81AAF8E - trainerbattle_rematch TRAINER_BIKER_RUBEN, Text_1C29EB, Text_186EB4 - msgbox Text_186EC7, MSGBOX_AUTOCLOSE +Route16_EventScript_RubenRematch:: @ 81AAF8E + trainerbattle_rematch TRAINER_BIKER_RUBEN, Route16_Text_RubenRematchIntro, Route16_Text_RubenDefeat + msgbox Route16_Text_RubenPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AAFA5:: @ 81AAFA5 - trainerbattle_single TRAINER_CUE_BALL_KOJI, Text_186CA2, Text_186CBB +Route16_EventScript_Koji:: @ 81AAFA5 + trainerbattle_single TRAINER_CUE_BALL_KOJI, Route16_Text_KojiIntro, Route16_Text_KojiDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AAFCC - msgbox Text_186CC5, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_KojiRematch + msgbox Route16_Text_KojiPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AAFCC:: @ 81AAFCC - trainerbattle_rematch TRAINER_CUE_BALL_KOJI, Text_1C2925, Text_186CBB - msgbox Text_186CC5, MSGBOX_AUTOCLOSE +Route16_EventScript_KojiRematch:: @ 81AAFCC + trainerbattle_rematch TRAINER_CUE_BALL_KOJI, Route16_Text_KojiRematchIntro, Route16_Text_KojiDefeat + msgbox Route16_Text_KojiPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AAFE3:: @ 81AAFE3 - trainerbattle_single TRAINER_CUE_BALL_LUKE, Text_186CE5, Text_186D06 +Route16_EventScript_Luke:: @ 81AAFE3 + trainerbattle_single TRAINER_CUE_BALL_LUKE, Route16_Text_LukeIntro, Route16_Text_LukeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB00A - msgbox Text_186D16, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_LukeRematch + msgbox Route16_Text_LukePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB00A:: @ 81AB00A - trainerbattle_rematch TRAINER_CUE_BALL_LUKE, Text_1C2944, Text_186D06 - msgbox Text_186D16, MSGBOX_AUTOCLOSE +Route16_EventScript_LukeRematch:: @ 81AB00A + trainerbattle_rematch TRAINER_CUE_BALL_LUKE, Route16_Text_LukeRematchIntro, Route16_Text_LukeDefeat + msgbox Route16_Text_LukePostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AB021:: @ 81AB021 - trainerbattle_single TRAINER_CUE_BALL_CAMRON, Text_186DD9, Text_186E0D +Route16_EventScript_Camron:: @ 81AB021 + trainerbattle_single TRAINER_CUE_BALL_CAMRON, Route16_Text_CamronIntro, Route16_Text_CamronDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB048 - msgbox Text_186E1C, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_CamronRematch + msgbox Route16_Text_CamronPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB048:: @ 81AB048 - trainerbattle_rematch TRAINER_CUE_BALL_CAMRON, Text_1C29B0, Text_186E0D - msgbox Text_186E1C, MSGBOX_AUTOCLOSE +Route16_EventScript_CamronRematch:: @ 81AB048 + trainerbattle_rematch TRAINER_CUE_BALL_CAMRON, Route16_Text_CamronRematchIntro, Route16_Text_CamronDefeat + msgbox Route16_Text_CamronPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AB05F:: @ 81AB05F - trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Text_186FBD, Text_186FFA, Text_187057 +Route16_EventScript_Jed:: @ 81AB05F + trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_JedIntro, Route16_Text_JedDefeat, Route16_Text_JedNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB08A - msgbox Text_187027, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_JedRematch + msgbox Route16_Text_JedPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB08A:: @ 81AB08A - trainerbattle_rematch_double TRAINER_YOUNG_COUPLE_LEA_JED, Text_1C2A19, Text_186FFA, Text_187057 - msgbox Text_187027, MSGBOX_AUTOCLOSE +Route16_EventScript_JedRematch:: @ 81AB08A + trainerbattle_rematch_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_JedRematchIntro, Route16_Text_JedDefeat, Route16_Text_JedNotEnoughMons + msgbox Route16_Text_JedPostBattle, MSGBOX_AUTOCLOSE end -Route16_EventScript_1AB0A5:: @ 81AB0A5 - trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Text_187097, Text_1870CC, Text_187120 +Route16_EventScript_Lea:: @ 81AB0A5 + trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_LeaIntro, Route16_Text_LeaDefeat, Route16_Text_LeaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB0D0 - msgbox Text_1870F9, MSGBOX_AUTOCLOSE + goto_if_eq Route16_EventScript_LeaRematch + msgbox Route16_Text_LeaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB0D0:: @ 81AB0D0 - trainerbattle_rematch_double TRAINER_YOUNG_COUPLE_LEA_JED, Text_1C2A53, Text_1870CC, Text_187120 - msgbox Text_1870F9, MSGBOX_AUTOCLOSE +Route16_EventScript_LeaRematch:: @ 81AB0D0 + trainerbattle_rematch_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_LeaRematchIntro, Route16_Text_LeaDefeat, Route16_Text_LeaNotEnoughMons + msgbox Route16_Text_LeaPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB0EB:: @ 81AB0EB - trainerbattle_single TRAINER_BIKER_BILLY, Text_1872BD, Text_1872E3 +Route17_EventScript_Billy:: @ 81AB0EB + trainerbattle_single TRAINER_BIKER_BILLY, Route17_Text_BillyIntro, Route17_Text_BillyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB112 - msgbox Text_1872EB, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_BillyRematch + msgbox Route17_Text_BillyPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB112:: @ 81AB112 - trainerbattle_rematch TRAINER_BIKER_BILLY, Text_1C2B06, Text_1872E3 - msgbox Text_1872EB, MSGBOX_AUTOCLOSE +Route17_EventScript_BillyRematch:: @ 81AB112 + trainerbattle_rematch TRAINER_BIKER_BILLY, Route17_Text_BillyRematchIntro, Route17_Text_BillyDefeat + msgbox Route17_Text_BillyPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB129:: @ 81AB129 - trainerbattle_single TRAINER_BIKER_NIKOLAS, Text_18730A, Text_187325 +Route17_EventScript_Nikolas:: @ 81AB129 + trainerbattle_single TRAINER_BIKER_NIKOLAS, Route17_Text_NikolasIntro, Route17_Text_NikolasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB150 - msgbox Text_187333, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_NikolasRematch + msgbox Route17_Text_NikolasPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB150:: @ 81AB150 - trainerbattle_rematch TRAINER_BIKER_NIKOLAS, Text_1C2B2C, Text_187325 - msgbox Text_187333, MSGBOX_AUTOCLOSE +Route17_EventScript_NikolasRematch:: @ 81AB150 + trainerbattle_rematch TRAINER_BIKER_NIKOLAS, Route17_Text_NikolasRematchIntro, Route17_Text_NikolasDefeat + msgbox Route17_Text_NikolasPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB167:: @ 81AB167 - trainerbattle_single TRAINER_BIKER_JAXON, Text_187456, Text_187472 +Route17_EventScript_Jaxon:: @ 81AB167 + trainerbattle_single TRAINER_BIKER_JAXON, Route17_Text_JaxonIntro, Route17_Text_JaxonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB18E - msgbox Text_187479, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_JaxonRematch + msgbox Route17_Text_JaxonPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB18E:: @ 81AB18E - trainerbattle_rematch TRAINER_BIKER_JAXON, Text_1C2BE6, Text_187472 - msgbox Text_187479, MSGBOX_AUTOCLOSE +Route17_EventScript_JaxonRematch:: @ 81AB18E + trainerbattle_rematch TRAINER_BIKER_JAXON, Route17_Text_JaxonRematchIntro, Route17_Text_JaxonDefeat + msgbox Route17_Text_JaxonPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB1A5:: @ 81AB1A5 - trainerbattle_single TRAINER_BIKER_WILLIAM, Text_18749B, Text_1874B6 +Route17_EventScript_William:: @ 81AB1A5 + trainerbattle_single TRAINER_BIKER_WILLIAM, Route17_Text_WilliamIntro, Route17_Text_WilliamDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB1CC - msgbox Text_1874C9, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_WilliamRematch + msgbox Route17_Text_WilliamPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB1CC:: @ 81AB1CC - trainerbattle_rematch TRAINER_BIKER_WILLIAM, Text_1C2C10, Text_1874B6 - msgbox Text_1874C9, MSGBOX_AUTOCLOSE +Route17_EventScript_WilliamRematch:: @ 81AB1CC + trainerbattle_rematch TRAINER_BIKER_WILLIAM, Route17_Text_WilliamRematchIntro, Route17_Text_WilliamDefeat + msgbox Route17_Text_WilliamPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB1E3:: @ 81AB1E3 - trainerbattle_single TRAINER_CUE_BALL_RAUL, Text_18717E, Text_1871AE +Route17_EventScript_Raul:: @ 81AB1E3 + trainerbattle_single TRAINER_CUE_BALL_RAUL, Route17_Text_RaulIntro, Route17_Text_RaulDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB20A - msgbox Text_1871BA, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_RaulRematch + msgbox Route17_Text_RaulPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB20A:: @ 81AB20A - trainerbattle_rematch TRAINER_CUE_BALL_RAUL, Text_1C2A88, Text_1871AE - msgbox Text_1871BA, MSGBOX_AUTOCLOSE +Route17_EventScript_RaulRematch:: @ 81AB20A + trainerbattle_rematch TRAINER_CUE_BALL_RAUL, Route17_Text_RaulRematchIntro, Route17_Text_RaulDefeat + msgbox Route17_Text_RaulPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB221:: @ 81AB221 - trainerbattle_single TRAINER_CUE_BALL_ISAIAH, Text_187228, Text_187254 +Route17_EventScript_Isaiah:: @ 81AB221 + trainerbattle_single TRAINER_CUE_BALL_ISAIAH, Route17_Text_IsaiahIntro, Route17_Text_IsaiahDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB248 - msgbox Text_18725A, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_IsaiahRematch + msgbox Route17_Text_IsaiahPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB248:: @ 81AB248 - trainerbattle_rematch TRAINER_CUE_BALL_ISAIAH, Text_1C2AC4, Text_187254 - msgbox Text_18725A, MSGBOX_AUTOCLOSE +Route17_EventScript_IsaiahRematch:: @ 81AB248 + trainerbattle_rematch TRAINER_CUE_BALL_ISAIAH, Route17_Text_IsaiahRematchIntro, Route17_Text_IsaiahDefeat + msgbox Route17_Text_IsaiahPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB25F:: @ 81AB25F - trainerbattle_single TRAINER_CUE_BALL_ZEEK, Text_187362, Text_187395 +Route17_EventScript_Zeek:: @ 81AB25F + trainerbattle_single TRAINER_CUE_BALL_ZEEK, Route17_Text_ZeekIntro, Route17_Text_ZeekDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB286 - msgbox Text_18739F, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_ZeekRematch + msgbox Route17_Text_ZeekPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB286:: @ 81AB286 - trainerbattle_rematch TRAINER_CUE_BALL_ZEEK, Text_1C2B5E, Text_187395 - msgbox Text_18739F, MSGBOX_AUTOCLOSE +Route17_EventScript_ZeekRematch:: @ 81AB286 + trainerbattle_rematch TRAINER_CUE_BALL_ZEEK, Route17_Text_ZeekRematchIntro, Route17_Text_ZeekDefeat + msgbox Route17_Text_ZeekPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB29D:: @ 81AB29D - trainerbattle_single TRAINER_CUE_BALL_JAMAL, Text_1873D1, Text_1873EB +Route17_EventScript_Jamal:: @ 81AB29D + trainerbattle_single TRAINER_CUE_BALL_JAMAL, Route17_Text_JamalIntro, Route17_Text_JamalDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB2C4 - msgbox Text_1873FF, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_JamalRematch + msgbox Route17_Text_JamalPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB2C4:: @ 81AB2C4 - trainerbattle_rematch TRAINER_CUE_BALL_JAMAL, Text_1C2B9C, Text_1873EB - msgbox Text_1873FF, MSGBOX_AUTOCLOSE +Route17_EventScript_JamalRematch:: @ 81AB2C4 + trainerbattle_rematch TRAINER_CUE_BALL_JAMAL, Route17_Text_JamalRematchIntro, Route17_Text_JamalDefeat + msgbox Route17_Text_JamalPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB2DB:: @ 81AB2DB - trainerbattle_single TRAINER_CUE_BALL_COREY, Text_18741D, Text_187429 +Route17_EventScript_Corey:: @ 81AB2DB + trainerbattle_single TRAINER_CUE_BALL_COREY, Route17_Text_CoreyIntro, Route17_Text_CoreyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB302 - msgbox Text_187432, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_CoreyRematch + msgbox Route17_Text_CoreyPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB302:: @ 81AB302 - trainerbattle_rematch TRAINER_CUE_BALL_COREY, Text_1C2BDA, Text_187429 - msgbox Text_187432, MSGBOX_AUTOCLOSE +Route17_EventScript_CoreyRematch:: @ 81AB302 + trainerbattle_rematch TRAINER_CUE_BALL_COREY, Route17_Text_CoreyRematchIntro, Route17_Text_CoreyDefeat + msgbox Route17_Text_CoreyPostBattle, MSGBOX_AUTOCLOSE end -Route17_EventScript_1AB319:: @ 81AB319 - trainerbattle_single TRAINER_BIKER_VIRGIL, Text_18727D, Text_187295 +Route17_EventScript_Virgil:: @ 81AB319 + trainerbattle_single TRAINER_BIKER_VIRGIL, Route17_Text_VirgilIntro, Route17_Text_VirgilDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB340 - msgbox Text_1872A5, MSGBOX_AUTOCLOSE + goto_if_eq Route17_EventScript_VirgilRematch + msgbox Route17_Text_VirgilPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB340:: @ 81AB340 - trainerbattle_rematch TRAINER_BIKER_VIRGIL, Text_1C2AF0, Text_187295 - msgbox Text_1872A5, MSGBOX_AUTOCLOSE +Route17_EventScript_VirgilRematch:: @ 81AB340 + trainerbattle_rematch TRAINER_BIKER_VIRGIL, Route17_Text_VirgilRematchIntro, Route17_Text_VirgilDefeat + msgbox Route17_Text_VirgilPostBattle, MSGBOX_AUTOCLOSE end -Route18_EventScript_1AB357:: @ 81AB357 - trainerbattle_single TRAINER_BIRD_KEEPER_WILTON, Text_187640, Text_187672 +Route18_EventScript_Wilton:: @ 81AB357 + trainerbattle_single TRAINER_BIRD_KEEPER_WILTON, Route18_Text_WiltonIntro, Route18_Text_WiltonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB37E - msgbox Text_187677, MSGBOX_AUTOCLOSE + goto_if_eq Route18_EventScript_WiltonRematch + msgbox Route18_Text_WiltonPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB37E:: @ 81AB37E - trainerbattle_rematch TRAINER_BIRD_KEEPER_WILTON, Text_1C2C2B, Text_187672 - msgbox Text_187677, MSGBOX_AUTOCLOSE +Route18_EventScript_WiltonRematch:: @ 81AB37E + trainerbattle_rematch TRAINER_BIRD_KEEPER_WILTON, Route18_Text_WiltonRematchIntro, Route18_Text_WiltonDefeat + msgbox Route18_Text_WiltonPostBattle, MSGBOX_AUTOCLOSE end -Route18_EventScript_1AB395:: @ 81AB395 - trainerbattle_single TRAINER_BIRD_KEEPER_RAMIRO, Text_18768C, Text_1876B3 +Route18_EventScript_Ramiro:: @ 81AB395 + trainerbattle_single TRAINER_BIRD_KEEPER_RAMIRO, Route18_Text_RamiroIntro, Route18_Text_RamiroDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB3BC - msgbox Text_1876C5, MSGBOX_AUTOCLOSE + goto_if_eq Route18_EventScript_RamiroRematch + msgbox Route18_Text_RamiroPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB3BC:: @ 81AB3BC - trainerbattle_rematch TRAINER_BIRD_KEEPER_RAMIRO, Text_1C2C7B, Text_1876B3 - msgbox Text_1876C5, MSGBOX_AUTOCLOSE +Route18_EventScript_RamiroRematch:: @ 81AB3BC + trainerbattle_rematch TRAINER_BIRD_KEEPER_RAMIRO, Route18_Text_RamiroRematchIntro, Route18_Text_RamiroDefeat + msgbox Route18_Text_RamiroPostBattle, MSGBOX_AUTOCLOSE end -Route18_EventScript_1AB3D3:: @ 81AB3D3 - trainerbattle_single TRAINER_BIRD_KEEPER_JACOB, Text_187704, Text_187726 +Route18_EventScript_Jacob:: @ 81AB3D3 + trainerbattle_single TRAINER_BIRD_KEEPER_JACOB, Route18_Text_JacobIntro, Route18_Text_JacobDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB3FA - msgbox Text_18772C, MSGBOX_AUTOCLOSE + goto_if_eq Route18_EventScript_JacobRematch + msgbox Route18_Text_JacobPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB3FA:: @ 81AB3FA - trainerbattle_rematch TRAINER_BIRD_KEEPER_JACOB, Text_1C2CA8, Text_187726 - msgbox Text_18772C, MSGBOX_AUTOCLOSE +Route18_EventScript_JacobRematch:: @ 81AB3FA + trainerbattle_rematch TRAINER_BIRD_KEEPER_JACOB, Route18_Text_JacobRematchIntro, Route18_Text_JacobDefeat + msgbox Route18_Text_JacobPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB411:: @ 81AB411 - trainerbattle_single TRAINER_SWIMMER_MALE_RICHARD, Text_1877A3, Text_1877DF +Route19_EventScript_Richard:: @ 81AB411 + trainerbattle_single TRAINER_SWIMMER_MALE_RICHARD, Route19_Text_RichardIntro, Route19_Text_RichardDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB438 - msgbox Text_1877EE, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_RichardRematch + msgbox Route19_Text_RichardPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB438:: @ 81AB438 - trainerbattle_rematch TRAINER_SWIMMER_MALE_RICHARD, Text_1C2CEE, Text_1877DF - msgbox Text_1877EE, MSGBOX_AUTOCLOSE +Route19_EventScript_RichardRematch:: @ 81AB438 + trainerbattle_rematch TRAINER_SWIMMER_MALE_RICHARD, Route19_Text_RichardRematchIntro, Route19_Text_RichardDefeat + msgbox Route19_Text_RichardPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB44F:: @ 81AB44F - trainerbattle_single TRAINER_SWIMMER_MALE_REECE, Text_187811, Text_18783E +Route19_EventScript_Reece:: @ 81AB44F + trainerbattle_single TRAINER_SWIMMER_MALE_REECE, Route19_Text_ReeceIntro, Route19_Text_ReeceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB476 - msgbox Text_187852, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_ReeceRematch + msgbox Route19_Text_ReecePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB476:: @ 81AB476 - trainerbattle_rematch TRAINER_SWIMMER_MALE_REECE, Text_1C2D19, Text_18783E - msgbox Text_187852, MSGBOX_AUTOCLOSE +Route19_EventScript_ReeceRematch:: @ 81AB476 + trainerbattle_rematch TRAINER_SWIMMER_MALE_REECE, Route19_Text_ReeceRematchIntro, Route19_Text_ReeceDefeat + msgbox Route19_Text_ReecePostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB48D:: @ 81AB48D - trainerbattle_single TRAINER_SWIMMER_MALE_MATTHEW, Text_187884, Text_1878A5 +Route19_EventScript_Matthew:: @ 81AB48D + trainerbattle_single TRAINER_SWIMMER_MALE_MATTHEW, Route19_Text_MatthewIntro, Route19_Text_MatthewDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB4B4 - msgbox Text_1878B1, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_MatthewRematch + msgbox Route19_Text_MatthewPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB4B4:: @ 81AB4B4 - trainerbattle_rematch TRAINER_SWIMMER_MALE_MATTHEW, Text_1C2D4B, Text_1878A5 - msgbox Text_1878B1, MSGBOX_AUTOCLOSE +Route19_EventScript_MatthewRematch:: @ 81AB4B4 + trainerbattle_rematch TRAINER_SWIMMER_MALE_MATTHEW, Route19_Text_MatthewRematchIntro, Route19_Text_MatthewDefeat + msgbox Route19_Text_MatthewPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB4CB:: @ 81AB4CB - trainerbattle_single TRAINER_SWIMMER_MALE_DOUGLAS, Text_1878DD, Text_1878F8 +Route19_EventScript_Douglas:: @ 81AB4CB + trainerbattle_single TRAINER_SWIMMER_MALE_DOUGLAS, Route19_Text_DouglasIntro, Route19_Text_DouglasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB4F2 - msgbox Text_1878FE, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_DouglasRematch + msgbox Route19_Text_DouglasPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB4F2:: @ 81AB4F2 - trainerbattle_rematch TRAINER_SWIMMER_MALE_DOUGLAS, Text_1C2D7D, Text_1878F8 - msgbox Text_1878FE, MSGBOX_AUTOCLOSE +Route19_EventScript_DouglasRematch:: @ 81AB4F2 + trainerbattle_rematch TRAINER_SWIMMER_MALE_DOUGLAS, Route19_Text_DouglasRematchIntro, Route19_Text_DouglasDefeat + msgbox Route19_Text_DouglasPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB509:: @ 81AB509 - trainerbattle_single TRAINER_SWIMMER_MALE_DAVID, Text_187925, Text_187955 +Route19_EventScript_David:: @ 81AB509 + trainerbattle_single TRAINER_SWIMMER_MALE_DAVID, Route19_Text_DavidIntro, Route19_Text_DavidDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB530 - msgbox Text_18795B, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_DavidRematch + msgbox Route19_Text_DavidPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB530:: @ 81AB530 - trainerbattle_rematch TRAINER_SWIMMER_MALE_DAVID, Text_1C2DA7, Text_187955 - msgbox Text_18795B, MSGBOX_AUTOCLOSE +Route19_EventScript_DavidRematch:: @ 81AB530 + trainerbattle_rematch TRAINER_SWIMMER_MALE_DAVID, Route19_Text_DavidRematchIntro, Route19_Text_DavidDefeat + msgbox Route19_Text_DavidPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB547:: @ 81AB547 - trainerbattle_single TRAINER_SWIMMER_MALE_TONY, Text_187985, Text_1879C3 +Route19_EventScript_Tony:: @ 81AB547 + trainerbattle_single TRAINER_SWIMMER_MALE_TONY, Route19_Text_TonyIntro, Route19_Text_TonyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB56E - msgbox Text_1879D3, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_TonyRematch + msgbox Route19_Text_TonyPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB56E:: @ 81AB56E - trainerbattle_rematch TRAINER_SWIMMER_MALE_TONY, Text_1C2DE9, Text_1879C3 - msgbox Text_1879D3, MSGBOX_AUTOCLOSE +Route19_EventScript_TonyRematch:: @ 81AB56E + trainerbattle_rematch TRAINER_SWIMMER_MALE_TONY, Route19_Text_TonyRematchIntro, Route19_Text_TonyDefeat + msgbox Route19_Text_TonyPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB585:: @ 81AB585 - trainerbattle_single TRAINER_SWIMMER_MALE_AXLE, Text_187AFA, Text_187B25 +Route19_EventScript_Axle:: @ 81AB585 + trainerbattle_single TRAINER_SWIMMER_MALE_AXLE, Route19_Text_AxleIntro, Route19_Text_AxleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB5AC - msgbox Text_187B35, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_AxleRematch + msgbox Route19_Text_AxlePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB5AC:: @ 81AB5AC - trainerbattle_rematch TRAINER_SWIMMER_MALE_AXLE, Text_1C2EC0, Text_187B25 - msgbox Text_187B35, MSGBOX_AUTOCLOSE +Route19_EventScript_AxleRematch:: @ 81AB5AC + trainerbattle_rematch TRAINER_SWIMMER_MALE_AXLE, Route19_Text_AxleRematchIntro, Route19_Text_AxleDefeat + msgbox Route19_Text_AxlePostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB5C3:: @ 81AB5C3 - trainerbattle_single TRAINER_SWIMMER_FEMALE_ANYA, Text_187A11, Text_187A44 +Route19_EventScript_Anya:: @ 81AB5C3 + trainerbattle_single TRAINER_SWIMMER_FEMALE_ANYA, Route19_Text_AnyaIntro, Route19_Text_AnyaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB5EA - msgbox Text_187A50, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_AnyaRematch + msgbox Route19_Text_AnyaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB5EA:: @ 81AB5EA - trainerbattle_rematch TRAINER_SWIMMER_FEMALE_ANYA, Text_1C2E4A, Text_187A44 - msgbox Text_187A50, MSGBOX_AUTOCLOSE +Route19_EventScript_AnyaRematch:: @ 81AB5EA + trainerbattle_rematch TRAINER_SWIMMER_FEMALE_ANYA, Route19_Text_AnyaRematchIntro, Route19_Text_AnyaDefeat + msgbox Route19_Text_AnyaPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB601:: @ 81AB601 - trainerbattle_single TRAINER_SWIMMER_FEMALE_ALICE, Text_187A9E, Text_187AC1 +Route19_EventScript_Alice:: @ 81AB601 + trainerbattle_single TRAINER_SWIMMER_FEMALE_ALICE, Route19_Text_AliceIntro, Route19_Text_AliceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB628 - msgbox Text_187ACA, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_AliceRematch + msgbox Route19_Text_AlicePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB628:: @ 81AB628 - trainerbattle_rematch TRAINER_SWIMMER_FEMALE_ALICE, Text_1C2E9D, Text_187AC1 - msgbox Text_187ACA, MSGBOX_AUTOCLOSE +Route19_EventScript_AliceRematch:: @ 81AB628 + trainerbattle_rematch TRAINER_SWIMMER_FEMALE_ALICE, Route19_Text_AliceRematchIntro, Route19_Text_AliceDefeat + msgbox Route19_Text_AlicePostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB63F:: @ 81AB63F - trainerbattle_single TRAINER_SWIMMER_FEMALE_CONNIE, Text_187B5D, Text_187B85 +Route19_EventScript_Connie:: @ 81AB63F + trainerbattle_single TRAINER_SWIMMER_FEMALE_CONNIE, Route19_Text_ConnieIntro, Route19_Text_ConnieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB666 - msgbox Text_187B94, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_ConnieRematch + msgbox Route19_Text_ConniePostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB666:: @ 81AB666 - trainerbattle_rematch TRAINER_SWIMMER_FEMALE_CONNIE, Text_1C2EFC, Text_187B85 - msgbox Text_187B94, MSGBOX_AUTOCLOSE +Route19_EventScript_ConnieRematch:: @ 81AB666 + trainerbattle_rematch TRAINER_SWIMMER_FEMALE_CONNIE, Route19_Text_ConnieRematchIntro, Route19_Text_ConnieDefeat + msgbox Route19_Text_ConniePostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB67D:: @ 81AB67D - trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Text_187C32, Text_187C6F, Text_187CF2 +Route19_EventScript_Lia:: @ 81AB67D + trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LiaIntro, Route19_Text_LiaDefeat, Route19_Text_LiaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB6A8 - msgbox Text_187C9E, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_LiaRematch + msgbox Route19_Text_LiaPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB6A8:: @ 81AB6A8 - trainerbattle_rematch_double TRAINER_SIS_AND_BRO_LIA_LUC, Text_1C2F41, Text_187C6F, Text_187CF2 - msgbox Text_187C9E, MSGBOX_AUTOCLOSE +Route19_EventScript_LiaRematch:: @ 81AB6A8 + trainerbattle_rematch_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LiaRematchIntro, Route19_Text_LiaDefeat, Route19_Text_LiaNotEnoughMons + msgbox Route19_Text_LiaPostBattle, MSGBOX_AUTOCLOSE end -Route19_EventScript_1AB6C3:: @ 81AB6C3 - trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Text_187D45, Text_187D7E, Text_187DE8 +Route19_EventScript_Luc:: @ 81AB6C3 + trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LucIntro, Route19_Text_LucDefeat, Route19_Text_LucNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, TRUE - goto_if_eq EventScript_1AB6EE - msgbox Text_187DAD, MSGBOX_AUTOCLOSE + goto_if_eq Route19_EventScript_LucRematch + msgbox Route19_Text_LucPostBattle, MSGBOX_AUTOCLOSE end -EventScript_1AB6EE:: @ 81AB6EE - trainerbattle_rematch_double TRAINER_SIS_AND_BRO_LIA_LUC, Text_1C2FAE, Text_187D7E, Text_187DE8 - msgbox Text_187DAD, MSGBOX_AUTOCLOSE +Route19_EventScript_LucRematch:: @ 81AB6EE + trainerbattle_rematch_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LucRematchIntro, Route19_Text_LucDefeat, Route19_Text_LucNotEnoughMons + msgbox Route19_Text_LucPostBattle, MSGBOX_AUTOCLOSE end Route20_EventScript_Barry:: @ 81AB709 diff --git a/data/text/trainers.inc b/data/text/trainers.inc index 94b41ba41..6c13146c8 100644 --- a/data/text/trainers.inc +++ b/data/text/trainers.inc @@ -367,194 +367,194 @@ Route14_Text_JanRematchIntro:: @ 81C261B .string "JAN: KIRI, here we go!\n" .string "Let's win for sure this time!$" -Text_1C2650:: @ 81C2650 +Route15_Text_KindraRematchIntro:: @ 81C2650 .string "I'm going to keep battling with the\n" .string "POKéMON I got in trades.$" -Text_1C268D:: @ 81C268D +Route15_Text_BeckyRematchIntro:: @ 81C268D .string "You look gentle, so I think I can\n" .string "beat you.\p" .string "I'll give it one more go!$" -Text_1C26D3:: @ 81C26D3 +Route15_Text_EdwinRematchIntro:: @ 81C26D3 .string "When I whistle, bird POKéMON\n" .string "gather around.\p" .string "They're amazingly cute!$" -Text_1C2717:: @ 81C2717 +Route15_Text_ChesterRematchIntro:: @ 81C2717 .string "Hmm? My birds are shivering!\n" .string "Wait, aren't you that TRAINER…$" -Text_1C2753:: @ 81C2753 +Route15_Text_GraceRematchIntro:: @ 81C2753 .string "Oh, you're a little cutie!\n" .string "So like a darling POKéMON!\l" .string "I remember you now!$" -Text_1C279D:: @ 81C279D +Route15_Text_OliviaRematchIntro:: @ 81C279D .string "I raise POKéMON for protection\n" .string "because I live alone.\p" .string "That hasn't changed.$" -Text_1C27E7:: @ 81C27E7 +Route15_Text_ErnestRematchIntro:: @ 81C27E7 .string "Hey, kid! C'mon!\n" .string "I got these off some loser!$" -Text_1C2814:: @ 81C2814 +Route15_Text_AlexRematchIntro:: @ 81C2814 .string "Fork over all your cash when you\n" .string "lose to me, kid!$" -Text_1C2846:: @ 81C2846 +Route15_Text_CeliaRematchIntro:: @ 81C2846 .string "What's cool and happening?\n" .string "Trading POKéMON, of course.$" -Text_1C287D:: @ 81C287D +Route15_Text_YazminRematchIntro:: @ 81C287D .string "Want to play with my POKéMON\n" .string "again?$" -Text_1C28A1:: @ 81C28A1 +Route15_Text_MyaRematchIntro:: @ 81C28A1 .string "MYA: Hi, we keep meeting,\n" .string "don't we?\p" .string "Help me train my little brother\n" .string "again?$" -Text_1C28EC:: @ 81C28EC +Route15_Text_RonRematchIntro:: @ 81C28EC .string "RON: My sister's gotten more\n" .string "powerful…$" -Text_1C2913:: @ 81C2913 +Route16_Text_LaoRematchIntro:: @ 81C2913 .string "What do you want?$" -Text_1C2925:: @ 81C2925 +Route16_Text_KojiRematchIntro:: @ 81C2925 .string "Nice BIKE!\n" .string "Hand it over quick!$" -Text_1C2944:: @ 81C2944 +Route16_Text_LukeRematchIntro:: @ 81C2944 .string "Come out and play, little mouse.\n" .string "I'll treat you right!$" -Text_1C297B:: @ 81C297B +Route16_Text_HideoRematchIntro:: @ 81C297B .string "Hey, wait a second!\n" .string "Don't call me and then run away!$" -Text_1C29B0:: @ 81C29B0 +Route16_Text_CamronRematchIntro:: @ 81C29B0 .string "I'm feeling hungry and mean!\n" .string "I really need a punching bag!$" -Text_1C29EB:: @ 81C29EB +Route16_Text_RubenRematchIntro:: @ 81C29EB .string "Hey, there!\n" .string "We'll have ourselves a good time!$" -Text_1C2A19:: @ 81C2A19 +Route16_Text_JedRematchIntro:: @ 81C2A19 .string "JED: Are you here to see our\n" .string "love, which knows no bounds?$" -Text_1C2A53:: @ 81C2A53 +Route16_Text_LeaRematchIntro:: @ 81C2A53 .string "LEA: Sometimes, the intensity of\n" .string "our love scares me.$" -Text_1C2A88:: @ 81C2A88 +Route17_Text_RaulRematchIntro:: @ 81C2A88 .string "I told you, there's no getting rich\n" .string "quick in battling kids.$" -Text_1C2AC4:: @ 81C2AC4 +Route17_Text_IsaiahRematchIntro:: @ 81C2AC4 .string "I'm mighty proud of my bod, kiddo.\n" .string "Come on!$" -Text_1C2AF0:: @ 81C2AF0 +Route17_Text_VirgilRematchIntro:: @ 81C2AF0 .string "You out for a stroll?$" -Text_1C2B06:: @ 81C2B06 +Route17_Text_BillyRematchIntro:: @ 81C2B06 .string "We're BIKERS!\n" .string "We rule the roads, man!$" -Text_1C2B2C:: @ 81C2B2C +Route17_Text_NikolasRematchIntro:: @ 81C2B2C .string "VOLTORB's going to seriously\n" .string "electrify you today!$" -Text_1C2B5E:: @ 81C2B5E +Route17_Text_ZeekRematchIntro:: @ 81C2B5E .string "I leveled up my POKéMON, but it\n" .string "absolutely won't evolve. Why?$" -Text_1C2B9C:: @ 81C2B9C +Route17_Text_JamalRematchIntro:: @ 81C2B9C .string "Gaah! I really need to exercise\n" .string "and seriously trim some flab!$" -Text_1C2BDA:: @ 81C2BDA +Route17_Text_CoreyRematchIntro:: @ 81C2BDA .string "Be a rebel!$" -Text_1C2BE6:: @ 81C2BE6 +Route17_Text_JaxonRematchIntro:: @ 81C2BE6 .string "Yep, that's a nice BIKE!\n" .string "How's it handle?$" -Text_1C2C10:: @ 81C2C10 +Route17_Text_WilliamRematchIntro:: @ 81C2C10 .string "Get lost, kid!\n" .string "I'm bushed!$" -Text_1C2C2B:: @ 81C2C2B +Route18_Text_WiltonRematchIntro:: @ 81C2C2B .string "I've been checking every grassy\n" .string "area for new POKéMON.\p" .string "But it's not always easy…$" -Text_1C2C7B:: @ 81C2C7B +Route18_Text_RamiroRematchIntro:: @ 81C2C7B .string "Koorukukukoo!\n" .string "Is my birdcall getting better?$" -Text_1C2CA8:: @ 81C2CA8 +Route18_Text_JacobRematchIntro:: @ 81C2CA8 .string "I warned you before, this is my\n" .string "turf!\p" .string "I don't want you coming around.$" -Text_1C2CEE:: @ 81C2CEE +Route19_Text_RichardRematchIntro:: @ 81C2CEE .string "I'm almost warmed up to go\n" .string "out for a swim.$" -Text_1C2D19:: @ 81C2D19 +Route19_Text_ReeceRematchIntro:: @ 81C2D19 .string "Wait! Slow down!\n" .string "What if you have a heart attack?$" -Text_1C2D4B:: @ 81C2D4B +Route19_Text_MatthewRematchIntro:: @ 81C2D4B .string "I love swimming!\n" .string "I guess you're the surfing type.$" -Text_1C2D7D:: @ 81C2D7D +Route19_Text_DouglasRematchIntro:: @ 81C2D7D .string "What's beyond the horizon?\n" .string "Have you seen?$" -Text_1C2DA7:: @ 81C2DA7 +Route19_Text_DavidRematchIntro:: @ 81C2DA7 .string "I tried diving for POKéMON again,\n" .string "but it was a no-go like before.$" -Text_1C2DE9:: @ 81C2DE9 +Route19_Text_TonyRematchIntro:: @ 81C2DE9 .string "I look at the sea to forget all\n" .string "the bad things that happened.\p" .string "…Like losing to you the last time!$" -Text_1C2E4A:: @ 81C2E4A +Route19_Text_AnyaRematchIntro:: @ 81C2E4A .string "You always get to ride your\n" .string "POKéMON…\p" .string "It looks so relaxing.\n" .string "Can I have it if I win?$" -Text_1C2E9D:: @ 81C2E9D +Route19_Text_AliceRematchIntro:: @ 81C2E9D .string "Swimming's great!\n" .string "Sunburns aren't!$" -Text_1C2EC0:: @ 81C2EC0 +Route19_Text_AxleRematchIntro:: @ 81C2EC0 .string "These waters are treacherous!\n" .string "You shouldn't come back here!$" -Text_1C2EFC:: @ 81C2EFC +Route19_Text_ConnieRematchIntro:: @ 81C2EFC .string "I swam here with my friends…\n" .string "I'm tired…\l" .string "Must we really battle again?$" -Text_1C2F41:: @ 81C2F41 +Route19_Text_LiaRematchIntro:: @ 81C2F41 .string "LIA: You know my brother just\n" .string "became a TRAINER, right?\p" .string "I want to make him better, so I\n" .string "need your help again.$" -Text_1C2FAE:: @ 81C2FAE +Route19_Text_LucRematchIntro:: @ 81C2FAE .string "LUC: My big sis taught me all\n" .string "about POKéMON.\p" .string "I wonder if I'm better?$" diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index fa3a43fab..830e66d01 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -2,6 +2,14 @@ #define GUARD_METATILE_LABELS_H // gTileset_General +#define METATILE_General_Plain_Mowed 0x001 +#define METATILE_General_ThinTreeTop_Grass 0x00A +#define METATILE_General_WideTreeTopLeft_Grass 0x00B +#define METATILE_General_WideTreeTopRight_Grass 0x00C +#define METATILE_General_Plain_Grass 0x00D +#define METATILE_General_WideTreeTopLeft_Mowed 0x00E +#define METATILE_General_WideTreeTopRight_Mowed 0x00F +#define METATILE_General_ThinTreeTop_Mowed 0x013 #define METATILE_General_CalmWater 0x12B // gTileset_Mart @@ -162,4 +170,20 @@ #define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 #define METATILE_TrainerTower_CounterBarrier 0x2B4 +// gTileset_ViridianForest +#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 +#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 + +// gTileset_CeladonCity +#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 +#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E + +// gTileset_FuchsiaCity +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 + #endif // GUARD_METATILE_LABELS_H diff --git a/include/event_object_movement.h b/include/event_object_movement.h index b713dbd7d..baf66d737 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -117,6 +117,8 @@ bool32 RfuUnionObjectIsInvisible(u8 objectEventId); void RfuUnionObjectStartWarp(u8 objectEventId, u8 animNo); bool32 RfuUnionObjectIsWarping(u8 objectEventId); +void sub_805F378(s16 x, s16 y); + // Exported data declarations extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; @@ -124,5 +126,7 @@ extern const struct SpritePalette gUnknown_83A5348; extern const struct SpriteTemplate * const gFieldEffectObjectTemplatePointers[]; extern const struct OamData gObjectEventBaseOam_32x32; extern const struct UCoords16 gUnknown_83A64C8[]; +extern const u16 gUnknown_8398648[]; +extern const u16 gUnknown_8398688[]; #endif // GUARD_EVENT_OBJECT_MOVEMENT_H diff --git a/include/event_scripts.h b/include/event_scripts.h index f026cb57a..bf16ed2ec 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1201,4 +1201,7 @@ extern const u8 Text_MonSentToBoxBillsBoxFull[]; extern const u8 EventScript_BagItemCanBeRegistered[]; +// fldeff_cut +extern const u8 EventScript_FldEffCut[]; + #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_specials.h b/include/field_specials.h index 02069ff84..9653a9169 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -25,5 +25,7 @@ bool8 ShouldShowBoxWasFullMessage(void); u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr); u8 GetUnlockedSeviiAreas(void); u32 GetPlayerTrainerId(void); +bool8 CutMoveRuinValleyCheck(void); +void CutMoveOpenDottedHoleDoor(void); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 406ec2959..a8e31685f 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -19,6 +19,7 @@ u32 MapGridGetMetatileBehaviorAt(int, int); u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y); void MapGridSetMetatileIdAt(int, int, u16); void MapGridSetMetatileEntryAt(int, int, u16); +u8 MapGridGetZCoordAt(s32 x, s32 y); void GetCameraCoords(u16*, u16*); bool8 MapGridIsImpassableAt(s32, s32); s32 GetMapBorderIdAt(s32, s32); @@ -29,8 +30,8 @@ struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); void sub_8059948(u8 a0, u8 a1); void save_serialize_map(void); -u32 sub_8058F1C(u32 original, u8 bit); -u32 sub_8058F48(s16 x, s16 y, u8 z); +u32 GetMetatileAttributeFromRawMetatileBehavior(u32 original, u8 bit); +u32 MapGridGetMetatileAttributeAt(s16 x, s16 y, u8 attr); void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 arg2); #endif //GUARD_FIELDMAP_H diff --git a/include/fldeff.h b/include/fldeff.h index 51287f400..56e2dfbd9 100644 --- a/include/fldeff.h +++ b/include/fldeff.h @@ -10,7 +10,7 @@ gTasks[taskId].data[9] = (u32)func; extern struct MapPosition gPlayerFacingPosition; bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId); -u8 oei_task_add(void); +u8 CreateFieldEffectShowMon(void); // flash u8 sub_80C9DCC(u8 lightLevel, u8 mapType); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 2b7999092..57d8d0a35 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -17,6 +17,8 @@ enum typedef void (*TilesetCB)(void); +#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) + struct Tileset { /*0x00*/ bool8 isCompressed; diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index d567ab77c..f3195e6c9 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -114,7 +114,7 @@ bool8 MetatileBehavior_UnusedReturnFalse_10(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_11(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_12(u8 metatileBehavior); bool8 MetatileBehavior_UnusedReturnFalse_13(u8 metatileBehavior); -bool8 sub_805A2BC(u8 metatileBehavior, u8 playerDirection); +bool8 TestMetatileAttributeBit(u8 attr, u8 bitmask); bool8 MetatileBehavior_UnusedIsSpinRight(u8 metatileBehavior); bool8 MetatileBehavior_UnusedIsSpinLeft(u8 metatileBehavior); bool8 MetatileBehavior_UnusedIsSpinUp(u8 metatileBehavior); diff --git a/ld_script.txt b/ld_script.txt index 8c28a7b0e..aed18fed9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -131,7 +131,7 @@ SECTIONS { asm/pokemon_storage_system.o(.text); src/pokemon_icon.o(.text); src/script_movement.o(.text); - asm/fldeff_cut.o(.text); + src/fldeff_cut.o(.text); src/mail_data.o(.text); src/map_name_popup.o(.text); src/item_menu_icons.o(.text); @@ -449,7 +449,7 @@ SECTIONS { src/trainer_card.o(.rodata); data/pokemon_storage_system.o(.rodata); src/pokemon_icon.o(.rodata); - data/fldeff_cut.o(.rodata); + src/fldeff_cut.o(.rodata); src/map_name_popup.o(.rodata); src/item_menu_icons.o(.rodata); src/battle_anim_mon_movement.o(.rodata); diff --git a/src/field_fadetransition.c b/src/field_fadetransition.c index 6e937e026..16f691a2d 100644 --- a/src/field_fadetransition.c +++ b/src/field_fadetransition.c @@ -22,6 +22,7 @@ #include "event_object_lock.h" #include "start_menu.h" #include "constants/songs.h" +#include "constants/event_object_movement.h" static void sub_807DF4C(u8 a0); static void sub_807DFBC(u8 taskId); @@ -348,7 +349,7 @@ static void sub_807DFBC(u8 taskId) { PlayerGetDestCoords(&task->data[12], &task->data[13]); sub_807DCB0(TRUE); - ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], 16); + ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], MOVEMENT_ACTION_WALK_NORMAL_DOWN); task->data[0] = 8; } break; @@ -372,7 +373,7 @@ static void sub_807DFBC(u8 taskId) if (sub_807E418()) { sub_807DCB0(TRUE); - ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], 16); + ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], MOVEMENT_ACTION_WALK_NORMAL_DOWN); task->data[0] = 2; } break; @@ -752,7 +753,7 @@ static void sub_807E80C(u8 taskId) if (task->data[1] < 0 || gTasks[task->data[1]].isActive != TRUE) { ObjectEventClearAnimIfSpecialAnimActive(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]); - ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], 17); + ObjectEventSetHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)], MOVEMENT_ACTION_WALK_NORMAL_UP); task->data[0] = 2; } break; diff --git a/src/fieldmap.c b/src/fieldmap.c index 1f7d8b0b8..60ff70f10 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -16,37 +16,37 @@ struct ConnectionFlags }; static void InitMapLayoutData(struct MapHeader *mapHeader); -void map_copy_with_padding(u16 *map, u16 width, u16 height); -void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader); -void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); -void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); -void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); -void fillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); -void LoadSavedMapView(void); -struct MapConnection *sub_8059600(u8 direction, s32 x, s32 y); -bool8 sub_8059658(u8 direction, s32 x, s32 y, struct MapConnection *connection); -bool8 sub_80596BC(s32 x, s32 src_width, s32 dest_width, s32 offset); +static void map_copy_with_padding(u16 *map, u16 width, u16 height); +static void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader); +static void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); +static void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); +static void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); +static void fillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); +static void LoadSavedMapView(void); +static struct MapConnection *sub_8059600(u8 direction, s32 x, s32 y); +static bool8 sub_8059658(u8 direction, s32 x, s32 y, struct MapConnection *connection); +static bool8 sub_80596BC(s32 x, s32 src_width, s32 dest_width, s32 offset); struct BackupMapLayout VMap; -EWRAM_DATA u16 gBackupMapLayout[VIRTUAL_MAP_SIZE] = {}; +static EWRAM_DATA u16 gBackupMapLayout[VIRTUAL_MAP_SIZE] = {}; EWRAM_DATA struct MapHeader gMapHeader = {}; EWRAM_DATA struct Camera gCamera = {}; -EWRAM_DATA struct ConnectionFlags gMapConnectionFlags = {}; +static EWRAM_DATA struct ConnectionFlags gMapConnectionFlags = {}; -const struct ConnectionFlags sDummyConnectionFlags = {}; +static const struct ConnectionFlags sDummyConnectionFlags = {}; -const u32 gUnknown_8352EF0[] = { - 0x1ff, - 0x3e00, - 0x3c000, - 0xfc0000, - 0x7000000, +static const u32 sMetatileAttrMasks[] = { + 0x000001ff, + 0x00003e00, + 0x0003c000, + 0x00fc0000, + 0x07000000, 0x18000000, 0x60000000, 0x80000000 }; -const u8 gUnknown_8352F10[] = { +static const u8 sMetatileAttrShifts[] = { 0, 9, 14, @@ -87,7 +87,7 @@ static void InitMapLayoutData(struct MapHeader * mapHeader) mapheader_copy_mapdata_of_adjacent_maps(mapHeader); } -void map_copy_with_padding(u16 *map, u16 width, u16 height) +static void map_copy_with_padding(u16 *map, u16 width, u16 height) { s32 y; u16 *dest = VMap.map; @@ -101,7 +101,7 @@ void map_copy_with_padding(u16 *map, u16 width, u16 height) } } -void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader) +static void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader) { s32 count; struct MapConnection *connection; @@ -147,7 +147,7 @@ void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader) } } -void sub_8058B54(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x2, s32 y2, s32 width, s32 height) +static void sub_8058B54(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x2, s32 y2, s32 width, s32 height) { s32 i; u16 *src; @@ -166,7 +166,7 @@ void sub_8058B54(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x } } -void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) +static void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) { s32 x, y; s32 x2; @@ -213,7 +213,7 @@ void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader con } } -void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) +static void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) { s32 x; s32 x2, y2; @@ -262,7 +262,7 @@ void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader con } } -void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) +static void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) { s32 y; s32 x2, y2; @@ -308,7 +308,7 @@ void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader cons } } -void fillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) +static void fillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset) { s32 x, y; s32 y2; @@ -443,28 +443,28 @@ u32 MapGridGetMetatileIdAt(s32 x, s32 y) return block & 0x3FF; } -u32 sub_8058F1C(u32 original, u8 bit) +u32 GetMetatileAttributeFromRawMetatileBehavior(u32 original, u8 bit) { if (bit >= 8) return original; - return (original & gUnknown_8352EF0[bit]) >> gUnknown_8352F10[bit]; + return (original & sMetatileAttrMasks[bit]) >> sMetatileAttrShifts[bit]; } -u32 sub_8058F48(s16 x, s16 y, u8 z) +u32 MapGridGetMetatileAttributeAt(s16 x, s16 y, u8 attr) { u16 metatileId = MapGridGetMetatileIdAt(x, y); - return GetBehaviorByMetatileIdAndMapLayout(gMapHeader.mapLayout, metatileId, z); + return GetBehaviorByMetatileIdAndMapLayout(gMapHeader.mapLayout, metatileId, attr); } u32 MapGridGetMetatileBehaviorAt(s32 x, s32 y) { - return sub_8058F48(x, y, 0); + return MapGridGetMetatileAttributeAt(x, y, 0); } u8 MapGridGetMetatileLayerTypeAt(s16 x, s16 y) { - return sub_8058F48(x, y, 6); + return MapGridGetMetatileAttributeAt(x, y, 6); } void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatile) @@ -512,12 +512,12 @@ u32 GetBehaviorByMetatileIdAndMapLayout(struct MapLayout *mapLayout, u16 metatil if (metatile < NUM_METATILES_IN_PRIMARY) { attributes = mapLayout->primaryTileset->metatileAttributes; - return sub_8058F1C(attributes[metatile], attr); + return GetMetatileAttributeFromRawMetatileBehavior(attributes[metatile], attr); } else if (metatile < 0x400) { attributes = mapLayout->secondaryTileset->metatileAttributes; - return sub_8058F1C(attributes[metatile - NUM_METATILES_IN_PRIMARY], attr); + return GetMetatileAttributeFromRawMetatileBehavior(attributes[metatile - NUM_METATILES_IN_PRIMARY], attr); } else { @@ -544,7 +544,7 @@ void save_serialize_map(void) } } -bool32 SavedMapViewIsEmpty(void) +static bool32 SavedMapViewIsEmpty(void) { u16 i; u32 marker = 0; @@ -559,12 +559,12 @@ bool32 SavedMapViewIsEmpty(void) return FALSE; } -void ClearSavedMapView(void) +static void ClearSavedMapView(void) { CpuFill16(0, gSaveBlock2Ptr->mapView, sizeof(gSaveBlock2Ptr->mapView)); } -void LoadSavedMapView(void) +static void LoadSavedMapView(void) { s32 i, j; s32 x, y; @@ -588,7 +588,7 @@ void LoadSavedMapView(void) } } -void sub_8059250(u8 a1) +static void sub_8059250(u8 a1) { s32 width; u16 *mapView; @@ -690,7 +690,7 @@ s32 GetMapBorderIdAt(s32 x, s32 y) return 0; } -s32 GetPostCameraMoveMapBorderId(s32 x, s32 y) +static s32 GetPostCameraMoveMapBorderId(s32 x, s32 y) { return GetMapBorderIdAt(7 + gSaveBlock1Ptr->pos.x + x, 7 + gSaveBlock1Ptr->pos.y + y); } @@ -708,7 +708,7 @@ bool32 CanCameraMoveInDirection(s32 direction) return TRUE; } -void sub_80594AC(struct MapConnection *connection, int direction, s32 x, s32 y) +static void sub_80594AC(struct MapConnection *connection, int direction, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = mapconnection_get_mapheader(connection); @@ -779,7 +779,7 @@ struct MapConnection *sub_8059600(u8 direction, s32 x, s32 y) } -bool8 sub_8059658(u8 direction, s32 x, s32 y, struct MapConnection *connection) +static bool8 sub_8059658(u8 direction, s32 x, s32 y, struct MapConnection *connection) { struct MapHeader const *mapHeader; mapHeader = mapconnection_get_mapheader(connection); @@ -795,7 +795,7 @@ bool8 sub_8059658(u8 direction, s32 x, s32 y, struct MapConnection *connection) return FALSE; } -bool8 sub_80596BC(s32 x, s32 src_width, s32 dest_width, s32 offset) +static bool8 sub_80596BC(s32 x, s32 src_width, s32 dest_width, s32 offset) { s32 offset2 = max(offset, 0); @@ -808,7 +808,7 @@ bool8 sub_80596BC(s32 x, s32 src_width, s32 dest_width, s32 offset) return FALSE; } -bool32 sub_80596E8(s32 x, s32 width) +static bool32 sub_80596E8(s32 x, s32 width) { if (x >= 0 && x < width) return TRUE; @@ -816,7 +816,7 @@ bool32 sub_80596E8(s32 x, s32 width) return FALSE; } -s32 sub_80596FC(struct MapConnection *connection, s32 x, s32 y) +static s32 sub_80596FC(struct MapConnection *connection, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = mapconnection_get_mapheader(connection); @@ -878,7 +878,7 @@ void GetCameraFocusCoords(u16 *x, u16 *y) *y = gSaveBlock1Ptr->pos.y + 7; } -void SetCameraCoords(u16 x, u16 y) +static void SetCameraCoords(u16 x, u16 y) { gSaveBlock1Ptr->pos.x = x; gSaveBlock1Ptr->pos.y = y; @@ -889,7 +889,7 @@ void GetCameraCoords(u16 *x, u16 *y) *x = gSaveBlock1Ptr->pos.x; *y = gSaveBlock1Ptr->pos.y; } -void copy_tileset_patterns_to_vram(struct Tileset const *tileset, u16 numTiles, u16 offset) +static void copy_tileset_patterns_to_vram(struct Tileset const *tileset, u16 numTiles, u16 offset) { if (tileset) { @@ -900,7 +900,7 @@ void copy_tileset_patterns_to_vram(struct Tileset const *tileset, u16 numTiles, } } -void copy_tileset_patterns_to_vram2(struct Tileset const *tileset, u16 numTiles, u16 offset) +static void copy_tileset_patterns_to_vram2(struct Tileset const *tileset, u16 numTiles, u16 offset) { if (tileset) { @@ -911,7 +911,7 @@ void copy_tileset_patterns_to_vram2(struct Tileset const *tileset, u16 numTiles, } } -void sub_80598CC(u16 a0, u16 a1) +static void sub_80598CC(u16 a0, u16 a1) { switch (gUnknown_2036E28) { @@ -955,7 +955,7 @@ void sub_8059948(u8 a0, u8 a1) CpuFastCopy(gPlttBufferUnfaded + a0 * 16, gPlttBufferFaded + a0 * 16, a1 * 16 * sizeof(u16)); } -void apply_map_tileset_palette(struct Tileset const *tileset, u16 destOffset, u16 size) +static void apply_map_tileset_palette(struct Tileset const *tileset, u16 destOffset, u16 size) { u16 black = RGB_BLACK; diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c new file mode 100644 index 000000000..8617a1aaa --- /dev/null +++ b/src/fldeff_cut.c @@ -0,0 +1,299 @@ +#include "global.h" +#include "gflib.h" +#include "event_object_lock.h" +#include "event_object_movement.h" +#include "event_scripts.h" +#include "fieldmap.h" +#include "field_camera.h" +#include "field_specials.h" +#include "fldeff.h" +#include "field_effect.h" +#include "field_player_avatar.h" +#include "metatile_behavior.h" +#include "overworld.h" +#include "party_menu.h" +#include "script.h" +#include "trig.h" +#include "constants/event_objects.h" +#include "constants/songs.h" +#include "constants/metatile_labels.h" + +#define CUT_GRASS_SPRITE_COUNT 8 + +static EWRAM_DATA u8 *sCutGrassSpriteArrayPtr = NULL; +static EWRAM_DATA bool8 sScheduleOpenDottedHole = FALSE; + +static void FieldCallback_CutGrass(void); +static void FieldCallback_CutTree(void); +static void FieldMoveCallback_CutGrass(void); +static void SetCutGrassMetatileAt(s16 x, s16 y); +static void SpriteCallback_CutGrass_Init(struct Sprite * sprite); +static void SpriteCallback_CutGrass_Run(struct Sprite * sprite); +static void SpriteCallback_CutGrass_Cleanup(struct Sprite * sprite); +static void FieldMoveCallback_CutTree(void); + +static const u16 sCutGrassMetatileMapping[][2] = { + { + METATILE_ID(General, Plain_Grass), + METATILE_ID(General, Plain_Mowed) + }, { + METATILE_ID(General, ThinTreeTop_Grass), + METATILE_ID(General, ThinTreeTop_Mowed) + }, { + METATILE_ID(General, WideTreeTopLeft_Grass), + METATILE_ID(General, WideTreeTopLeft_Mowed) + }, { + METATILE_ID(General, WideTreeTopRight_Grass), + METATILE_ID(General, WideTreeTopRight_Mowed) + }, { + METATILE_ID(CeladonCity, CyclingRoad_Grass), + METATILE_ID(CeladonCity, CyclingRoad_Mowed) + }, { + METATILE_ID(FuchsiaCity, SafariZoneTreeTopLeft_Grass), + METATILE_ID(FuchsiaCity, SafariZoneTreeTopLeft_Mowed) + }, { + METATILE_ID(FuchsiaCity, SafariZoneTreeTopMiddle_Grass), + METATILE_ID(FuchsiaCity, SafariZoneTreeTopMiddle_Mowed) + }, { + METATILE_ID(FuchsiaCity, SafariZoneTreeTopRight_Grass), + METATILE_ID(FuchsiaCity, SafariZoneTreeTopRight_Mowed) + }, { + METATILE_ID(ViridianForest, HugeTreeTopMiddle_Grass), + METATILE_ID(ViridianForest, HugeTreeTopMiddle_Mowed) + }, { + 0xffff, + 0xffff + } +}; + +static const struct OamData sOamData_FldEff_CutGrass = { + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0x001, + .priority = 1, + .paletteNum = 0x1, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_Fldeff_CutGrass_0[] = { + ANIMCMD_FRAME(0, 30), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sSpriteAnimTable_FldEff_CutGrass[] = { + sSpriteAnim_Fldeff_CutGrass_0 +}; + +static const struct SpriteFrameImage sSpriteFrameImages_FldEff_CutGrass[] = { + {gUnknown_8398648, 0x20} +}; + +const struct SpritePalette gFldEffPalette_CutGrass[] = { + gUnknown_8398688, 4096 +}; + +static const struct SpriteTemplate sSpriteTemplate_FldEff_CutGrass = { + .tileTag = 0xFFFF, + .paletteTag = 4096, + .oam = &sOamData_FldEff_CutGrass, + .anims = sSpriteAnimTable_FldEff_CutGrass, + .images = sSpriteFrameImages_FldEff_CutGrass, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallback_CutGrass_Init +}; + +static u8 MetatileAtCoordsIsGrassTile(s16 x, s16 y) +{ + return TestMetatileAttributeBit(MapGridGetMetatileAttributeAt(x, y, 1), 1); +} + +bool8 SetUpFieldMove_Cut(void) +{ + s16 x, y; + u8 i, j; + sScheduleOpenDottedHole = FALSE; + if (CutMoveRuinValleyCheck() == TRUE) + { + sScheduleOpenDottedHole = TRUE; + gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; + gPostMenuFieldCallback = FieldCallback_CutGrass; + return TRUE; + } + + if (CheckObjectGraphicsInFrontOfPlayer(OBJ_EVENT_GFX_CUT_TREE) == TRUE) + { + gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; + gPostMenuFieldCallback = FieldCallback_CutTree; + return TRUE; + } + else + { + // FIXME: this fakematch + register s32 neg1 asm("r8"); + struct MapPosition *pos; + PlayerGetDestCoords(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); + + for (i = 0, pos = &gPlayerFacingPosition, neg1 = 0xFFFF; i < 3; i++) + { + + y = i + neg1 + pos->y; + for (j = 0; j < 3; j++) + { + x = j + neg1 + pos->x; + if (MapGridGetZCoordAt(x, y) == pos->height) + { + if (MetatileAtCoordsIsGrassTile(x, y) == TRUE) + { + gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; + gPostMenuFieldCallback = FieldCallback_CutGrass; + return TRUE; + } + } + } + } + return FALSE; + } +} + +static void FieldCallback_CutGrass(void) +{ + FieldEffectStart(FLDEFF_USE_CUT_ON_GRASS); + gFieldEffectArguments[0] = GetCursorSelectionMonId(); +} + +bool8 FldEff_UseCutOnGrass(void) +{ + u8 taskId = CreateFieldEffectShowMon(); + FLDEFF_SET_FUNC_TO_DATA(FieldMoveCallback_CutGrass); + IncrementGameStat(GAME_STAT_USED_CUT); + return FALSE; +} + +static void FieldCallback_CutTree(void) +{ + gFieldEffectArguments[0] = GetCursorSelectionMonId(); + ScriptContext1_SetupScript(EventScript_FldEffCut); +} + +bool8 FldEff_UseCutOnTree(void) +{ + u8 taskId = CreateFieldEffectShowMon(); + FLDEFF_SET_FUNC_TO_DATA(FieldMoveCallback_CutTree); + IncrementGameStat(GAME_STAT_USED_CUT); + return FALSE; +} + +static void FieldMoveCallback_CutGrass(void) +{ + FieldEffectActiveListRemove(FLDEFF_USE_CUT_ON_GRASS); + if (sScheduleOpenDottedHole == TRUE) + CutMoveOpenDottedHoleDoor(); + else + FieldEffectStart(FLDEFF_CUT_GRASS); +} + +bool8 FldEff_CutGrass(void) +{ + u8 i, j; + s16 x, y; + // FIXME: this fakematch + register s32 neg1 asm("r9"); + struct MapPosition *pos; + + i = 0; + PlaySE(SE_W015); + PlayerGetDestCoords(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); + + for (i = 0, pos = &gPlayerFacingPosition, neg1 = 0xFFFF; i < 3; i++) + { + + y = i + neg1 + pos->y; + for (j = 0; j < 3; j++) + { + x = j + neg1 + pos->x; + if (MapGridGetZCoordAt(x, y) == pos->height) + { + if (MetatileAtCoordsIsGrassTile(x, y) == TRUE) + { + SetCutGrassMetatileAt(x, y); + sub_805F378(x, y); + } + } + } + } + DrawWholeMapView(); + sCutGrassSpriteArrayPtr = Alloc(CUT_GRASS_SPRITE_COUNT); + for (i = 0; i < 8; i++) + { + sCutGrassSpriteArrayPtr[i] = CreateSprite(&sSpriteTemplate_FldEff_CutGrass, gSprites[gPlayerAvatar.spriteId].oam.x + 8, gSprites[gPlayerAvatar.spriteId].oam.y + 20, 0); + gSprites[sCutGrassSpriteArrayPtr[i]].data[2] = i * (0x100 / CUT_GRASS_SPRITE_COUNT); + } + return FALSE; +} + +static void SetCutGrassMetatileAt(s16 x, s16 y) +{ + u16 i = 0; + u16 metatileId = MapGridGetMetatileIdAt(x, y); + while (1) + { + if (sCutGrassMetatileMapping[i][0] == 0xFFFF) + return; + if (sCutGrassMetatileMapping[i][0] == metatileId) + { + MapGridSetMetatileIdAt(x, y, sCutGrassMetatileMapping[i][1]); + break; + } + i++; + } +} + +static void SpriteCallback_CutGrass_Init(struct Sprite * sprite) +{ + sprite->data[0] = 8; + sprite->data[1] = 0; + sprite->data[3] = 0; + sprite->callback = SpriteCallback_CutGrass_Run; +} + +static void SpriteCallback_CutGrass_Run(struct Sprite * sprite) +{ + sprite->pos2.x = Sin(sprite->data[2], sprite->data[0]); + sprite->pos2.y = Cos(sprite->data[2], sprite->data[0]); + sprite->data[2] += 8; + sprite->data[2] &= 0xFF; + sprite->data[0]++; + sprite->data[0] += sprite->data[3] >> 2; + sprite->data[3]++; + if (sprite->data[1] != 28) + sprite->data[1]++; + else + sprite->callback = SpriteCallback_CutGrass_Cleanup; +} + +static void SpriteCallback_CutGrass_Cleanup(struct Sprite * sprite) +{ + u8 i; + for (i = 1; i < CUT_GRASS_SPRITE_COUNT; i++) + { + DestroySprite(&gSprites[sCutGrassSpriteArrayPtr[i]]); + } + FieldEffectStop(&gSprites[sCutGrassSpriteArrayPtr[0]], FLDEFF_CUT_GRASS); + Free(sCutGrassSpriteArrayPtr); + sub_80696C0(); + ScriptContext2_Disable(); +} + +static void FieldMoveCallback_CutTree(void) +{ + PlaySE(SE_W015); + FieldEffectActiveListRemove(FLDEFF_USE_CUT_ON_TREE); + EnableBothScriptContexts(); +} diff --git a/src/fldeff_dig.c b/src/fldeff_dig.c index 9e1686468..0eb0d3c1e 100644 --- a/src/fldeff_dig.c +++ b/src/fldeff_dig.c @@ -29,7 +29,7 @@ static void FieldCallback_Dig(void) bool8 FldEff_UseDig(void) { - u8 taskId = oei_task_add(); + u8 taskId = CreateFieldEffectShowMon(); FLDEFF_SET_FUNC_TO_DATA(sub_80C9AFC); SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT); diff --git a/src/fldeff_rocksmash.c b/src/fldeff_rocksmash.c index 058922f06..397741806 100644 --- a/src/fldeff_rocksmash.c +++ b/src/fldeff_rocksmash.c @@ -12,12 +12,13 @@ #include "event_object_movement.h" #include "constants/songs.h" #include "constants/event_objects.h" +#include "constants/event_object_movement.h" #include "constants/maps.h" -static void task08_080C9820(u8 taskId); -static void sub_80C98FC(u8 taskId); -static void sub_80C98B0(u8 taskId); -static void sub_80C99A0(u8 taskId); +static void Task_FieldEffectShowMon_Init(u8 taskId); +static void Task_FieldEffectShowMon_WaitFldeff(u8 taskId); +static void Task_FieldEffectShowMon_WaitPlayerAnim(u8 taskId); +static void Task_FieldEffectShowMon_Cleanup(u8 taskId); static void sub_80C9A10(void); static void sub_80C9A60(void); @@ -36,13 +37,13 @@ bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId) return TRUE; } -u8 oei_task_add(void) +u8 CreateFieldEffectShowMon(void) { GetXYCoordsOneStepInFrontOfPlayer(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); - return CreateTask(task08_080C9820, 8); + return CreateTask(Task_FieldEffectShowMon_Init, 8); } -static void task08_080C9820(u8 taskId) +static void Task_FieldEffectShowMon_Init(u8 taskId) { u8 mapObjId; @@ -54,48 +55,49 @@ static void task08_080C9820(u8 taskId) { if (gMapHeader.mapType == MAP_TYPE_UNDERWATER) { + // Leftover from RS, inhibits the player anim while underwater. FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT); - gTasks[taskId].func = sub_80C98FC; + gTasks[taskId].func = Task_FieldEffectShowMon_WaitFldeff; } else { sub_805CB70(); - ObjectEventSetHeldMovement(&gObjectEvents[mapObjId], 0x45); - gTasks[taskId].func = sub_80C98B0; + ObjectEventSetHeldMovement(&gObjectEvents[mapObjId], MOVEMENT_ACTION_UNKNOWN_STEP_45); + gTasks[taskId].func = Task_FieldEffectShowMon_WaitPlayerAnim; } } } -static void sub_80C98B0(u8 taskId) +static void Task_FieldEffectShowMon_WaitPlayerAnim(u8 taskId) { if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[gPlayerAvatar.objectEventId]) == TRUE) { FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT); - gTasks[taskId].func = sub_80C98FC; + gTasks[taskId].func = Task_FieldEffectShowMon_WaitFldeff; } } -static void sub_80C98FC(u8 taskId) +static void Task_FieldEffectShowMon_WaitFldeff(u8 taskId) { if (!FieldEffectActiveListContains(FLDEFF_FIELD_MOVE_SHOW_MON)) { gFieldEffectArguments[1] = GetPlayerFacingDirection(); - if (gFieldEffectArguments[1] == 1) + if (gFieldEffectArguments[1] == DIR_SOUTH) gFieldEffectArguments[2] = 0; - if (gFieldEffectArguments[1] == 2) + if (gFieldEffectArguments[1] == DIR_NORTH) gFieldEffectArguments[2] = 1; - if (gFieldEffectArguments[1] == 3) + if (gFieldEffectArguments[1] == DIR_WEST) gFieldEffectArguments[2] = 2; - if (gFieldEffectArguments[1] == 4) + if (gFieldEffectArguments[1] == DIR_EAST) gFieldEffectArguments[2] = 3; ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByCurrentState()); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], gFieldEffectArguments[2]); - FieldEffectActiveListRemove(6); - gTasks[taskId].func = sub_80C99A0; + FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON); + gTasks[taskId].func = Task_FieldEffectShowMon_Cleanup; } } -static void sub_80C99A0(u8 taskId) +static void Task_FieldEffectShowMon_Cleanup(u8 taskId) { FLDEFF_CALL_FUNC_IN_DATA(); gPlayerAvatar.unk6 = FALSE; @@ -121,7 +123,7 @@ static void sub_80C9A10(void) bool8 FldEff_UseRockSmash(void) { - u8 taskId = oei_task_add(); + u8 taskId = CreateFieldEffectShowMon(); FLDEFF_SET_FUNC_TO_DATA(sub_80C9A60); IncrementGameStat(GAME_STAT_USED_ROCK_SMASH); diff --git a/src/fldeff_strength.c b/src/fldeff_strength.c index 230b9c751..712d9f1c6 100644 --- a/src/fldeff_strength.c +++ b/src/fldeff_strength.c @@ -33,7 +33,7 @@ static void FldEff_UseStrength(void) bool8 sub_80D0860(void) { - u8 taskId = oei_task_add(); + u8 taskId = CreateFieldEffectShowMon(); FLDEFF_SET_FUNC_TO_DATA(sub_80D08A8); GetMonNickname(&gPlayerParty[gFieldEffectArguments[0]], gStringVar1); return FALSE; diff --git a/src/fldeff_sweetscent.c b/src/fldeff_sweetscent.c index 45c471e95..d827aff4d 100644 --- a/src/fldeff_sweetscent.c +++ b/src/fldeff_sweetscent.c @@ -43,7 +43,7 @@ bool8 FldEff_SweetScent(void) u8 taskId; SetWeatherScreenFadeOut(); - taskId = oei_task_add(); + taskId = CreateFieldEffectShowMon(); FLDEFF_SET_FUNC_TO_DATA(StartSweetScentFieldEffect); return FALSE; } diff --git a/src/fldeff_teleport.c b/src/fldeff_teleport.c index a66a332bf..44a7af732 100644 --- a/src/fldeff_teleport.c +++ b/src/fldeff_teleport.c @@ -28,7 +28,7 @@ static void FieldCallback_Teleport(void) bool8 FldEff_UseTeleport(void) { - u8 taskId = oei_task_add(); + u8 taskId = CreateFieldEffectShowMon(); FLDEFF_SET_FUNC_TO_DATA(StartTeleportFieldEffect); SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT); return FALSE; diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 8e07c1c97..7c05d1dde 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -16,39 +16,12 @@ static const bool8 sTileSurfable[METATILE_COUNT] = { [MB_SOUTHWARD_CURRENT] = TRUE }; -static const u8 sTileBitAttributes[] = { - 0x00, - 0x01, - 0x02, - 0x04, - 0x08, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00 +static const u8 sTileBitAttributes[32] = { + [0] = 0x00, + [1] = 0x01, + [2] = 0x02, + [3] = 0x04, + [4] = 0x08, }; bool8 MetatileBehavior_UnusedReturnTrue(u8 metatileBehavior) @@ -769,7 +742,7 @@ bool8 MetatileBehavior_UnusedReturnFalse_11(u8 metatileBehavior) { return FALSE; bool8 MetatileBehavior_UnusedReturnFalse_12(u8 metatileBehavior) { return FALSE; } bool8 MetatileBehavior_UnusedReturnFalse_13(u8 metatileBehavior) { return FALSE; } -bool8 sub_805A2BC(u8 arg1, u8 arg2) +bool8 TestMetatileAttributeBit(u8 arg1, u8 arg2) { if(sTileBitAttributes[arg1] & arg2) return TRUE; diff --git a/src/quest_log.c b/src/quest_log.c index b747dd8b6..6e70ceea8 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -113,7 +113,7 @@ static EWRAM_DATA u16 *gUnknown_203AE90 = NULL; static EWRAM_DATA struct UnkStruct_203AE94 gUnknown_203AE94 = {0}; static EWRAM_DATA struct UnkStruct_203AE98 gUnknown_203AE98[32] = {0}; static EWRAM_DATA u16 sQuestLogIdx = 0; -static EWRAM_DATA u8 gUnknown_203AF9A[64][2] = {{0}}; +static EWRAM_DATA u8 sMovementScripts[64][2] = {{0}}; static EWRAM_DATA u16 gUnknown_203B01A = 0; static EWRAM_DATA u16 gUnknown_203B01C = 0; static EWRAM_DATA u16 sFlagOrVarPlayhead = 0; @@ -1551,24 +1551,24 @@ void sub_811246C(struct Sprite *sprite) struct ObjectEvent *objectEvent = &gObjectEvents[sprite->data[0]]; if (objectEvent->localId == OBJ_EVENT_ID_PLAYER) { - if (gUnknown_203AF9A[0][0] != OBJ_EVENT_ID_PLAYER) + if (sMovementScripts[0][0] != 0xFF) { - ObjectEventSetHeldMovement(objectEvent, gUnknown_203AF9A[0][0]); - gUnknown_203AF9A[0][0] = OBJ_EVENT_ID_PLAYER; + ObjectEventSetHeldMovement(objectEvent, sMovementScripts[0][0]); + sMovementScripts[0][0] = 0xFF; } - if (gUnknown_203AF9A[0][1] != OBJ_EVENT_ID_PLAYER) + if (sMovementScripts[0][1] != OBJ_EVENT_ID_PLAYER) { sub_8150454(); - gUnknown_203AF9A[0][1] = OBJ_EVENT_ID_PLAYER; + sMovementScripts[0][1] = OBJ_EVENT_ID_PLAYER; } sub_8063E28(objectEvent, sprite); } else { - if (gUnknown_203AF9A[objectEvent->localId][0] != OBJ_EVENT_ID_PLAYER) + if (sMovementScripts[objectEvent->localId][0] != 0xFF) { - ObjectEventSetHeldMovement(objectEvent, gUnknown_203AF9A[objectEvent->localId][0]); - gUnknown_203AF9A[objectEvent->localId][0] = OBJ_EVENT_ID_PLAYER; + ObjectEventSetHeldMovement(objectEvent, sMovementScripts[objectEvent->localId][0]); + sMovementScripts[objectEvent->localId][0] = 0xFF; } sub_8063E28(objectEvent, sprite); } @@ -1736,15 +1736,15 @@ static void sub_8112940(u8 a0, struct UnkStruct_203AE98 *a1, u16 a2) sNumQuestLogs = a2 / 8; for (i = 0; i < 0x40; i++) { - gUnknown_203AF9A[i][0] |= 0xFF; - gUnknown_203AF9A[i][1] |= 0xFF; + sMovementScripts[i][0] |= 0xFF; + sMovementScripts[i][1] |= 0xFF; } sQuestLogIdx = 0; gUnknown_203B01C = 0; gUnknown_3005E90 = (struct UnkStruct_3005E90){}; gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; - gUnknown_203AF9A[0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; - gUnknown_203AF9A[0][1] = 0xFF; + sMovementScripts[0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + sMovementScripts[0][1] = 0xFF; gUnknown_3005E88 = 1; break; case 2: @@ -1807,10 +1807,10 @@ void sub_8112B3C(void) switch (gUnknown_3005E94[sQuestLogIdx].unk_6) { case 0: - gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + sMovementScripts[gUnknown_3005E94[sQuestLogIdx].unk_0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; break; case 1: - gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][1] = gUnknown_3005E94[sQuestLogIdx].unk_3; + sMovementScripts[gUnknown_3005E94[sQuestLogIdx].unk_0][1] = gUnknown_3005E94[sQuestLogIdx].unk_3; break; case 2: *(u32 *)&gUnknown_3005E90 = ((gUnknown_3005E94[sQuestLogIdx].unk_3 << 24) | (gUnknown_3005E94[sQuestLogIdx].unk_2 << 16) | (gUnknown_3005E94[sQuestLogIdx].unk_1 << 8) | (gUnknown_3005E94[sQuestLogIdx].unk_0 << 0)); diff --git a/src/wild_encounter.c b/src/wild_encounter.c index b32eb583a..b3605db47 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -367,11 +367,11 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi headerId = GetCurrentMapWildMonHeaderId(); if (headerId != 0xFFFF) { - if (sub_8058F1C(currMetatileBehavior, 4) == TRUE) + if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 4) == TRUE) { if (gWildMonHeaders[headerId].landMonsInfo == NULL) return FALSE; - else if (previousMetatileBehavior != sub_8058F1C(currMetatileBehavior, 0) && !DoGlobalWildEncounterDiceRoll()) + else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0) && !DoGlobalWildEncounterDiceRoll()) return FALSE; if (DoWildEncounterRateTest(gWildMonHeaders[headerId].landMonsInfo->encounterRate, FALSE) != TRUE) { @@ -405,12 +405,12 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi } } } - else if (sub_8058F1C(currMetatileBehavior, 4) == 2 - || (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridge(sub_8058F1C(currMetatileBehavior, 0)) == TRUE)) + else if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 4) == 2 + || (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridge(GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0)) == TRUE)) { if (gWildMonHeaders[headerId].waterMonsInfo == NULL) return FALSE; - else if (previousMetatileBehavior != sub_8058F1C(currMetatileBehavior, 0) && !DoGlobalWildEncounterDiceRoll()) + else if (previousMetatileBehavior != GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0) && !DoGlobalWildEncounterDiceRoll()) return FALSE; else if (DoWildEncounterRateTest(gWildMonHeaders[headerId].waterMonsInfo->encounterRate, FALSE) != TRUE) { @@ -474,7 +474,7 @@ bool8 SweetScentWildEncounter(void) headerId = GetCurrentMapWildMonHeaderId(); if (headerId != 0xFFFF) { - if (sub_8058F48(x, y, 4) == 1) + if (MapGridGetMetatileAttributeAt(x, y, 4) == 1) { if (TryStartRoamerEncounter() == TRUE) { @@ -490,7 +490,7 @@ bool8 SweetScentWildEncounter(void) BattleSetup_StartWildBattle(); return TRUE; } - else if (sub_8058F48(x, y, 4) == 2) + else if (MapGridGetMetatileAttributeAt(x, y, 4) == 2) { if (TryStartRoamerEncounter() == TRUE) { @@ -711,7 +711,7 @@ void ResetEncounterRateModifiers(void) static bool8 HandleWildEncounterCooldown(u32 currMetatileBehavior) { - u8 unk = sub_8058F1C(currMetatileBehavior, 4); + u8 unk = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 4); u32 minSteps; u32 encRate; if (unk == 0) @@ -763,19 +763,19 @@ bool8 TryStandardWildEncounter(u32 currMetatileBehavior) { if (!HandleWildEncounterCooldown(currMetatileBehavior)) { - sWildEncounterData.prevMetatileBehavior = sub_8058F1C(currMetatileBehavior, 0); + sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0); return FALSE; } else if (StandardWildEncounter(currMetatileBehavior, sWildEncounterData.prevMetatileBehavior) == TRUE) { sWildEncounterData.encounterRateBuff = 0; sWildEncounterData.stepsSinceLastEncounter = 0; - sWildEncounterData.prevMetatileBehavior = sub_8058F1C(currMetatileBehavior, 0); + sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0); return TRUE; } else { - sWildEncounterData.prevMetatileBehavior = sub_8058F1C(currMetatileBehavior, 0); + sWildEncounterData.prevMetatileBehavior = GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, 0); return FALSE; } } diff --git a/sym_ewram.txt b/sym_ewram.txt index d7cd885f2..af88aba94 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -218,14 +218,8 @@ gUnknown_203982C: @ 203982C .align 2 .include "src/script_movement.o" - .align 2 -gUnknown_2039870: @ 2039870 - .space 0x4 - -gUnknown_2039874: @ 2039874 - .space 0x4 - + .include "src/fldeff_cut.o" .align 2 .include "src/item_menu_icons.o" |