pokeemerald/data/maps/SootopolisCity_Gym_1F/scripts.inc

326 lines
12 KiB
PHP
Raw Normal View History

2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_MapScripts::
map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_Gym_1F_OnFrame
map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_Gym_1F_OnResume
map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_Gym_1F_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_Gym_1F_OnTransition
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_OnTransition:
2017-11-10 02:21:31 +01:00
setvar VAR_ICE_STEP_COUNT, 1
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_OnResume:
setstepcallback STEP_CB_SOOTOPOLIS_ICE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_OnLoad:
call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
2018-05-19 18:02:43 +02:00
special SetSootopolisGymCrackedIceMetatiles
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles::
compare VAR_ICE_STEP_COUNT, 8
goto_if_lt SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice
compare VAR_ICE_STEP_COUNT, 28
goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs
compare VAR_ICE_STEP_COUNT, 67
goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs
2019-06-13 00:47:51 +02:00
setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs::
2019-06-13 00:47:51 +02:00
setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_OpenFirstStairs::
2019-06-13 00:47:51 +02:00
setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0
setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_StopCheckingStairs::
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_OnFrame:
map_script_2 VAR_ICE_STEP_COUNT, 8, SootopolisCity_Gym_1F_EventScript_UnlockFirstStairs
map_script_2 VAR_ICE_STEP_COUNT, 28, SootopolisCity_Gym_1F_EventScript_UnlockSecondStairs
map_script_2 VAR_ICE_STEP_COUNT, 67, SootopolisCity_Gym_1F_EventScript_UnlockThirdStairs
map_script_2 VAR_ICE_STEP_COUNT, 0, SootopolisCity_Gym_1F_EventScript_FallThroughIce
2017-11-10 02:21:31 +01:00
.2byte 0
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_UnlockFirstStairs::
2017-11-10 02:21:31 +01:00
addvar VAR_ICE_STEP_COUNT, 1
delay 40
2020-08-21 00:02:00 +02:00
playse SE_ICE_STAIRS
call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
2017-11-10 02:21:31 +01:00
special DrawWholeMapView
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_UnlockSecondStairs::
2017-11-10 02:21:31 +01:00
addvar VAR_ICE_STEP_COUNT, 1
delay 40
2020-08-21 00:02:00 +02:00
playse SE_ICE_STAIRS
call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
2017-11-10 02:21:31 +01:00
special DrawWholeMapView
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_UnlockThirdStairs::
2017-11-10 02:21:31 +01:00
addvar VAR_ICE_STEP_COUNT, 1
delay 40
2020-08-21 00:02:00 +02:00
playse SE_ICE_STAIRS
call SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles
2017-11-10 02:21:31 +01:00
special DrawWholeMapView
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_FallThroughIce::
2017-11-10 02:21:31 +01:00
lockall
delay 20
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Gym_1F_Movement_FallThroughIce
2017-11-10 02:21:31 +01:00
waitmovement 0
2020-08-21 00:02:00 +02:00
playse SE_FALL
2017-11-10 02:21:31 +01:00
delay 60
warphole MAP_SOOTOPOLIS_CITY_GYM_B1F
2017-11-10 02:21:31 +01:00
waitstate
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Movement_FallThroughIce:
set_invisible
2017-11-10 02:21:31 +01:00
step_end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_Juan::
2020-01-08 21:12:10 +01:00
trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanIntro, SootopolisCity_Gym_1F_Text_JuanDefeat, SootopolisCity_Gym_1F_EventScript_JuanDefeated, NO_MUSIC
2017-12-01 21:25:13 +01:00
specialvar VAR_RESULT, ShouldTryRematchBattle
compare VAR_RESULT, TRUE
goto_if_eq SootopolisCity_Gym_1F_EventScript_JuanRematch
goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2
goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge
msgbox SootopolisCity_Gym_1F_Text_JuanPostBattle, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_JuanDefeated::
message SootopolisCity_Gym_1F_Text_ReceivedRainBadge
2017-11-10 02:21:31 +01:00
waitmessage
call Common_EventScript_PlayGymBadgeFanfare
msgbox SootopolisCity_Gym_1F_Text_ExplainRainBadgeTakeThis, MSGBOX_DEFAULT
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_SOOTOPOLIS_GYM
2017-11-10 02:21:31 +01:00
setflag FLAG_BADGE08_GET
2018-10-19 03:32:21 +02:00
setflag FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS
setflag FLAG_HIDE_SOOTOPOLIS_CITY_STEVEN
setflag FLAG_HIDE_SOOTOPOLIS_CITY_WALLACE
2019-08-05 17:23:45 +02:00
setvar VAR_SOOTOPOLIS_CITY_STATE, 6
2018-10-19 03:32:21 +02:00
clearflag FLAG_HIDE_SOOTOPOLIS_CITY_MAN_1
2017-11-10 02:21:31 +01:00
setvar VAR_0x8008, 8
2019-08-15 05:38:42 +02:00
call Common_EventScript_SetGymTrainers
call SootopolisCity_Gym_1F_EventScript_GiveWaterPulse
2017-11-10 02:21:31 +01:00
closemessage
delay 30
2020-08-21 00:02:00 +02:00
playfanfare MUS_REGISTER_MATCH_CALL
msgbox SootopolisCity_Gym_1F_Text_RegisteredJuan, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
waitfanfare
closemessage
delay 30
2019-01-02 22:12:43 +01:00
setflag FLAG_ENABLE_JUAN_MATCH_CALL
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GiveWaterPulse::
giveitem ITEM_TM03
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_BagIsFull
msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
2019-01-02 22:12:43 +01:00
setflag FLAG_RECEIVED_TM03
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2::
giveitem ITEM_TM03
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
2019-01-02 22:12:43 +01:00
setflag FLAG_RECEIVED_TM03
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge::
msgbox SootopolisCity_Gym_1F_Text_GoGetFortreeBadge, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_JuanRematch::
trainerbattle_rematch_double TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanPreRematch, SootopolisCity_Gym_1F_Text_JuanRematchDefeat, SootopolisCity_Gym_1F_Text_JuanRematchNeedTwoMons
msgbox SootopolisCity_Gym_1F_Text_JuanPostRematch, MSGBOX_AUTOCLOSE
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GymGuide::
2017-11-10 02:21:31 +01:00
lock
faceplayer
goto_if_set FLAG_DEFEATED_SOOTOPOLIS_GYM, SootopolisCity_Gym_1F_EventScript_GymGuidePostVictory
msgbox SootopolisCity_Gym_1F_Text_GymGuideAdvice, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GymGuidePostVictory::
msgbox SootopolisCity_Gym_1F_Text_GymGuidePostVictory, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
release
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_LeftGymStatue::
2017-11-10 02:21:31 +01:00
lockall
goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_GymStatueCertified
goto SootopolisCity_Gym_1F_EventScript_GymStatue
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_RightGymStatue::
2017-11-10 02:21:31 +01:00
lockall
goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_GymStatueCertified
goto SootopolisCity_Gym_1F_EventScript_GymStatue
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GymStatueCertified::
msgbox SootopolisCity_Gym_1F_Text_GymStatueCertified, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_EventScript_GymStatue::
msgbox SootopolisCity_Gym_1F_Text_GymStatue, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_GymGuideAdvice:
2018-12-07 16:41:08 +01:00
.string "Yo! How's it going, CHAMPION-\n"
2017-11-10 02:21:31 +01:00
.string "bound {PLAYER}?\p"
2018-12-07 16:41:08 +01:00
.string "SOOTOPOLIS's GYM LEADER JUAN is\n"
2017-11-10 02:21:31 +01:00
.string "a master of WATER-type POKéMON.\p"
.string "And, to get to JUAN, an icy floor\n"
.string "will hamper your progress…\p"
2018-12-07 16:41:08 +01:00
.string "Listen, I'm sorry, but that's all the\n"
2017-11-10 02:21:31 +01:00
.string "advice that I have for you.\p"
.string "The rest of the way, you have to\n"
.string "go for it yourself!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_GymGuidePostVictory:
2018-12-07 16:41:08 +01:00
.string "Yow! You've beaten even JUAN, who\n"
2017-11-10 02:21:31 +01:00
.string "was supposedly the best in all HOENN!\p"
.string "Okay! Check out your TRAINER CARD.\p"
2018-12-07 16:41:08 +01:00
.string "If you've gotten all the BADGES, you're\n"
2017-11-10 02:21:31 +01:00
.string "set for the POKéMON LEAGUE challenge!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanIntro:
2017-11-10 02:21:31 +01:00
.string "Let me ask you.\n"
.string "Did you know?\l"
.string "Ah, I should not be so coy.\p"
.string "It was I who taught WALLACE everything\n"
.string "there is to know about POKéMON.\p"
.string "Once, I had given up my position as\n"
.string "the GYM LEADER.\p"
.string "In my place, I had entrusted WALLACE\n"
.string "with the GYM.\p"
.string "However, a compelling reason arose for\n"
.string "me to make a comeback.\p"
.string "Ah, but enough chatter.\n"
.string "Let us begin our match, shall we?\p"
.string "Please, you shall bear witness to\n"
.string "our artistry.\p"
.string "A grand illusion of water sculpted\n"
.string "by POKéMON and myself!$"
2019-08-17 16:32:37 +02:00
@ NOTE: This defeat text actually causes a buffer overflow. It's about 50 bytes too long for
@ the gDisplayedStringBattle buffer that it's put into, and it stomps all over the gBattleTextBuffs
@ after, as well as the otherwise unused array after that. One wonders if that's the reason for
@ the existence of that unused array of ints.
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanDefeat:
2017-11-10 02:21:31 +01:00
.string "Ahahaha, excellent!\n"
.string "Very well, you are the winner.\p"
.string "From you, I sense the brilliant shine\n"
.string "of skill that will overcome all.\p"
.string "However, compared with me or even\n"
.string "WALLACE, you are lacking in elegance.\p"
.string "Perhaps I should make you a loan\n"
.string "of my outfit?\p"
.string "… … … … … …\n"
.string "… … … … … …\p"
.string "Hahaha, I merely jest!\p"
.string "Rather than my clothes, I shall reward\n"
.string "you with this, the RAIN BADGE!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_ReceivedRainBadge:
2017-11-10 02:21:31 +01:00
.string "{PLAYER} received the RAIN BADGE\n"
.string "from JUAN.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_ExplainRainBadgeTakeThis:
2017-11-10 02:21:31 +01:00
.string "Having the RAIN BADGE shall assure you\n"
.string "the full obedience of all your POKéMON\l"
.string "to your every command.\p"
.string "The RAIN BADGE also allows the use\n"
.string "of the HM move WATERFALL to scale\l"
.string "walls of cascading water.\p"
.string "And, so that you never forget the\n"
.string "battle we shared, take this…$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_ExplainWaterPulse:
2017-11-10 02:21:31 +01:00
.string "The TECHNICAL MACHINE I handed you\n"
.string "contains WATER PULSE.\p"
.string "In use, it will occasionally confuse\n"
.string "the target with ultrasonic waves.\p"
.string "… … … … … …$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_RegisteredJuan:
2017-11-10 02:21:31 +01:00
.string "Registered GYM LEADER JUAN\n"
.string "in the POKéNAV.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanPostBattle:
2017-11-10 02:21:31 +01:00
.string "The TRAINERS who have gathered all\n"
.string "the GYM BADGES of HOENN should make\l"
.string "way to the ultimate destination.\p"
.string "The POKéMON LEAGUE.\p"
.string "Travel to the easternmost reaches\n"
.string "of HOENN, to the island EVER GRANDE.\p"
.string "There, you shall find the POKéMON\n"
.string "LEAGUE.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_GoGetFortreeBadge:
2017-11-10 02:21:31 +01:00
.string "There remains but one BADGE to\n"
.string "obtain in HOENN.\p"
.string "If you wish to challenge the POKéMON\n"
.string "LEAGUE, you must obtain the last\l"
.string "BADGE from the GYM in FORTREE.$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_GymStatue:
2017-11-10 02:21:31 +01:00
.string "SOOTOPOLIS CITY POKéMON GYM$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_GymStatueCertified:
2017-11-10 02:21:31 +01:00
.string "SOOTOPOLIS CITY POKéMON GYM\p"
2018-12-07 16:41:08 +01:00
.string "JUAN'S CERTIFIED TRAINERS:\n"
2017-11-10 02:21:31 +01:00
.string "{PLAYER}$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanPreRematch:
2017-11-10 02:21:31 +01:00
.string "JUAN: Ah, this GYM had returned to its\n"
.string "usual state of serenity…\p"
.string "But our young typhoon has returned\n"
.string "to put us to the test again!\p"
.string "Well, my friend, most certainly!\p"
.string "I shall be delighted to dance with you\n"
.string "as often as you wish!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanRematchDefeat:
2017-11-10 02:21:31 +01:00
.string "Ahahaha, you are the winner!\n"
.string "You have defeated me again!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanPostRematch:
2017-11-10 02:21:31 +01:00
.string "JUAN: If I told you to become my\n"
.string "apprentice, you will refuse, I am sure.\p"
.string "I would like to make a gift of my coat\n"
.string "to you.\p"
.string "But again, you will refuse.\n"
.string "I imagine that to be so.\p"
.string "And that, my friend, is a certain sign\n"
.string "of nobility!$"
2021-07-20 21:18:31 +02:00
SootopolisCity_Gym_1F_Text_JuanRematchNeedTwoMons:
2017-11-10 02:21:31 +01:00
.string "JUAN: Ah, this GYM had returned to its\n"
.string "usual state of serenity…\p"
.string "But our young typhoon has returned\n"
.string "to put us to the test again!\p"
.string "Well, my friend, most certainly!\n"
.string "I shall be delighted to dance with you…\p"
.string "Ah, no, no, no.\n"
.string "You have with you but one POKéMON.\p"
.string "I wish that you would return with\n"
.string "two, perhaps more, POKéMON, please.$"