2025-06-02 14:17:22 +08:00

348 lines
14 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

VerdanturfTown_BattleTentLobby_MapScripts::
map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentLobby_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentLobby_OnWarp
.byte 0
VerdanturfTown_BattleTentLobby_OnWarp:
map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth
.2byte 0
VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth::
setvar VAR_TEMP_1, 1
turnobject LOCALID_PLAYER, DIR_NORTH
end
VerdanturfTown_BattleTentLobby_OnFrame:
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, VerdanturfTown_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, VerdanturfTown_BattleTentLobby_EventScript_LostChallenge
.2byte 0
VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus::
frontier_getstatus
end
VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving::
lockall
msgbox BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge, MSGBOX_DEFAULT
closemessage
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 255
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
releaseall
end
VerdanturfTown_BattleTentLobby_EventScript_WonChallenge::
lockall
msgbox VerdanturfTown_BattleTentLobby_Text_AchievedThreeWinStreak, MSGBOX_DEFAULT
message VerdanturfTown_BattleTentLobby_Text_FeatWillBeRecorded
waitmessage
verdanturftent_setrandomprize
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
verdanturftent_save 0
playse SE_SAVE
waitse
VerdanturfTown_BattleTentLobby_EventScript_GivePrize::
msgbox VerdanturfTown_BattleTentLobby_Text_PresentYouWithPrize, MSGBOX_DEFAULT
verdanturftent_giveprize
switch VAR_RESULT
case FALSE, VerdanturfTown_BattleTentLobby_EventScript_NoRoomForPrize
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
message BattleFrontier_BattleDomeLobby_Text_ReceivedPrize @ Odd that it used Dome's copy instead of Palace's
waitmessage
playfanfare MUS_OBTAIN_ITEM
waitfanfare
msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
VerdanturfTown_BattleTentLobby_EventScript_NoRoomForPrize::
msgbox BattleFrontier_BattlePalaceLobby_Text_NoSpaceForPrize, MSGBOX_DEFAULT
waitmessage
closemessage
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting::
lockall
msgbox VerdanturfTown_BattleTentLobby_Text_AchievedThreeWinStreak, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_GivePrize
end
VerdanturfTown_BattleTentLobby_EventScript_LostChallenge::
lockall
message VerdanturfTown_BattleTentLobby_Text_ResultsWillBeRecorded
waitmessage
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
verdanturftent_save 0
playse SE_SAVE
waitse
msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge::
lockall
msgbox BattleFrontier_BattlePalaceLobby_Text_WeHaveBeenWaiting, MSGBOX_DEFAULT
message BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge
waitmessage
verdanturftent_save CHALLENGE_STATUS_SAVING
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge
VerdanturfTown_BattleTentLobby_EventScript_Attendant::
lock
faceplayer
verdanturftent_getprize
goto_if_ne VAR_RESULT, ITEM_NONE, VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting
special SavePlayerParty
msgbox VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT
VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge::
message VerdanturfTown_BattleTentLobby_Text_TakeChallenge
waitmessage
multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge
case 1, VerdanturfTown_BattleTentLobby_EventScript_ExplainChallenge
case 2, VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge
case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge::
setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PALACE
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
setvar VAR_RESULT, 2
frontier_checkineligible
goto_if_eq VAR_0x8004, TRUE, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT
msgbox VerdanturfTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
fadescreen FADE_TO_BLACK
setvar VAR_0x8004, 1
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
special ChoosePartyForBattleFrontier
waitstate
goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
msgbox VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO
switch VAR_RESULT
case NO, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
case YES, VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge
case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
verdanturftent_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed
VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge::
special SavePlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE
msgbox VerdanturfTown_BattleTentLobby_Text_NowFollowMe, MSGBOX_DEFAULT
closemessage
call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor
warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end
VerdanturfTown_BattleTentLobby_EventScript_ExplainChallenge::
msgbox VerdanturfTown_BattleTentLobby_Text_ExplainVerdanturfTent, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge
VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons::
switch VAR_RESULT
case FRONTIER_LVL_50, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50
case FRONTIER_LVL_OPEN, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen
VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50::
msgbox VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
goto VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge::
special LoadPlayerParty
VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge::
msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT
VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge::
release
end
VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor::
applymovement LOCALID_VERDANTURF_TENT_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor
applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor
waitmovement 0
opendoor 6, 1
waitdooranim
applymovement LOCALID_VERDANTURF_TENT_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor
applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor
waitmovement 0
closedoor 6, 1
waitdooranim
return
VerdanturfTown_BattleTentLobby_Movement_WalkToDoor:
walk_up
walk_up
walk_up
step_end
VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor:
walk_up
set_invisible
step_end
VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor:
walk_up
walk_up
set_invisible
step_end
VerdanturfTown_BattleTentLobby_EventScript_AttractGiver::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM_ATTRACT, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT
giveitem ITEM_TM_ATTRACT
goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM_ATTRACT
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT
release
end
VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract::
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT
release
end
VerdanturfTown_BattleTentLobby_EventScript_Boy1::
msgbox VerdanturfTown_BattleTentLobby_Text_TaughtWhatKindsOfMoves, MSGBOX_NPC
end
VerdanturfTown_BattleTentLobby_EventScript_Boy2::
lock
msgbox VerdanturfTown_BattleTentLobby_Text_MonsReluctantToUseDislikedMoves, MSGBOX_DEFAULT
release
end
VerdanturfTown_BattleTentLobby_EventScript_Scott::
lock
faceplayer
goto_if_set FLAG_MET_SCOTT_IN_VERDANTURF, VerdanturfTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo
msgbox VerdanturfTown_BattleTentLobby_Text_ScottCanMeetToughTrainers, MSGBOX_DEFAULT
addvar VAR_SCOTT_STATE, 1
setflag FLAG_MET_SCOTT_IN_VERDANTURF
release
end
VerdanturfTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo::
msgbox VerdanturfTown_BattleTentLobby_Text_ScottVisitRegularly, MSGBOX_DEFAULT
release
end
VerdanturfTown_BattleTentLobby_EventScript_LittleBoy::
lock
msgbox VerdanturfTown_BattleTentLobby_Text_GentleMonsScaryIfAngry, MSGBOX_DEFAULT
release
end
VerdanturfTown_BattleTentLobby_EventScript_RulesBoard::
lockall
msgbox VerdanturfTown_BattleTentLobby_Text_RulesAreListed, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard::
message BattleFrontier_BattlePalaceLobby_Text_ReadWhichHeading
waitmessage
setvar VAR_0x8004, SCROLL_MULTI_BATTLE_TENT_RULES
special ShowScrollableMultichoice
waitstate
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_RulesLevel
case 1, VerdanturfTown_BattleTentLobby_EventScript_RulesBasics
case 2, VerdanturfTown_BattleTentLobby_EventScript_RulesNature
case 3, VerdanturfTown_BattleTentLobby_EventScript_RulesMoves
case 4, VerdanturfTown_BattleTentLobby_EventScript_RulesUnderpowered
case 5, VerdanturfTown_BattleTentLobby_EventScript_RulesWhenInDanger
case 6, VerdanturfTown_BattleTentLobby_EventScript_ExitRules
case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_ExitRules
end
VerdanturfTown_BattleTentLobby_EventScript_RulesLevel::
msgbox BattleTentLobby_Text_ExplainLevelRules, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_RulesBasics::
msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesBasics, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_RulesNature::
msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesNature, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_RulesMoves::
msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesMoves, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_RulesUnderpowered::
msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesUnderpowered, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_RulesWhenInDanger::
msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger, MSGBOX_DEFAULT
goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard
end
VerdanturfTown_BattleTentLobby_EventScript_ExitRules::
releaseall
end
VerdanturfTown_BattleTentLobby_Text_MonsReluctantToUseDislikedMoves:
.string "如果宝可梦不喜欢一个招式,\n它就不愿使用这招式,\p无论招式多么强大\n都一样。\p比如说一只拥有温顺性格的\n宝可梦很可能不想\l伤害对手。\p如果不能因材施教\n它们使用自己讨厌的招式时\l可能会失败。$"
VerdanturfTown_BattleTentLobby_Text_GentleMonsScaryIfAngry:
.string "我姐姐通常很温柔,\n但如果把她惹怒了,\l她会变得非常非常可怕\p我敢说温顺性格的宝可梦\n生气的时候也会很可怕!$"
VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep:
.string "我对宝可梦感到……\n它那么地迷人……\p啊你好你没看见吧\n啊,算了,没关系,\p你想给你的宝可梦用\n这个招式学习器吗?$"
VerdanturfTown_BattleTentLobby_Text_AttractionMutual:
.string "我对宝可梦感到……\n我想这吸引力一定是相互的!\p它们对战时完全按照\n我想的那样做!$"
VerdanturfTown_BattleTentLobby_Text_TaughtWhatKindsOfMoves:
.string "你给你的宝可梦\n教了些什么招式?\p我想如果它们会回复或者\n保护自己的话,\l会让你在战斗中更有优势。$"
VerdanturfTown_BattleTentLobby_Text_ScottCanMeetToughTrainers:
.string "亚希达:嗨,{PLAYER}{KUN}\n我就知道能在这儿遇到你,\p因为无论规则如何\n无论战斗怎样,\p你总能在对战帐篷中\n碰见强大的训练家。\p{PLAYER}{KUN}\n我希望你能全力以赴!$"
VerdanturfTown_BattleTentLobby_Text_ScottVisitRegularly:
.string "亚希达:我经常来这儿,\n为了能观摩强大的训练家\l在不同的处境下如何战斗。$"