tumbledemerald-legacy/data/maps/EverGrandeCity_DrakesRoom/scripts.inc

95 lines
3.3 KiB
PHP

EverGrandeCity_DrakesRoom_MapScripts::
map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_DrakesRoom_OnFrame
map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_DrakesRoom_OnLoad
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_SidneysRoom_OnWarp
.byte 0
@ Unused, Drake uses Sidneys identical OnWarp for some reason
EverGrandeCity_DrakesRoom_OnWarp:
map_script_2 VAR_TEMP_1, 0, EverGrandeCity_DrakesRoom_EventScript_PlayerTurnNorth
.2byte 0
EverGrandeCity_DrakesRoom_EventScript_PlayerTurnNorth::
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
end
EverGrandeCity_DrakesRoom_OnFrame:
map_script_2 VAR_ELITE_4_STATE, 3, EverGrandeCity_DrakesRoom_EventScript_WalkInCloseDoor
.2byte 0
EverGrandeCity_DrakesRoom_EventScript_WalkInCloseDoor::
lockall
call PokemonLeague_EliteFour_EventScript_WalkInCloseDoor
setvar VAR_ELITE_4_STATE, 4
releaseall
end
EverGrandeCity_DrakesRoom_OnLoad:
call_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom
call_if_eq VAR_ELITE_4_STATE, 4, EverGrandeCity_DrakesRoom_EventScript_CloseDoor
end
EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom::
call PokemonLeague_EliteFour_EventScript_ResetAdvanceToNextRoom
return
EverGrandeCity_DrakesRoom_EventScript_CloseDoor::
call PokemonLeague_EliteFour_EventScript_CloseDoor
return
EverGrandeCity_DrakesRoom_EventScript_Drake::
lock
faceplayer
goto_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_PostBattleSpeech
playbgm MUS_ENCOUNTER_ELITE_FOUR, FALSE
msgbox EverGrandeCity_DrakesRoom_Text_IntroSpeech, MSGBOX_DEFAULT
setvar VAR_FORCE_BATTLE_ANIMS, 1
trainerbattle_no_intro TRAINER_DRAKE, EverGrandeCity_DrakesRoom_Text_Defeat
goto EverGrandeCity_DrakesRoom_EventScript_Defeated
end
EverGrandeCity_DrakesRoom_EventScript_PostBattleSpeech::
msgbox EverGrandeCity_DrakesRoom_Text_PostBattleSpeech, MSGBOX_DEFAULT
release
end
EverGrandeCity_DrakesRoom_EventScript_Defeated::
setvar VAR_FORCE_BATTLE_ANIMS, 0
setvar VAR_0x8004, FANCOUNTER_DEFEATED_DRAKE
special Script_TryGainNewFanFromCounter
setflag FLAG_DEFEATED_ELITE_4_DRAKE
call PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles
msgbox EverGrandeCity_DrakesRoom_Text_PostBattleSpeech, MSGBOX_DEFAULT
release
end
EverGrandeCity_DrakesRoom_Text_IntroSpeech:
.string "I am the last of the Pokémon League\n"
.string "Elite Four, Drake the Dragon master!\p"
.string "In their natural state, Pokémon are\n"
.string "wild living things. They are free.\p"
.string "At times, they hinder us.\n"
.string "At times, they help us.\p"
.string "For us to battle with Pokémon as\n"
.string "partners, do you know what it takes?\p"
.string "Do you know what is needed?\p"
.string "If you don't, then you will never\n"
.string "prevail over me!$"
EverGrandeCity_DrakesRoom_Text_Defeat:
.string "Superb, it should be said.$"
EverGrandeCity_DrakesRoom_Text_PostBattleSpeech:
.string "You deserve every credit for coming\n"
.string "this far as a Trainer of Pokémon.\p"
.string "You do seem to know what is needed.\p"
.string "Yes, what a Trainer needs is a\n"
.string "virtuous heart.\p"
.string "Pokémon touch the good hearts of\n"
.string "Trainers and learn good from wrong.\p"
.string "They touch the good hearts of\n"
.string "Trainers and grow strong.\p"
.string "Go! Go onwards!\n"
.string "The Champion is waiting!$"