Files
pokeemerald/data/maps/RusturfTunnel/scripts.inc
T
Eduardo Quezada 70bad62f9b Merge remote-tracking branch '_pret_origin/master' into multilanguage/sync
# Conflicts:
#	Makefile
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/maps/OldaleTown/scripts.inc
#	data/maps/Route110_TrickHousePuzzle7/scripts.inc
#	data/maps/Route110_TrickHousePuzzle8/scripts.inc
#	data/scripts/roulette.inc
#	data/tilesets/graphics.inc
#	data/tilesets/metatiles.inc
#	graphics/trainer_card/0star_fr.pal
#	graphics/trainer_card/four_stars_fr.pal
#	graphics/trainer_card/frlg/0star.pal
#	graphics/trainer_card/frlg/blue.pal
#	graphics/trainer_card/frlg/bronze.pal
#	graphics/trainer_card/frlg/card.png
#	graphics/trainer_card/frlg/four_stars.pal
#	graphics/trainer_card/frlg/gold.pal
#	graphics/trainer_card/frlg/green.pal
#	graphics/trainer_card/frlg/one_star.pal
#	graphics/trainer_card/frlg/silver.pal
#	graphics/trainer_card/frlg/three_stars.pal
#	graphics/trainer_card/frlg/two_stars.pal
#	graphics/trainer_card/one_star_fr.pal
#	graphics/trainer_card/three_stars_fr.pal
#	graphics/trainer_card/two_stars_fr.pal
#	src/battle_message.c
#	src/battle_tent.c
#	src/berry_blender.c
#	src/berry_tag_screen.c
#	src/data/bard_music/length_table.h
#	src/data/credits.h
#	src/data/items.h
#	src/data/pokemon/pokedex_orders.h
#	src/data/region_map/region_map_entries.h
#	src/easy_chat.c
#	src/field_region_map.c
#	src/graphics.c
#	src/item.c
#	src/item_menu.c
#	src/menu_specialized.c
#	src/pokedex.c
#	src/pokedex_cry_screen.c
#	src/pokemon_jump.c
#	src/pokenav_conditions_search_results.c
#	src/pokenav_match_call_gfx.c
#	src/pokenav_ribbons_list.c
#	src/shop.c
#	src/trade.c
#	src/trainer_card.c
#	src/wireless_communication_status_screen.c
2024-07-05 18:38:49 -04:00

439 lines
11 KiB
C++

.equ LOCALID_WANDAS_BF, 1
.set LOCALID_BRINEY, 5
.set LOCALID_GRUNT, 6
.set LOCALID_PEEKO, 7
.equ LOCALID_WANDA, 10
RusturfTunnel_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, RusturfTunnel_OnTransition
map_script MAP_SCRIPT_ON_FRAME_TABLE, RusturfTunnel_OnFrame
.byte 0
RusturfTunnel_OnFrame:
map_script_2 VAR_RUSTURF_TUNNEL_STATE, 4, RusturfTunnel_EventScript_ClearTunnelScene
map_script_2 VAR_RUSTURF_TUNNEL_STATE, 5, RusturfTunnel_EventScript_ClearTunnelScene
.2byte 0
RusturfTunnel_OnTransition:
call_if_eq VAR_RUSTURF_TUNNEL_STATE, 2, RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos
end
RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos::
setobjectxyperm LOCALID_PEEKO, 13, 4
setobjectxyperm LOCALID_GRUNT, 13, 5
return
RusturfTunnel_EventScript_Wanda::
lock
faceplayer
msgbox RusturfTunnel_Text_BoyfriendOnOtherSideOfRock, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
RusturfTunnel_EventScript_WandasBoyfriend::
lock
faceplayer
goto_if_set FLAG_TEMP_1, RusturfTunnel_EventScript_AlreadySpokenTo
setflag FLAG_TEMP_1
msgbox RusturfTunnel_Text_WhyCantTheyKeepDigging, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
RusturfTunnel_EventScript_AlreadySpokenTo::
msgbox RusturfTunnel_Text_ToGetToVerdanturf, MSGBOX_DEFAULT
closemessage
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
RusturfTunnel_EventScript_ClearTunnelScene::
lockall
call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_FaceWandasBoyfriend1
call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_FaceWandasBoyfriend2
call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_FaceWandasBoyfriend3
call RusturfTunnel_EventScript_WandasBoyfriendNotice
msgbox RusturfTunnel_Text_YouShatteredBoulderTakeHM, MSGBOX_DEFAULT
call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer
call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer
giveitem ITEM_HM_STRENGTH
setflag FLAG_RECEIVED_HM_STRENGTH
msgbox RusturfTunnel_Text_ExplainStrength, MSGBOX_DEFAULT
closemessage
call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_BoyfriendApproachWanda1
call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_BoyfriendApproachWanda2
call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_BoyfriendApproachWanda3
msgbox RusturfTunnel_Text_WandaReunion, MSGBOX_DEFAULT
closemessage
call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_WandaAndBoyfriendExit1
call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandaAndBoyfriendExit
call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandaAndBoyfriendExit
call RusturfTunnel_EventScript_SetRusturfTunnelOpen
releaseall
end
RusturfTunnel_EventScript_BoyfriendApproachWanda1::
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend1
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda1
waitmovement 0
return
RusturfTunnel_EventScript_BoyfriendApproachWanda2::
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda
waitmovement 0
applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
return
RusturfTunnel_EventScript_BoyfriendApproachWanda3::
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda
waitmovement 0
applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
return
RusturfTunnel_EventScript_FaceWandasBoyfriend1::
applymovement LOCALID_WANDAS_BF, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
return
RusturfTunnel_EventScript_FaceWandasBoyfriend2::
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendFaceRight
waitmovement 0
return
RusturfTunnel_EventScript_FaceWandasBoyfriend3::
return
RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer::
closemessage
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendApproachPlayer
waitmovement 0
return
RusturfTunnel_EventScript_WandaAndBoyfriendExit1::
applymovement LOCALID_WANDA, RusturfTunnel_Movement_WandaExit1
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit1
waitmovement 0
return
RusturfTunnel_EventScript_WandaAndBoyfriendExit::
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchWandaExit
applymovement LOCALID_WANDA, RusturfTunnel_Movement_WandaExit
applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit
waitmovement 0
return
RusturfTunnel_EventScript_WandasBoyfriendNotice::
playse SE_PIN
applymovement LOCALID_WANDAS_BF, Common_Movement_ExclamationMark
waitmovement 0
applymovement LOCALID_WANDAS_BF, Common_Movement_Delay48
waitmovement 0
return
RusturfTunnel_Movement_WandaExit1:
walk_right
walk_right
walk_right
walk_right
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
step_end
RusturfTunnel_Movement_WandaExit:
walk_right
walk_right
walk_right
walk_right
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
step_end
RusturfTunnel_Movement_PlayerWatchWandaExit:
delay_8
walk_in_place_faster_up
delay_16
delay_16
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_Unused1:
walk_left
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_Unused2:
walk_down
walk_in_place_faster_up
delay_8
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_Unused3:
walk_up
walk_in_place_faster_down
delay_8
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_PlayerWatchBoyfriend1:
walk_left
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_PlayerWatchBoyfriend:
walk_right
walk_in_place_faster_left
step_end
RusturfTunnel_Movement_BoyfriendFaceRight:
walk_up
walk_in_place_faster_right
step_end
RusturfTunnel_Movement_WandasBoyfriendExit1:
walk_right
walk_right
walk_right
walk_right
walk_right
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
step_end
RusturfTunnel_Movement_WandasBoyfriendExit:
walk_up
walk_right
walk_right
walk_right
walk_right
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
walk_down
step_end
RusturfTunnel_Movement_WandasBoyfriendApproachPlayer:
walk_right
step_end
RusturfTunnel_Movement_BoyfriendApproachWanda1:
walk_in_place_fast_up
walk_in_place_fast_up
walk_fast_up
walk_fast_right
step_end
RusturfTunnel_Movement_BoyfriendApproachWanda:
walk_in_place_fast_right
walk_in_place_fast_right
walk_fast_right
walk_in_place_faster_up
step_end
RusturfTunnel_EventScript_TunnelBlockagePos1::
setvar VAR_TEMP_1, 1
end
RusturfTunnel_EventScript_TunnelBlockagePos2::
setvar VAR_TEMP_1, 2
end
RusturfTunnel_EventScript_TunnelBlockagePos3::
setvar VAR_TEMP_1, 3
end
RusturfTunnel_EventScript_AquaGruntBackUp::
lockall
msgbox RusturfTunnel_Text_ComeAndGetSome, MSGBOX_DEFAULT
closemessage
applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp
applymovement LOCALID_PEEKO, RusturfTunnel_Movement_GruntAndPeekoBackUp
waitmovement 0
copyobjectxytoperm LOCALID_GRUNT
copyobjectxytoperm LOCALID_PEEKO
setvar VAR_RUSTURF_TUNNEL_STATE, 3
releaseall
end
RusturfTunnel_Movement_GruntAndPeekoBackUp:
lock_facing_direction
walk_right
unlock_facing_direction
step_end
RusturfTunnel_EventScript_Peeko::
lock
faceplayer
waitse
playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL
msgbox RusturfTunnel_Text_Peeko, MSGBOX_DEFAULT
waitmoncry
release
end
RusturfTunnel_EventScript_Grunt::
lock
faceplayer
playbgm MUS_ENCOUNTER_AQUA, FALSE
msgbox RusturfTunnel_Text_GruntIntro, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_GRUNT_RUSTURF_TUNNEL, RusturfTunnel_Text_GruntDefeat
msgbox RusturfTunnel_Text_GruntTakePackage, MSGBOX_DEFAULT
giveitem ITEM_DEVON_GOODS
closemessage
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PushPlayerAsideForGrunt
applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntEscape
waitmovement 0
removeobject LOCALID_GRUNT
delay 50
addobject LOCALID_BRINEY
applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko1
waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerMoveAsideForBriney
applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko2
waitmovement 0
msgbox RusturfTunnel_Text_PeekoGladToSeeYouSafe, MSGBOX_DEFAULT
applymovement LOCALID_BRINEY, Common_Movement_FacePlayer
waitmovement 0
message RusturfTunnel_Text_ThankYouLetsGoHomePeeko
waitmessage
waitse
playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL
waitbuttonpress
waitmoncry
closemessage
applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBrineyExit
applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyExit
applymovement LOCALID_PEEKO, RusturfTunnel_Movement_PeekoExit
waitmovement 0
removeobject LOCALID_BRINEY
removeobject LOCALID_PEEKO
clearflag FLAG_DEVON_GOODS_STOLEN
setflag FLAG_RECOVERED_DEVON_GOODS
setvar VAR_RUSTBORO_CITY_STATE, 4
setvar VAR_BRINEY_HOUSE_STATE, 1
setflag FLAG_HIDE_ROUTE_116_MR_BRINEY
release
end
RusturfTunnel_Movement_PushPlayerAsideForGrunt:
face_down
lock_facing_direction
walk_up
unlock_facing_direction
walk_in_place_faster_left
step_end
RusturfTunnel_Movement_PlayerMoveAsideForBriney:
walk_down
walk_in_place_faster_up
step_end
RusturfTunnel_Movement_GruntEscape:
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
walk_fast_left
step_end
RusturfTunnel_Movement_BrineyApproachPeeko1:
walk_right
walk_right
walk_right
walk_right
walk_right
walk_right
walk_right
step_end
RusturfTunnel_Movement_BrineyExit:
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
step_end
RusturfTunnel_Movement_PlayerWatchBrineyExit:
delay_16
delay_8
delay_4
walk_in_place_faster_left
step_end
RusturfTunnel_Movement_BrineyApproachPeeko2:
delay_16
walk_right
step_end
RusturfTunnel_Movement_PeekoExit:
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
walk_left
step_end
RusturfTunnel_EventScript_Mike::
trainerbattle_single TRAINER_MIKE_2, RusturfTunnel_Text_MikeIntro, RusturfTunnel_Text_MikeDefeat
msgbox RusturfTunnel_Text_MikePostBattle, MSGBOX_AUTOCLOSE
end
.ifdef FRENCH
.include "data/maps/RusturfTunnel/text_fr.inc"
.else
.ifdef ITALIAN
.include "data/maps/RusturfTunnel/text_it.inc"
.else
.ifdef SPANISH
.include "data/maps/RusturfTunnel/text_es.inc"
.else
.include "data/maps/RusturfTunnel/text.inc"
.endif
.endif
.endif