pokeemerald/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc

231 lines
8.8 KiB
PHP
Raw Normal View History

.set LOCALID_OLD_MAN, 1
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MysteryEventsHouse_1F_OnTransition
2019-11-10 02:40:41 +01:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MysteryEventsHouse_1F_OnFrame
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_OnTransition:
2019-11-24 22:58:40 +01:00
frontier_checkvisittrainer
call_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout
call_if_ne VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout::
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
setobjectxyperm LOCALID_OLD_MAN, 3, 2
setobjectmovementtype LOCALID_OLD_MAN, MOVEMENT_TYPE_FACE_DOWN
setmaplayoutindex LAYOUT_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F_STAIRS_UNBLOCKED
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor::
setobjectxyperm LOCALID_OLD_MAN, 2, 2
setobjectmovementtype LOCALID_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_OnFrame:
2019-11-10 02:40:41 +01:00
map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle
map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle
map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle::
2017-11-10 02:21:31 +01:00
lockall
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs
2017-11-10 02:21:31 +01:00
waitmovement 0
applymovement LOCALID_OLD_MAN, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer
2017-11-10 02:21:31 +01:00
waitmovement 0
copyobjectxytoperm LOCALID_OLD_MAN
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
2017-11-10 02:21:31 +01:00
waitmovement 0
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
2019-02-22 10:18:43 +01:00
setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment::
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ThatWasSuperlative, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment::
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_TooBadForYou, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment::
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_BrilliantStandoff, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs:
walk_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer:
walk_right
walk_in_place_faster_down
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan::
2017-11-10 02:21:31 +01:00
lock
faceplayer
2019-11-24 22:58:40 +01:00
frontier_checkvisittrainer
goto_if_eq VAR_RESULT, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer
goto_if_eq VAR_TEMP_1, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer::
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting::
2018-04-29 14:21:59 +02:00
special SavePlayerParty
special BufferEReaderTrainerName
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
2019-11-10 02:40:41 +01:00
call SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty
goto_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
call Common_EventScript_SaveGame
goto_if_eq VAR_RESULT, FALSE, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
2018-04-29 14:21:59 +02:00
special SavePlayerParty
2018-11-25 22:50:54 +01:00
special ReducePlayerPartyToSelectedMons
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
closemessage
call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth
call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast
call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest
warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1
2017-11-10 02:21:31 +01:00
waitstate
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle::
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_YouWontBattle, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty::
2019-11-10 02:40:41 +01:00
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_KeepItTo3On3, MSGBOX_DEFAULT
2019-12-15 17:42:50 +01:00
fadescreen FADE_TO_BLACK
2019-02-18 07:03:44 +01:00
special ChooseHalfPartyForBattle
2017-11-10 02:21:31 +01:00
waitstate
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth::
2019-11-10 02:40:41 +01:00
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth
2017-11-10 02:21:31 +01:00
waitmovement 0
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast::
2019-11-10 02:40:41 +01:00
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast
2017-11-10 02:21:31 +01:00
waitmovement 0
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest::
2019-11-10 02:40:41 +01:00
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest
2017-11-10 02:21:31 +01:00
waitmovement 0
return
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth:
delay_16
walk_up
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast:
delay_16
walk_right
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest:
delay_16
walk_left
walk_up
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft:
walk_left
walk_in_place_faster_right
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight:
walk_right
walk_in_place_faster_left
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles:
2017-11-10 02:21:31 +01:00
.string "When I was young, I traveled the world\n"
.string "as a POKéMON TRAINER.\p"
2018-12-07 16:41:08 +01:00
.string "Now that I've become an old buzzard,\n"
2017-11-10 02:21:31 +01:00
.string "my only amusement is watching young\l"
.string "TRAINERS battle.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_DoorAppearsToBeLocked:
.string "The door appears to be locked.$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer:
2017-11-10 02:21:31 +01:00
.string "A TRAINER named {STR_VAR_1}\n"
.string "is visiting my home.\p"
.string "Would you like to challenge\n"
.string "{STR_VAR_1}?$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_YouWontBattle:
2018-12-07 16:41:08 +01:00
.string "You won't battle? I'm disappointed\n"
.string "that I can't see you battle…$"
2017-11-10 02:21:31 +01:00
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_KeepItTo3On3:
2017-11-10 02:21:31 +01:00
.string "Oh, good, good!\p"
2018-12-07 16:41:08 +01:00
.string "But my house isn't all that sturdy.\p"
2017-11-10 02:21:31 +01:00
.string "Could I ask you to keep it down to\n"
.string "a 3-on-3 match?$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle:
2017-11-10 02:21:31 +01:00
.string "Before you two battle, you should\n"
.string "save your progress.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch:
2017-11-10 02:21:31 +01:00
.string "I hope to see a good match!$"
2019-11-10 02:40:41 +01:00
@ Unused
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Tie:
.string "{STR_VAR_1}$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_B1F_Text_MatchEndedUpDraw:
.string "The match ended up a draw.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_BrilliantStandoff:
.string "So, it became a standoff.\p"
.string "It was a brilliant match in which\n"
.string "neither side conceded a step!$"
2019-11-10 02:40:41 +01:00
@ Unused
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Won:
2017-11-10 09:24:21 +01:00
.string "{STR_VAR_1}$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_ThatWasSuperlative:
.string "That was superlative!\p"
.string "Why, it was like seeing myself in\n"
.string "my youth again!$"
2019-11-10 02:40:41 +01:00
@ Unused
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Lost:
2017-11-10 09:24:21 +01:00
.string "{STR_VAR_1}$"
2021-07-20 21:18:31 +02:00
SootopolisCity_MysteryEventsHouse_1F_Text_TooBadForYou:
.string "Ah, too bad for you!\p"
.string "But it was a good match.\n"
.string "I hope you can win next time.$"
2017-11-10 02:21:31 +01:00