mirror of https://github.com/pret/pokeemerald.git
Set up Battle Pyramid macros
This commit is contained in:
parent
9fcfbdbef5
commit
fdae25eab2
|
@ -1 +1,97 @@
|
|||
@ To be populated with macros for CallBattlePyramidFunction
|
||||
@ TODO: Add explanatory comments
|
||||
|
||||
@
|
||||
.macro pyramid_init
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_get data:req
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, \data
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_set data:req, val:req
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, \data
|
||||
setvar VAR_0x8006, \val
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_save challengeStatus:req
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SAVE
|
||||
setvar VAR_0x8005, \challengeStatus
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_setprize
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_PRIZE
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_seedfloor
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_setitem
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_hideitem
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_inittrainers
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_showhint
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@ VAR_RESULT is 1 if on a Pyramid floor, 2 if on the Pyramid peak
|
||||
.macro pyramid_inchallenge
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_updatelight radius:req, mode:req
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
|
||||
setvar VAR_0x8005, \radius
|
||||
setvar VAR_0x8006, \mode
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_clearhelditems
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@ BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE
|
||||
.macro pyramid_setfloorpal
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
||||
@
|
||||
.macro pyramid_healparty
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
|
||||
special CallBattlePyramidFunction
|
||||
.endm
|
||||
|
|
|
@ -455,21 +455,6 @@ gStdScripts_End:: @ 81DC2CC
|
|||
.include "data/maps/SSTidalLowerDeck/scripts.inc"
|
||||
.include "data/maps/SSTidalRooms/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare01/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare02/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare03/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare04/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare05/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare06/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare07/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare08/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare09/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare10/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare11/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare12/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare13/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare14/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare15/scripts.inc"
|
||||
.include "data/maps/BattlePyramidSquare16/scripts.inc"
|
||||
.include "data/maps/UnionRoom/scripts.inc"
|
||||
.include "data/maps/SafariZone_Northwest/scripts.inc"
|
||||
.include "data/maps/SafariZone_North/scripts.inc"
|
||||
|
|
|
@ -14,8 +14,8 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252A5D:: @ 8252A5D
|
|||
lockall
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
|
||||
setvar VAR_0x8005, 4
|
||||
setvar VAR_0x8006, 1
|
||||
setvar VAR_0x8007, 55
|
||||
setvar VAR_0x8006, PYRAMID_LIGHT_INCR_RADIUS
|
||||
setvar VAR_0x8007, SE_SAVE
|
||||
setvar VAR_RESULT, 0
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252A77:: @ 8252A77
|
||||
special CallBattlePyramidFunction
|
||||
|
@ -37,8 +37,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252A98:: @ 8252A98
|
|||
end
|
||||
|
||||
BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2: @ 8252AA2
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_setfloorpal
|
||||
frontier_getstatus
|
||||
switch VAR_TEMP_0
|
||||
case 0, BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D
|
||||
|
@ -60,39 +59,27 @@ BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2: @ 8252AA2
|
|||
frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here
|
||||
setvar VAR_TEMP_D, 1
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39:: @ 8252B39
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_healparty
|
||||
end
|
||||
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42:: @ 8252B42
|
||||
BattleFrontier_BattlePyramidTop_EventScript_252B42:: @ 8252B42
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, 7
|
||||
setvar VAR_0x8006, 255
|
||||
special CallBattlePyramidFunction
|
||||
|
||||
pyramid_set PYRAMID_DATA_TRAINER_FLAGS, 255
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B66:: @ 8252B66
|
||||
BattleFrontier_BattlePyramidTop_EventScript_252B66:: @ 8252B66
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
|
||||
setvar VAR_0x8005, 0
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS
|
||||
pyramid_clearhelditems
|
||||
special HealPlayerParty
|
||||
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13
|
||||
waitstate
|
||||
end
|
||||
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D:: @ 8252B8D
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
|
||||
setvar VAR_0x8005, 1
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_save CHALLENGE_STATUS_SAVING
|
||||
special SavePlayerParty
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_inittrainers
|
||||
frontier_setpartyorder FRONTIER_PARTY_SIZE
|
||||
setvar VAR_TEMP_F, 1
|
||||
end
|
||||
|
@ -103,10 +90,7 @@ BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA: @ 8252BCA
|
|||
end
|
||||
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252BD5:: @ 8252BD5
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
|
||||
setvar VAR_0x8005, 32
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_updatelight 32, PYRAMID_LIGHT_SET_RADIUS
|
||||
return
|
||||
|
||||
BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8
|
||||
|
@ -116,8 +100,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8
|
|||
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
|
||||
compare VAR_RESULT, 7
|
||||
goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_seedfloor
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
|
||||
setvar VAR_RESULT, 0
|
||||
warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE, 255, 1, 1
|
||||
|
@ -132,8 +115,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45:: @ 8252C45
|
|||
@ TRAINER_PHILLIP is used as a placeholder
|
||||
BattlePyramid_TrainerBattle:: @ 8252C4F
|
||||
trainerbattle TRAINER_BATTLE_PYRAMID, TRAINER_PHILLIP, 0, BattleFacility_TrainerBattle_PlaceholderText, BattleFacility_TrainerBattle_PlaceholderText
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_showhint
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
closemessage
|
||||
|
@ -141,14 +123,11 @@ BattlePyramid_TrainerBattle:: @ 8252C4F
|
|||
end
|
||||
|
||||
BattlePyramid_FindItemBall:: @ 8252C6A
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_setitem
|
||||
callstd STD_FIND_ITEM
|
||||
compare VAR_0x8007, 0
|
||||
goto_if_eq BattlePyramid_FindItemBall_End
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM
|
||||
special CallBattlePyramidFunction
|
||||
|
||||
pyramid_hideitem
|
||||
BattlePyramid_FindItemBall_End:: @ 8252C87
|
||||
end
|
||||
|
||||
|
|
|
@ -31,14 +31,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_250768:: @ 8250768
|
|||
playse SE_EXPMAX
|
||||
waitse
|
||||
closemessage
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, 1
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, 2
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_set PYRAMID_DATA_WIN_STREAK, 0
|
||||
pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
|
||||
setvar VAR_TEMP_0, 255
|
||||
releaseall
|
||||
|
@ -61,8 +55,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
|
|||
clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_clearhelditems
|
||||
special HealPlayerParty
|
||||
message BattleFrontier_BattlePyramidLobby_Text_2519F8
|
||||
waitmessage
|
||||
|
@ -73,11 +66,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
|
|||
msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS
|
||||
message BattleFrontier_BattlePyramidLobby_Text_251A77
|
||||
waitmessage
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_REWARD
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
|
||||
setvar VAR_0x8005, 0
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_setprize
|
||||
pyramid_save 0
|
||||
playse SE_SAVE
|
||||
waitse
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT
|
||||
|
@ -89,8 +79,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
|
|||
BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_clearhelditems
|
||||
special HealPlayerParty
|
||||
lockall
|
||||
message BattleFrontier_BattlePyramidLobby_Text_251B5A
|
||||
|
@ -99,13 +88,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852
|
|||
waitse
|
||||
message BattleFrontier_BattlePyramidLobby_Text_251A77
|
||||
waitmessage
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, 2
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
|
||||
setvar VAR_0x8005, 0
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||
pyramid_save 0
|
||||
playse SE_SAVE
|
||||
waitse
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT
|
||||
|
@ -164,18 +148,12 @@ BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904
|
|||
BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5
|
||||
setvar VAR_TEMP_0, 0
|
||||
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_CHALLENGE
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
|
||||
setvar VAR_0x8005, 2
|
||||
setvar VAR_0x8006, 1
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_init
|
||||
pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, TRUE
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
|
||||
frontier_set FRONTIER_DATA_PAUSED, FALSE
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR
|
||||
special CallBattlePyramidFunction
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_seedfloor
|
||||
pyramid_inittrainers
|
||||
special LoadPlayerParty
|
||||
closemessage
|
||||
delay 2
|
||||
|
@ -251,37 +229,29 @@ BattleFrontier_BattlePyramidLobby_EventScript_250B27:: @ 8250B27
|
|||
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_250B28:: @ 8250B28
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, 5
|
||||
special CallBattlePyramidFunction
|
||||
compare VAR_RESULT, 0
|
||||
pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_50
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B53
|
||||
setvar VAR_RESULT, 0
|
||||
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
|
||||
return
|
||||
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_250B53:: @ 8250B53
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, 3
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_get PYRAMID_DATA_WIN_STREAK_50
|
||||
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
|
||||
return
|
||||
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_250B66:: @ 8250B66
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, 6
|
||||
special CallBattlePyramidFunction
|
||||
compare VAR_RESULT, 0
|
||||
pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B91
|
||||
setvar VAR_RESULT, 0
|
||||
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
|
||||
return
|
||||
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_250B91:: @ 8250B91
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, 4
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_get PYRAMID_DATA_WIN_STREAK_OPEN
|
||||
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
|
||||
return
|
||||
|
||||
|
@ -404,9 +374,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250D56:: @ 8250D56
|
|||
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_250DCD
|
||||
waitmovement 0
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_251569, MSGBOX_DEFAULT
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
|
||||
setvar VAR_0x8005, 1
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_get PYRAMID_DATA_WIN_STREAK
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250D94
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_2515AD, MSGBOX_DEFAULT
|
||||
|
|
|
@ -6,10 +6,7 @@ BattleFrontier_BattlePyramidTop_MapScripts:: @ 82550A1
|
|||
.byte 0
|
||||
|
||||
BattleFrontier_BattlePyramidTop_MapScript1_2550B6: @ 82550B6
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
|
||||
setvar VAR_0x8005, 200
|
||||
setvar VAR_0x8006, 0
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_updatelight 200, PYRAMID_LIGHT_SET_RADIUS
|
||||
setvar VAR_TEMP_F, 1
|
||||
end
|
||||
|
||||
|
@ -64,13 +61,10 @@ BattleFrontier_BattlePyramidTop_EventScript_25518A:: @ 825518A
|
|||
end
|
||||
|
||||
BattleFrontier_BattlePyramidTop_EventScript_255193:: @ 8255193
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
|
||||
setvar VAR_0x8005, 1
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_save CHALLENGE_STATUS_SAVING
|
||||
special SavePlayerParty
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_inittrainers
|
||||
frontier_setpartyorder FRONTIER_PARTY_SIZE
|
||||
setvar VAR_TEMP_F, 1
|
||||
end
|
||||
|
|
|
@ -6,8 +6,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ 8243D92
|
|||
.byte 0
|
||||
|
||||
BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7: @ 8243DA7
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_healparty
|
||||
end
|
||||
|
||||
BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
BattlePyramidSquare01_MapScripts:: @ 823D1A5
|
||||
.byte 0
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_BOY_3",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare02_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_BOY_1",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare03_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_WOMAN_2",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare04_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_BOY_2",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare05_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_GIRL_2",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare06_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_LITTLE_BOY",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare07_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_LITTLE_GIRL",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare08_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_LITTLE_GIRL",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare09_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_GIRL_3",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare10_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_RICH_BOY",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare11_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_WOMAN_1",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare12_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_FAT_MAN",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare13_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_POKEFAN_F",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare14_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_POKEFAN_F",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
BattlePyramidSquare15_MapScripts:: @ 823D1A5
|
|
@ -13,6 +13,7 @@
|
|||
"show_map_name": false,
|
||||
"battle_scene": "MAP_BATTLE_SCENE_GYM",
|
||||
"connections": null,
|
||||
"shared_scripts_map": "BattlePyramidSquare01",
|
||||
"object_events": [
|
||||
{
|
||||
"graphics_id": "EVENT_OBJ_GFX_POKEFAN_F",
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
BattlePyramidSquare16_MapScripts:: @ 823D1A5
|
||||
.byte 0
|
||||
|
|
@ -32,11 +32,10 @@ EventScript_FrontierFieldWhiteOut:: @ 82736F8
|
|||
pike_inchallenge
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq BattleFrontier_BattlePike_EventScript_Retire
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
||||
special CallBattlePyramidFunction
|
||||
compare VAR_RESULT, 1
|
||||
pyramid_inchallenge
|
||||
compare VAR_RESULT, 1 @ On Pyramid floor
|
||||
goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42
|
||||
compare VAR_RESULT, 2
|
||||
compare VAR_RESULT, 2 @ On Pyramid peak
|
||||
goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42
|
||||
trainerhill_inchallenge
|
||||
compare VAR_RESULT, TRUE
|
||||
|
|
|
@ -128,8 +128,7 @@ EventScript_PickUpItem:: @ 8271C3A
|
|||
waitfanfare
|
||||
waitmessage
|
||||
bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
|
||||
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
|
||||
special CallBattlePyramidFunction
|
||||
pyramid_inchallenge
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq EventScript_PutBattlePyramidItemInBag
|
||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||
|
|
|
@ -27,23 +27,35 @@
|
|||
#define OBJ_POSITIONS_NEAR_EXIT 4
|
||||
|
||||
// Functions IDs for sBattlePyramidFunctions / CallBattlePyramidFunction
|
||||
#define BATTLE_PYRAMID_FUNC_INIT_CHALLENGE 0
|
||||
#define BATTLE_PYRAMID_FUNC_INIT 0
|
||||
#define BATTLE_PYRAMID_FUNC_GET_DATA 1
|
||||
#define BATTLE_PYRAMID_FUNC_SET_DATA 2
|
||||
#define BATTLE_PYRAMID_FUNC_3 3
|
||||
#define BATTLE_PYRAMID_FUNC_SET_REWARD 4
|
||||
#define BATTLE_PYRAMID_FUNC_GIVE_REWARD 5
|
||||
#define BATTLE_PYRAMID_FUNC_SAVE 3
|
||||
#define BATTLE_PYRAMID_FUNC_SET_PRIZE 4
|
||||
#define BATTLE_PYRAMID_FUNC_GIVE_PRIZE 5 // unused
|
||||
#define BATTLE_PYRAMID_FUNC_SEED_FLOOR 6
|
||||
#define BATTLE_PYRAMID_FUNC_SET_ITEM 7
|
||||
#define BATTLE_PYRAMID_FUNC_HIDE_ITEM 8
|
||||
#define BATTLE_PYRAMID_FUNC_INIT_TRAINERS 9
|
||||
#define BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT 10
|
||||
#define BATTLE_PYRAMID_FUNC_UPDATE_STREAK 11
|
||||
#define BATTLE_PYRAMID_FUNC_UPDATE_STREAK 11 // unused
|
||||
#define BATTLE_PYRAMID_FUNC_IS_IN 12
|
||||
#define BATTLE_PYRAMID_FUNC_UPDATE_LIGHT 13
|
||||
#define BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS 14
|
||||
#define BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE 15
|
||||
#define BATTLE_PYRAMID_FUNC_16 16
|
||||
#define BATTLE_PYRAMID_FUNC_16 16 // unused
|
||||
#define BATTLE_PYRAMID_FUNC_RESTORE_PARTY 17
|
||||
|
||||
#define PYRAMID_DATA_PRIZE 0
|
||||
#define PYRAMID_DATA_WIN_STREAK 1
|
||||
#define PYRAMID_DATA_WIN_STREAK_ACTIVE 2
|
||||
#define PYRAMID_DATA_WIN_STREAK_50 3 // the below streak data are redundant with the above when frontier.lvlMode is correct
|
||||
#define PYRAMID_DATA_WIN_STREAK_OPEN 4
|
||||
#define PYRAMID_DATA_WIN_STREAK_ACTIVE_50 5
|
||||
#define PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN 6
|
||||
#define PYRAMID_DATA_TRAINER_FLAGS 7
|
||||
|
||||
#define PYRAMID_LIGHT_SET_RADIUS 0
|
||||
#define PYRAMID_LIGHT_INCR_RADIUS 1
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_PYRAMID_H
|
||||
|
|
|
@ -787,24 +787,24 @@ static const u8 sHintTextTypes[] =
|
|||
|
||||
static void (* const sBattlePyramidFunctions[])(void) =
|
||||
{
|
||||
InitPyramidChallenge,
|
||||
GetBattlePyramidData,
|
||||
SetBattlePyramidData,
|
||||
SavePyramidChallenge,
|
||||
SetBattlePyramidPrize,
|
||||
GiveBattlePyramidPrize,
|
||||
SeedPyramidFloor,
|
||||
SetPickupItem,
|
||||
HidePyramidItem,
|
||||
InitPyramidFacilityTrainers,
|
||||
ShowPostBattleHintText,
|
||||
UpdatePyramidWinStreak,
|
||||
GetInBattlePyramid,
|
||||
UpdatePyramidLightRadius,
|
||||
ClearPyramidPartyHeldItems,
|
||||
SetPyramidFloorPalette,
|
||||
sub_81A9828,
|
||||
RestorePyramidPlayerParty,
|
||||
[BATTLE_PYRAMID_FUNC_INIT] = InitPyramidChallenge,
|
||||
[BATTLE_PYRAMID_FUNC_GET_DATA] = GetBattlePyramidData,
|
||||
[BATTLE_PYRAMID_FUNC_SET_DATA] = SetBattlePyramidData,
|
||||
[BATTLE_PYRAMID_FUNC_SAVE] = SavePyramidChallenge,
|
||||
[BATTLE_PYRAMID_FUNC_SET_PRIZE] = SetBattlePyramidPrize,
|
||||
[BATTLE_PYRAMID_FUNC_GIVE_PRIZE] = GiveBattlePyramidPrize,
|
||||
[BATTLE_PYRAMID_FUNC_SEED_FLOOR] = SeedPyramidFloor,
|
||||
[BATTLE_PYRAMID_FUNC_SET_ITEM] = SetPickupItem,
|
||||
[BATTLE_PYRAMID_FUNC_HIDE_ITEM] = HidePyramidItem,
|
||||
[BATTLE_PYRAMID_FUNC_INIT_TRAINERS] = InitPyramidFacilityTrainers,
|
||||
[BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT] = ShowPostBattleHintText,
|
||||
[BATTLE_PYRAMID_FUNC_UPDATE_STREAK] = UpdatePyramidWinStreak,
|
||||
[BATTLE_PYRAMID_FUNC_IS_IN] = GetInBattlePyramid,
|
||||
[BATTLE_PYRAMID_FUNC_UPDATE_LIGHT] = UpdatePyramidLightRadius,
|
||||
[BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS] = ClearPyramidPartyHeldItems,
|
||||
[BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE] = SetPyramidFloorPalette,
|
||||
[BATTLE_PYRAMID_FUNC_16] = sub_81A9828,
|
||||
[BATTLE_PYRAMID_FUNC_RESTORE_PARTY] = RestorePyramidPlayerParty,
|
||||
};
|
||||
|
||||
static const u16 sShortStreakRewardItems[] = {ITEM_HP_UP, ITEM_PROTEIN, ITEM_IRON, ITEM_CALCIUM, ITEM_CARBOS, ITEM_ZINC};
|
||||
|
@ -868,28 +868,28 @@ static void GetBattlePyramidData(void)
|
|||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
case 0:
|
||||
case PYRAMID_DATA_PRIZE:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.pyramidPrize;
|
||||
break;
|
||||
case 1:
|
||||
case PYRAMID_DATA_WIN_STREAK:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode];
|
||||
break;
|
||||
case 2:
|
||||
case PYRAMID_DATA_WIN_STREAK_ACTIVE:
|
||||
if (lvlMode != FRONTIER_LVL_50)
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.winStreakActiveFlags & STREAK_PYRAMID_OPEN;
|
||||
else
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.winStreakActiveFlags & STREAK_PYRAMID_50;
|
||||
break;
|
||||
case 3:
|
||||
case PYRAMID_DATA_WIN_STREAK_50:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50];
|
||||
break;
|
||||
case 4:
|
||||
case PYRAMID_DATA_WIN_STREAK_OPEN:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN];
|
||||
break;
|
||||
case 5:
|
||||
case PYRAMID_DATA_WIN_STREAK_ACTIVE_50:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.winStreakActiveFlags & STREAK_PYRAMID_50;
|
||||
break;
|
||||
case 6:
|
||||
case PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN:
|
||||
gSpecialVar_Result = gSaveBlock2Ptr->frontier.winStreakActiveFlags & STREAK_PYRAMID_OPEN;
|
||||
break;
|
||||
}
|
||||
|
@ -901,13 +901,13 @@ static void SetBattlePyramidData(void)
|
|||
|
||||
switch (gSpecialVar_0x8005)
|
||||
{
|
||||
case 0:
|
||||
case PYRAMID_DATA_PRIZE:
|
||||
gSaveBlock2Ptr->frontier.pyramidPrize = gSpecialVar_0x8006;
|
||||
break;
|
||||
case 1:
|
||||
case PYRAMID_DATA_WIN_STREAK:
|
||||
gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] = gSpecialVar_0x8006;
|
||||
break;
|
||||
case 2:
|
||||
case PYRAMID_DATA_WIN_STREAK_ACTIVE:
|
||||
if (lvlMode != FRONTIER_LVL_50)
|
||||
{
|
||||
if (gSpecialVar_0x8006)
|
||||
|
@ -923,7 +923,7 @@ static void SetBattlePyramidData(void)
|
|||
gSaveBlock2Ptr->frontier.winStreakActiveFlags &= ~(STREAK_PYRAMID_50);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
case PYRAMID_DATA_TRAINER_FLAGS:
|
||||
gSaveBlock2Ptr->frontier.pyramidTrainerFlags = gSpecialVar_0x8006;
|
||||
break;
|
||||
}
|
||||
|
@ -1004,6 +1004,7 @@ static void SetPickupItem(void)
|
|||
else
|
||||
gSpecialVar_0x8000 = sPickupItemsLvl50[round][sPickupItemSlots[i][1]];
|
||||
|
||||
// Quantity of item to give
|
||||
gSpecialVar_0x8001 = 1;
|
||||
}
|
||||
|
||||
|
@ -1122,10 +1123,10 @@ static void UpdatePyramidLightRadius(void)
|
|||
{
|
||||
switch (gSpecialVar_0x8006)
|
||||
{
|
||||
case 0:
|
||||
case PYRAMID_LIGHT_SET_RADIUS:
|
||||
gSaveBlock2Ptr->frontier.pyramidLightRadius = gSpecialVar_0x8005;
|
||||
break;
|
||||
case 1:
|
||||
case PYRAMID_LIGHT_INCR_RADIUS:
|
||||
switch (gSpecialVar_Result)
|
||||
{
|
||||
case 0:
|
||||
|
|
Loading…
Reference in New Issue