pokeemerald/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc

319 lines
9.9 KiB
PHP
Raw Normal View History

.set LOCALID_RIVAL, 1
2017-11-10 02:21:31 +01:00
LittlerootTown_BrendansHouse_2F_MapScripts:: @ 81F83E3
map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_2F_OnTransition
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_BrendansHouse_2F_OnWarp
2017-11-10 02:21:31 +01:00
.byte 0
LittlerootTown_BrendansHouse_2F_OnTransition: @ 81F83EE
compare VAR_LITTLEROOT_RIVAL_STATE, 2
call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan
compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos
compare VAR_LITTLEROOT_INTRO_STATE, 4
call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
call SecretBase_EventScript_SetDecorationFlags
2019-02-27 21:18:56 +01:00
setvar VAR_SECRET_BASE_INITIALIZED, 0
2017-11-10 02:21:31 +01:00
end
LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos:: @ 81F841A
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos
compare VAR_BIRCH_LAB_STATE, 2
goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_Ret
goto LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos
2017-11-10 02:21:31 +01:00
LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: @ 81F8433
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_Ret
2019-08-03 20:12:48 +02:00
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used here instead
setobjectxyperm LOCALID_RIVAL, 0, 2
setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP
2017-11-10 02:21:31 +01:00
return
LittlerootTown_BrendansHouse_2F_EventScript_Ret:: @ 81F8456
2017-11-10 02:21:31 +01:00
return
LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan:: @ 81F8457
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan
2017-11-10 02:21:31 +01:00
return
LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan:: @ 81F8464
setvar VAR_LITTLEROOT_RIVAL_STATE, 2
2017-11-10 02:21:31 +01:00
return
LittlerootTown_BrendansHouse_2F_OnWarp: @ 81F846A
map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor
2017-11-10 02:21:31 +01:00
.2byte 0
LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor:: @ 81F8474
2017-11-10 02:21:31 +01:00
checkplayergender
2019-09-16 05:47:07 +02:00
compare VAR_RESULT, MALE
goto_if_eq SecretBase_EventScript_InitDecorations
2017-11-10 02:21:31 +01:00
end
LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall:: @ 81F8481
2017-11-10 02:21:31 +01:00
lockall
compare VAR_LITTLEROOT_RIVAL_STATE, 2
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan
msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: @ 81F8497
2017-11-10 02:21:31 +01:00
delay 10
addobject LOCALID_RIVAL
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters
2017-11-10 02:21:31 +01:00
waitmovement 0
playse SE_PIN
applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_RIVAL, Common_Movement_Delay48
2017-11-10 02:21:31 +01:00
waitmovement 0
delay 10
2020-08-21 00:02:00 +02:00
playbgm MUS_ENCOUNTER_BRENDAN, 1
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_NORTH
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_SOUTH
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_WEST
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_EAST
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
2018-10-18 21:28:59 +02:00
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM
2019-08-05 17:23:45 +02:00
setvar VAR_LITTLEROOT_TOWN_STATE, 1
2017-12-22 08:46:19 +01:00
savebgm MUS_DUMMY
2017-11-10 02:21:31 +01:00
fadedefaultbgm
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth:: @ 81F8507
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth:: @ 81F8536
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest:: @ 81F8565
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast:: @ 81F8594
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp
2017-11-10 02:21:31 +01:00
waitmovement 0
msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast
2017-11-10 02:21:31 +01:00
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters: @ 81F85BC
walk_down
walk_down
walk_in_place_fastest_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth: @ 81F85C0
walk_left
walk_left
walk_down
walk_down
walk_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth: @ 81F85C6
walk_up
walk_up
walk_up
walk_left
walk_left
walk_left
walk_left
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth: @ 81F85CF
delay_16
walk_in_place_fastest_up
delay_16
delay_16
delay_16
delay_16
walk_in_place_fastest_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth: @ 81F85D7
walk_left
walk_left
walk_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth: @ 81F85DB
walk_up
walk_left
walk_left
walk_left
walk_left
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth: @ 81F85E2
delay_16
walk_in_place_fastest_up
delay_16
delay_16
walk_in_place_fastest_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest: @ 81F85E8
walk_left
walk_left
walk_down
walk_in_place_fastest_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest: @ 81F85ED
walk_up
walk_up
walk_left
walk_left
walk_left
walk_left
walk_left
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest: @ 81F85F6
delay_8
delay_16
walk_in_place_fastest_up
delay_16
delay_16
walk_in_place_fastest_left
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast: @ 81F85FD
walk_left
walk_left
walk_left
walk_left
walk_left
walk_in_place_fastest_down
2017-11-10 02:21:31 +01:00
step_end
LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast: @ 81F8604
walk_up
walk_left
walk_left
walk_in_place_fastest_up
2017-11-10 02:21:31 +01:00
step_end
@ Unused, the player is already facing this direction so its unneeded
LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast: @ 81F8609
delay_16
delay_16
walk_in_place_fastest_left
step_end
LittlerootTown_BrendansHouse_2F_EventScript_PC:: @ 81F860D
lockall
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC
end
LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: @ 81F8626
setvar VAR_0x8004, 1
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
2018-03-12 09:26:20 +01:00
special BedroomPC
waitstate
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC:: @ 81F863F
2017-11-10 09:24:21 +01:00
setvar VAR_0x8004, 1
playse SE_PC_OFF
special DoPCTurnOffEffect
2017-11-10 09:24:21 +01:00
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC:: @ 81F864C
2019-08-15 05:38:42 +02:00
msgbox gText_PokemonTrainerSchoolEmail, MSGBOX_DEFAULT
releaseall
end
PlayersHouse_2F_EventScript_Notebook:: @ 81F8656
msgbox PlayersHouse_2F_Text_Notebook, MSGBOX_SIGN
end
PlayersHouse_2F_EventScript_GameCube:: @ 81F865F
msgbox PlayersHouse_2F_Text_ItsAGameCube, MSGBOX_SIGN
end
PlayersHouse_2F_Text_ClockIsStopped: @ 81F8668
.string "The clock is stopped…\p"
.string "Better set it and start it!$"
PlayersHouse_2F_Text_HowDoYouLikeYourRoom: @ 81F869A
.string "MOM: {PLAYER}, how do you like your\n"
.string "new room?\p"
2018-12-07 16:41:08 +01:00
.string "Good! Everything's put away neatly!\p"
.string "They finished moving everything in\n"
.string "downstairs, too.\p"
.string "POKéMON movers are so convenient!\p"
.string "Oh, you should make sure that\n"
2018-12-07 16:41:08 +01:00
.string "everything's all there on your desk.$"
PlayersHouse_2F_Text_Notebook: @ 81F877F
.string "{PLAYER} flipped open the notebook.\p"
.string "ADVENTURE RULE NO. 1\n"
.string "Open the MENU with START.\p"
.string "ADVENTURE RULE NO. 2\n"
.string "Record your progress with SAVE.\p"
.string "The remaining pages are blank…$"
Common_Text_LookCloserAtMap: @ 81F8820
2017-11-10 09:24:21 +01:00
.string "{PLAYER} took a closer look at the\n"
.string "HOENN region map.$"
2017-11-10 02:21:31 +01:00
PlayersHouse_2F_Text_ItsAGameCube: @ 81F884F
2018-12-07 16:41:08 +01:00
.string "It's a Nintendo GameCube.\p"
.string "A Game Boy Advance is connected to\n"
.string "serve as the Controller.$"