Files
pokeemerald/data/maps/BattleFrontier_BattlePyramidFloor/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

140 lines
4.9 KiB
PHP

BattleFrontier_BattlePyramidFloor_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidFloor_OnResume
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidFloor_OnFrame
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidFloor_OnTransition
.byte 0
BattleFrontier_BattlePyramidFloor_OnFrame:
map_script_2 VAR_TEMP_D, 1, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight
map_script_2 VAR_TEMP_PLAYING_PYRAMID_MUSIC, 0, BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic
map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName
.2byte 0
BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight::
lockall
@ pyramid_updatelight, cant use macro because it straddles the loop
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
setvar VAR_0x8005, 4
setvar VAR_0x8006, PYRAMID_LIGHT_INCR_RADIUS
setvar VAR_0x8007, SE_SAVE
setvar VAR_RESULT, 0
BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop::
special CallBattlePyramidFunction
delay 2
goto_if_ne VAR_RESULT, 2, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop
setvar VAR_TEMP_D, 0
releaseall
end
BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName::
special ShowMapNamePopup
setvar VAR_TEMP_F, 0
end
BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic::
playbgm MUS_B_PYRAMID, FALSE
setvar VAR_TEMP_PLAYING_PYRAMID_MUSIC, 1
end
BattleFrontier_BattlePyramidFloor_OnResume:
pyramid_setfloorpal
frontier_getstatus
switch VAR_TEMP_CHALLENGE_STATUS
case 0, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge
case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby
case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge
frontier_get FRONTIER_DATA_BATTLE_OUTCOME
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here
setvar VAR_TEMP_D, 1
BattleFrontier_BattlePyramidFloor_EventScript_ResetParty::
pyramid_resetparty
end
BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
pyramid_set PYRAMID_DATA_TRAINER_FLAGS, 255
BattleFrontier_BattlePyramid_EventScript_WarpToLobby::
pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS
pyramid_clearhelditems
special HealPlayerParty
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13
waitstate
end
BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge::
pyramid_save CHALLENGE_STATUS_SAVING
special SavePlayerParty
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
pyramid_settrainers
frontier_setpartyorder FRONTIER_PARTY_SIZE
setvar VAR_TEMP_F, 1
end
BattleFrontier_BattlePyramidFloor_OnTransition:
call BattleFrontier_BattlePyramidFloor_EventScript_SetLightRadius
setvar VAR_TEMP_F, 1
end
BattleFrontier_BattlePyramidFloor_EventScript_SetLightRadius::
pyramid_updatelight 32, PYRAMID_LIGHT_SET_RADIUS
return
BattlePyramid_WarpToNextFloor::
call BattleFrontier_EventScript_IncrementWinStreak
frontier_get FRONTIER_DATA_BATTLE_NUM @ Floor number
addvar VAR_RESULT, 1
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
goto_if_eq VAR_RESULT, 7, BattlePyramid_WarpToTop
pyramid_seedfloor
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_RESULT, 0
warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1
waitstate
end
BattlePyramid_WarpToTop::
warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 17, 17
waitstate
end
@ TRAINER_PHILLIP is used as a placeholder
BattlePyramid_TrainerBattle::
trainerbattle TRAINER_BATTLE_PYRAMID, TRAINER_PHILLIP, 0, BattleFacility_TrainerBattle_PlaceholderText, BattleFacility_TrainerBattle_PlaceholderText
pyramid_showhint
waitmessage
waitbuttonpress
closemessage
releaseall
end
BattlePyramid_FindItemBall::
pyramid_setitem
callstd STD_FIND_ITEM
goto_if_eq VAR_0x8007, 0, BattlePyramid_FindItemBallEnd
pyramid_hideitem
BattlePyramid_FindItemBallEnd::
end
BattlePyramid_Retire::
goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
.ifdef FRENCH
.include "data/maps/BattleFrontier_BattlePyramidFloor/text_fr.inc"
.else
.ifdef ITALIAN
.include "data/maps/BattleFrontier_BattlePyramidFloor/text_it.inc"
.else
.ifdef SPANISH
.include "data/maps/BattleFrontier_BattlePyramidFloor/text_es.inc"
.else
.include "data/maps/BattleFrontier_BattlePyramidFloor/text.inc"
.endif
.endif
.endif