211 lines
8.6 KiB
PHP
211 lines
8.6 KiB
PHP
SootopolisCity_MysteryEventsHouse_1F_MapScripts::
|
||
map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MysteryEventsHouse_1F_OnTransition
|
||
map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MysteryEventsHouse_1F_OnFrame
|
||
.byte 0
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_OnTransition:
|
||
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
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout::
|
||
setvar VAR_TEMP_1, 1
|
||
setobjectxyperm LOCALID_MYSTERY_EVENTS_OLD_MAN, 3, 2
|
||
setobjectmovementtype LOCALID_MYSTERY_EVENTS_OLD_MAN, MOVEMENT_TYPE_FACE_DOWN
|
||
setmaplayoutindex LAYOUT_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F_STAIRS_UNBLOCKED
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor::
|
||
setobjectxyperm LOCALID_MYSTERY_EVENTS_OLD_MAN, 2, 2
|
||
setobjectmovementtype LOCALID_MYSTERY_EVENTS_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_OnFrame:
|
||
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
|
||
.2byte 0
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle::
|
||
lockall
|
||
applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs
|
||
waitmovement 0
|
||
applymovement LOCALID_MYSTERY_EVENTS_OLD_MAN, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer
|
||
waitmovement 0
|
||
copyobjectxytoperm LOCALID_MYSTERY_EVENTS_OLD_MAN
|
||
applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp
|
||
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
|
||
special LoadPlayerParty
|
||
setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
|
||
releaseall
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment::
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ThatWasSuperlative, MSGBOX_DEFAULT
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment::
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_TooBadForYou, MSGBOX_DEFAULT
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment::
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_BrilliantStandoff, MSGBOX_DEFAULT
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs:
|
||
walk_down
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer:
|
||
walk_right
|
||
walk_in_place_faster_down
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan::
|
||
lock
|
||
faceplayer
|
||
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
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT
|
||
release
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer::
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT
|
||
release
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting::
|
||
special SavePlayerParty
|
||
special BufferEReaderTrainerName
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer, MSGBOX_YESNO
|
||
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||
call SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty
|
||
goto_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle, MSGBOX_YESNO
|
||
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||
special LoadPlayerParty
|
||
call Common_EventScript_SaveGame
|
||
goto_if_eq VAR_RESULT, FALSE, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||
special SavePlayerParty
|
||
special ReducePlayerPartyToSelectedMons
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch, MSGBOX_DEFAULT
|
||
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
|
||
waitstate
|
||
release
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle::
|
||
special LoadPlayerParty
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_YouWontBattle, MSGBOX_DEFAULT
|
||
release
|
||
end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty::
|
||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_KeepItTo3On3, MSGBOX_DEFAULT
|
||
fadescreen FADE_TO_BLACK
|
||
special ChooseHalfPartyForBattle
|
||
waitstate
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth::
|
||
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft
|
||
applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth
|
||
waitmovement 0
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast::
|
||
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight
|
||
applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast
|
||
waitmovement 0
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest::
|
||
applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft
|
||
applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest
|
||
waitmovement 0
|
||
return
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth:
|
||
delay_16
|
||
walk_up
|
||
walk_up
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast:
|
||
delay_16
|
||
walk_right
|
||
walk_up
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest:
|
||
delay_16
|
||
walk_left
|
||
walk_up
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft:
|
||
walk_left
|
||
walk_in_place_faster_right
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight:
|
||
walk_right
|
||
walk_in_place_faster_left
|
||
step_end
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles:
|
||
.string "我年轻的时候也是一个\n环游世界的宝可梦训练家,\p但现在我已经日薄西山,\n唯一的乐趣只有\l看年轻训练家对战了。$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_DoorAppearsToBeLocked:
|
||
.string "这扇门上了锁。$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer:
|
||
.string "一个叫{STR_VAR_1}的训练家\n到我家来了,\p你想挑战\n{STR_VAR_1}吗?$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_YouWontBattle:
|
||
.string "你不想对战?好失望,\n我真的很想看你们的对战……$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_KeepItTo3On3:
|
||
.string "啊,好,太好了!\p不过我的房子不是\n特别坚固,\p能请你们进行一场\n3对3的对战吗?$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle:
|
||
.string "在你们2个对战前\n要先写入记录。$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch:
|
||
.string "我想要看到一场精彩的对战!$"
|
||
|
||
@ Unused
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Tie:
|
||
.string "{STR_VAR_1}$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_B1F_Text_MatchEndedUpDraw:
|
||
.string "对战以平局结束。$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_BrilliantStandoff:
|
||
.string "是平局哦。\p双方都没有让步\n真是场精彩的比赛!$"
|
||
|
||
@ Unused
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Won:
|
||
.string "{STR_VAR_1}$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_ThatWasSuperlative:
|
||
.string "太优秀了!\p我彷佛又看到了\n我年轻的时候!$"
|
||
|
||
@ Unused
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_StrVar1Lost:
|
||
.string "{STR_VAR_1}$"
|
||
|
||
SootopolisCity_MysteryEventsHouse_1F_Text_TooBadForYou:
|
||
.string "啊,太糟糕了!\p但是确实是场不错的对战。\n希望下次你可以赢。$"
|
||
|