Files
Pokemon-Firered/data/maps/PewterCity_Gym/scripts.inc
T
2022-06-24 21:10:48 -04:00

86 lines
2.6 KiB
ObjectPascal

PewterCity_Gym_MapScripts::
.byte 0
PewterCity_Gym_EventScript_Brock::
famechecker FAMECHECKER_BROCK, FCPICKSTATE_COLORED, UpdatePickStateFromSpecialVar8005
trainerbattle_single TRAINER_LEADER_BROCK, PewterCity_Gym_Text_BrockIntro, PewterCity_Gym_Text_BrockDefeat, PewterCity_Gym_EventScript_DefeatedBrock, NO_MUSIC
goto_if_unset FLAG_GOT_TM39_FROM_BROCK, PewterCity_Gym_EventScript_GiveTM39
msgbox PewterCity_Gym_Text_BrockPostBattle
release
end
PewterCity_Gym_EventScript_DefeatedBrock::
famechecker FAMECHECKER_BROCK, 1
setflag FLAG_DEFEATED_BROCK
setflag FLAG_BADGE01_GET
setvar VAR_MAP_SCENE_PEWTER_CITY, 1
setflag FLAG_HIDE_PEWTER_CITY_GYM_GUIDE
clearflag FLAG_HIDE_PEWTER_CITY_RUNNING_SHOES_GUY
set_gym_trainers 1
goto PewterCity_Gym_EventScript_GiveTM39
end
PewterCity_Gym_EventScript_GiveTM39::
msgbox PewterCity_Gym_Text_TakeThisWithYou
checkitemspace ITEM_TM39, 1
compare VAR_RESULT, FALSE
goto_if_eq PewterCity_Gym_EventScript_NoRoomForTM39
giveitem_msg PewterCity_Gym_Text_ReceivedTM39FromBrock, ITEM_TM39
setflag FLAG_GOT_TM39_FROM_BROCK
msgbox PewterCity_Gym_Text_ExplainTM39
release
end
PewterCity_Gym_EventScript_NoRoomForTM39::
msgbox PewterCity_Gym_Text_DontHaveRoomForThis
release
end
PewterCity_Gym_EventScript_Liam::
trainerbattle_single TRAINER_CAMPER_LIAM, PewterCity_Gym_Text_LiamIntro, PewterCity_Gym_Text_LiamDefeat
msgbox PewterCity_Gym_Text_LiamPostBattle, MSGBOX_AUTOCLOSE
end
PewterCity_Gym_EventScript_GymGuy::
lock
faceplayer
goto_if_set FLAG_DEFEATED_BROCK, PewterCity_Gym_EventScript_GymGuyPostVictory
msgbox PewterCity_Gym_Text_LetMeTakeYouToTheTop, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq PewterCity_Gym_EventScript_GymGuyTakeMeToTop
compare VAR_RESULT, NO
goto_if_eq PewterCity_Gym_EventScript_GymGuyDontTakeMeToTop
end
PewterCity_Gym_EventScript_GymGuyPostVictory::
msgbox PewterCity_Gym_Text_YoureChampMaterial
release
end
PewterCity_Gym_EventScript_GymGuyTakeMeToTop::
msgbox PewterCity_Gym_Text_LetsGetHappening
goto PewterCity_Gym_EventScript_GymGuyAdvice
end
PewterCity_Gym_EventScript_GymGuyDontTakeMeToTop::
msgbox PewterCity_Gym_Text_ItsFreeLetsGetHappening
goto PewterCity_Gym_EventScript_GymGuyAdvice
end
PewterCity_Gym_EventScript_GymGuyAdvice::
msgbox PewterCity_Gym_Text_TryDifferentPartyOrders
release
end
PewterCity_Gym_EventScript_GymStatue::
lockall
goto_if_set FLAG_BADGE01_GET, PewterCity_Gym_EventScript_GymStatuePostVictory
msgbox PewterCity_Gym_Text_GymStatue
releaseall
end
PewterCity_Gym_EventScript_GymStatuePostVictory::
msgbox PewterCity_Gym_Text_GymStatuePlayerWon
releaseall
end