Merge branch 'master' into fix-eventobj

This commit is contained in:
GriffinR
2019-12-06 02:34:54 -05:00
committed by GitHub
106 changed files with 1965 additions and 1418 deletions
+26 -5
View File
@@ -1,22 +1,24 @@
@ TODO: These need to have description comment @ TRUE if the player has talked to the Apprentice and answered their level mode question
.macro apprentice_gavelvlmode .macro apprentice_gavelvlmode
setvar VAR_0x8004, APPRENTICE_FUNC_GAVE_LVLMODE setvar VAR_0x8004, APPRENTICE_FUNC_GAVE_LVLMODE
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Set the level mode the Apprentice should battle in
.macro apprentice_setlvlmode lvlmode:req .macro apprentice_setlvlmode lvlmode:req
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LVLMODE setvar VAR_0x8004, APPRENTICE_FUNC_SET_LVLMODE
setorcopyvar VAR_0x8005, \lvlmode setorcopyvar VAR_0x8005, \lvlmode
addvar VAR_0x8005, 1 addvar VAR_0x8005, 1 @ Apprentice lvl mode is +1 from regular lvl mode value
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Question was answered, increment the number of questions answered
.macro apprentice_answeredquestion .macro apprentice_answeredquestion
setvar VAR_0x8004, APPRENTICE_FUNC_ANSWERED_QUESTION setvar VAR_0x8004, APPRENTICE_FUNC_ANSWERED_QUESTION
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Show the response selection box to answer the Apprentice question. Menus are defined as APPRENTICE_ASK_*
.macro apprentice_menu which:req .macro apprentice_menu which:req
setvar VAR_0x8004, APPRENTICE_FUNC_MENU setvar VAR_0x8004, APPRENTICE_FUNC_MENU
setvar VAR_0x8005, \which setvar VAR_0x8005, \which
@@ -24,16 +26,19 @@
waitstate waitstate
.endm .endm
@ Shuffle and set the Apprentice party mons to pick between from their list of possible party species
.macro apprentice_shufflespecies .macro apprentice_shufflespecies
setvar VAR_0x8004, APPRENTICE_FUNC_SHUFFLE_SPECIES setvar VAR_0x8004, APPRENTICE_FUNC_SHUFFLE_SPECIES
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Randomize the question data (e.g. moves to pick between) and shuffle the order to ask them in
.macro apprentice_randomizequestions .macro apprentice_randomizequestions
setvar VAR_0x8004, APPRENTICE_FUNC_RANDOMIZE_QUESTIONS setvar VAR_0x8004, APPRENTICE_FUNC_RANDOMIZE_QUESTIONS
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Print the APPRENTICE_MSG_* text for the current Apprentice
.macro apprentice_msg waitbuttonpress:req, which:req .macro apprentice_msg waitbuttonpress:req, which:req
setvar VAR_0x8004, APPRENTICE_FUNC_PRINT_MSG setvar VAR_0x8004, APPRENTICE_FUNC_PRINT_MSG
setvar VAR_0x8005, \waitbuttonpress setvar VAR_0x8005, \waitbuttonpress
@@ -42,46 +47,54 @@
waitstate waitstate
.endm .endm
@ Clear the data for the current Player Apprentice
.macro apprentice_reset .macro apprentice_reset
setvar VAR_0x8004, APPRENTICE_FUNC_RESET setvar VAR_0x8004, APPRENTICE_FUNC_RESET
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
.macro apprentice_shouldcheckgone .macro apprentice_shouldcheckgone
setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Return the APPRENTICE_QUESTION_* value for the current question to ask
.macro apprentice_getquestion .macro apprentice_getquestion
setvar VAR_0x8004, APPRENTICE_FUNC_GET_QUESTION setvar VAR_0x8004, APPRENTICE_FUNC_GET_QUESTION
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Get the number of mons that have been chosen for the Apprentice's party so far
.macro apprentice_getnumpartymons .macro apprentice_getnumpartymons
setvar VAR_0x8004, APPRENTICE_FUNC_GET_NUM_PARTY_MONS setvar VAR_0x8004, APPRENTICE_FUNC_GET_NUM_PARTY_MONS
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Set the Apprentice party mon at the given slot. VAR_0x8005 is used implicitly as which of the 2 mons was selected
.macro apprentice_setpartymon slot:req .macro apprentice_setpartymon slot:req
copyvar VAR_0x8006, \slot copyvar VAR_0x8006, \slot
setvar VAR_0x8004, APPRENTICE_FUNC_SET_PARTY_MON setvar VAR_0x8004, APPRENTICE_FUNC_SET_PARTY_MON
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Allocate and set up data to track about the question
.macro apprentice_initquestion which:req .macro apprentice_initquestion which:req
setvar VAR_0x8004, APPRENTICE_FUNC_INIT_QUESTION_DATA setvar VAR_0x8004, APPRENTICE_FUNC_INIT_QUESTION_DATA
setvar VAR_0x8005, \which setvar VAR_0x8005, \which
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Free allocated question data
.macro apprentice_freequestion .macro apprentice_freequestion
setvar VAR_0x8004, APPRENTICE_FUNC_FREE_QUESTION_DATA setvar VAR_0x8004, APPRENTICE_FUNC_FREE_QUESTION_DATA
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
.macro apprentice_buff whichstringvar:req, tobuff:req @ Buffer some APPRENTICE_BUFF_* string to the given stringvar (0 for STR_VAR_1, 1 for STR_VAR_2, 2 for STR_VAR_3)
.macro apprentice_buff stringvar:req, tobuff:req
setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING
setvar VAR_0x8005, \whichstringvar setvar VAR_0x8005, \stringvar
.if \tobuff >= VARS_START .if \tobuff >= VARS_START
copyvar VAR_0x8006, \tobuff copyvar VAR_0x8006, \tobuff
.else .else
@@ -90,43 +103,51 @@
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Set which move to use that the player chose (implicitly VAR_0x8005)
.macro apprentice_setmove .macro apprentice_setmove
setvar VAR_0x8004, APPRENTICE_FUNC_SET_MOVE setvar VAR_0x8004, APPRENTICE_FUNC_SET_MOVE
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Set which mon the Apprentice should lead with
.macro apprentice_setleadmon monId:req .macro apprentice_setleadmon monId:req
copyvar VAR_0x8005, \monId copyvar VAR_0x8005, \monId
setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Open the Bag Menu for the player to choose an item to recommend as a held item
.macro apprentice_openbag .macro apprentice_openbag
setvar VAR_0x8004, APPRENTICE_FUNC_OPEN_BAG setvar VAR_0x8004, APPRENTICE_FUNC_OPEN_BAG
special CallApprenticeFunction special CallApprenticeFunction
waitstate waitstate
.endm .endm
@ Try and set the recommended held item. FALSE if the item has been recommended before, as Battle Frontier forbids using the same held item for multiple party mons
.macro apprentice_trysetitem .macro apprentice_trysetitem
setvar VAR_0x8004, APPRENTICE_FUNC_TRY_SET_HELD_ITEM setvar VAR_0x8004, APPRENTICE_FUNC_TRY_SET_HELD_ITEM
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Save the current Player Apprentice to the saveblock to make room for a new Apprentice
.macro apprentice_save .macro apprentice_save
setvar VAR_0x8004, APPRENTICE_FUNC_SAVE setvar VAR_0x8004, APPRENTICE_FUNC_SAVE
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Set the object event gfx for the Apprentice based on their trainer class
.macro apprentice_setgfx .macro apprentice_setgfx
setvar VAR_0x8004, APPRENTICE_FUNC_SET_GFX setvar VAR_0x8004, APPRENTICE_FUNC_SET_GFX
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason
.macro apprentice_shouldleave .macro apprentice_shouldleave
setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE
special CallApprenticeFunction special CallApprenticeFunction
.endm .endm
@ Shift the other saved Apprentices over to make room for saving a new Apprentice
.macro apprentice_shiftsaved .macro apprentice_shiftsaved
setvar VAR_0x8004, APPRENTICE_FUNC_SHIFT_SAVED setvar VAR_0x8004, APPRENTICE_FUNC_SHIFT_SAVED
special CallApprenticeFunction special CallApprenticeFunction
+43 -39
View File
@@ -1,45 +1,49 @@
@ Initialize the Battle Arena challenge @ Initialize the Battle Arena challenge
.macro arena_init .macro arena_init
setvar VAR_0x8004, BATTLE_ARENA_FUNC_INIT setvar VAR_0x8004, BATTLE_ARENA_FUNC_INIT
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
@ Unused. Get the value of some ARENA_DATA_*. See GetArenaData for the data types that can be retrieved @ Unused. Get the value of some ARENA_DATA_*. See GetArenaData for the data types that can be retrieved
.macro arena_get data:req .macro arena_get data:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_DATA setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_DATA
setvar VAR_0x8005, \data setvar VAR_0x8005, \data
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
@ Set some ARENA_DATA_* to val. See SetArenaData for the data types that can be set @ Set some ARENA_DATA_* to val. See SetArenaData for the data types that can be set
.macro arena_set data:req, val:req .macro arena_set data:req, val:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_DATA setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_DATA
setvar VAR_0x8005, \data setvar VAR_0x8005, \data
setvar VAR_0x8006, \val .if \val >= VARS_START
special CallBattleArenaFunction copyvar VAR_0x8006, \val
.endm .else
setvar VAR_0x8006, \val
.endif
special CallBattleArenaFunction
.endm
@ Save the game and set the challenge status @ Save the game and set the challenge status
.macro arena_save challengeStatus:req .macro arena_save challengeStatus:req
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SAVE setvar VAR_0x8004, BATTLE_ARENA_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus setvar VAR_0x8005, \challengeStatus
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
@ Unused. Set the reward item to give from one of two lists of possible awards, depending on streak. @ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
.macro arena_setreward .macro arena_setprize
setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_REWARD setvar VAR_0x8004, BATTLE_ARENA_FUNC_SET_PRIZE
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
@ Unused. Give the set award item to the player. TRUE if room in Bag for award, FALSE otherwise @ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro arena_givereward .macro arena_giveprize
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GIVE_REWARD setvar VAR_0x8004, BATTLE_ARENA_FUNC_GIVE_PRIZE
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
@ Buffer the opponents name to STR_VAR_1 @ Buffer the opponents name to STR_VAR_1
.macro arena_gettrainername .macro arena_gettrainername
setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_TRAINER_NAME setvar VAR_0x8004, BATTLE_ARENA_FUNC_GET_TRAINER_NAME
special CallBattleArenaFunction special CallBattleArenaFunction
.endm .endm
+146 -1
View File
@@ -1 +1,146 @@
@ To be populated with macros for CallBattleDomeFunction @ TODO: Add explanatory comments to macros
@ Initialize the Battle Dome challenge
.macro dome_init
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT
special CallBattleDomeFunction
.endm
@ Get the value of some DOME_DATA_*. See GetDomeData for the data types that can be retrieved
.macro dome_get data:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleDomeFunction
.endm
@ Set some DOME_DATA_* to val. See SetDomeData for the data types that can be set
.macro dome_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val != 0xFFFF
setvar VAR_0x8006, \val
.endif
special CallBattleDomeFunction
.endm
@
.macro dome_getroundtext
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_ROUND_TEXT
special CallBattleDomeFunction
.endm
@
.macro dome_getopponentname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_OPPONENT_NAME
special CallBattleDomeFunction
.endm
@
.macro dome_initopponentparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY
special CallBattleDomeFunction
.endm
@
.macro dome_showopponentinfo
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO
special CallBattleDomeFunction
.endm
@
.macro dome_showtourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@
.macro dome_showresultstree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_PREV_RESULTS_TREE
special CallBattleDomeFunction
.endm
@
.macro dome_setopponent
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_ID
special CallBattleDomeFunction
.endm
@
.macro dome_setopponentgfx
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_GFX
special CallBattleDomeFunction
.endm
@
.macro dome_showstatictourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@
.macro dome_resolvewinners arg:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESOLVE_WINNERS
setvar VAR_0x8005, \arg
special CallBattleDomeFunction
.endm
@ Save the game and set the challenge status
.macro dome_save challengeStatus:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleDomeFunction
.endm
@ Unused. Increment the win streaks for the current challenge by one
.macro dome_incrementstreaks
setvar VAR_0x8004, BATTLE_DOME_FUNC_INCREMENT_STREAK
special CallBattleDomeFunction
.endm
@
.macro dome_settrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_TRAINERS
special CallBattleDomeFunction
.endm
@ If any moves were copied using Sketch during the challenge then restore them to Sketch
.macro dome_resetsketch
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESET_SKETCH
special CallBattleDomeFunction
.endm
@
.macro dome_restorehelditems
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS
special CallBattleDomeFunction
.endm
@
.macro dome_reduceparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_REDUCE_PARTY
special CallBattleDomeFunction
.endm
@
.macro dome_compareseeds
setvar VAR_0x8004, BATTLE_DOME_FUNC_COMPARE_SEEDS
special CallBattleDomeFunction
.endm
@ Buffer the name of the winner for the last Dome challenge to STR_VAR_1
.macro dome_getwinnersname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_WINNER_NAME
special CallBattleDomeFunction
.endm
@ TODO: Document this macro and its function
.macro dome_21
setvar VAR_0x8004, BATTLE_DOME_FUNC_21
special CallBattleDomeFunction
.endm
@
.macro dome_inittrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_TRAINERS
special CallBattleDomeFunction
.endm
+103 -1
View File
@@ -1 +1,103 @@
@ To be populated with macros for CallBattleFactoryFunction @ TODO: Add explanatory comments to macros
@ Initialize the Battle Factory challenge
.macro factory_init
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_INIT
special CallBattleFactoryFunction
.endm
@ Get the value of some FACTORY_DATA_*. See GetBattleFactoryData for the data types that can be retrieved
.macro factory_get data:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleFactoryFunction
.endm
@ Set some FACTORY_DATA_* to val. See SetBattleFactoryData for the data types that can be set
.macro factory_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val == 0xFFFF
@ argument not provided
.elseif \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallBattleFactoryFunction
.endm
@ Save the game and set the challenge status
.macro factory_save challengeStatus:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleFactoryFunction
.endm
@
.macro factory_rentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SELECT_RENT_MONS
special CallBattleFactoryFunction
.endm
@
.macro factory_swapmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SWAP_RENT_MONS
special CallBattleFactoryFunction
.endm
@
.macro factory_setswapped
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_SWAPPED
special CallBattleFactoryFunction
.endm
@
.macro factory_setopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
@
.macro factory_setparties arg:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_PARTIES
setvar VAR_0x8005, \arg
special CallBattleFactoryFunction
.endm
@
.macro factory_setopponentgfx
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX
special CallBattleFactoryFunction
.endm
@
.macro factory_generateopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
@
.macro factory_generaterentalmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS
special CallBattleFactoryFunction
.endm
@
.macro factory_getopponentmontype
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE
special CallBattleFactoryFunction
.endm
@
.macro factory_getopponentstyle
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE
special CallBattleFactoryFunction
.endm
@
.macro factory_resethelditems
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS
special CallBattleFactoryFunction
.endm
+62 -6
View File
@@ -1,7 +1,63 @@
@ To be populated with macros for CallBattlePalaceFunction @ Initialize the Battle Palace challenge
.macro palace_init
setvar VAR_0x8004, BATTLE_PALACE_FUNC_INIT
special CallBattlePalaceFunction
.endm
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory @ Get the value of some PALACE_DATA_*. See GetPalaceData for the data types that can be retrieved
.macro palace_getopponentintro .macro palace_get data:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_DATA
special CallBattlePalaceFunction setvar VAR_0x8005, \data
.endm special CallBattlePalaceFunction
.endm
@ Set some PALACE_DATA_* to val. See SetPalaceData for the data types that can be set
.macro palace_set data:req, val:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_DATA
setvar VAR_0x8005, \data
setvar VAR_0x8006, \val
special CallBattlePalaceFunction
.endm
@ Get the id of the comment to be made while being led through the corridor
.macro palace_getcomment
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_COMMENT_ID
special CallBattlePalaceFunction
.endm
@ Unused. Choose and set the opponent gfx id. The equivalent macro from Battle Tower is used instead
.macro palace_setopponent
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_OPPONENT
special CallBattlePalaceFunction
.endm
@ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory
.macro palace_getopponentintro
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO
special CallBattlePalaceFunction
.endm
@ Increments the current win streak by 1
.macro palace_incrementstreak
setvar VAR_0x8004, BATTLE_PALACE_FUNC_INCREMENT_STREAK
special CallBattlePalaceFunction
.endm
@ Save the game and set the challenge status
.macro palace_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePalaceFunction
.endm
@ Unused. Set the prize item to give from one of two lists of possible prizes, depending on streak.
.macro palace_setprize
setvar VAR_0x8004, BATTLE_PALACE_FUNC_SET_PRIZE
special CallBattleArenaFunction
.endm
@ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro palace_giveprize
setvar VAR_0x8004, BATTLE_PALACE_FUNC_GIVE_PRIZE
special CallBattleArenaFunction
.endm
+157 -38
View File
@@ -1,54 +1,173 @@
@ To be populated with macros for CallBattlePikeFunction @ TODO: Add explanatory comments to macros
.macro battlepike_getstreak @
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA .macro pike_setnextroom
setvar VAR_0x8005, 1
special CallBattlePikeFunction
.endm
.macro battlepike_setstreak streak:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
setvar VAR_0x8005, 1
.if \streak >= VARS_START
copyvar VAR_0x8006, \streak
.else
setvar VAR_0x8006, \streak
.endif
special CallBattlePikeFunction
.endm
.macro battlepike_isfinalroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_FINAL_ROOM
special CallBattlePikeFunction
.endm
.macro battlepike_setroomobjects
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS
special CallBattlePikeFunction
.endm
.macro battlepike_getroomtype
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
special CallBattlePikeFunction
.endm
.macro battlepike_setnextroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_TYPE setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_TYPE
special CallBattlePikeFunction special CallBattlePikeFunction
.endm .endm
.macro battlepike_gethint @ Get the value of some PIKE_DATA_*. See GetBattlePikeData for the data types that can be retrieved
.macro pike_get data:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePikeFunction
.endm
@ Set some PIKE_DATA_* to val. See SetBattlePikeData for the data types that can be set
.macro pike_set data:req, val:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val >= VARS_START
copyvar VAR_0x8006, \val
.else
setvar VAR_0x8006, \val
.endif
special CallBattlePikeFunction
.endm
@
.macro pike_isfinalroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_FINAL_ROOM
special CallBattlePikeFunction
.endm
@
.macro pike_setroomobjects
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS
special CallBattlePikeFunction
.endm
@
.macro pike_getroomtype
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
special CallBattlePikeFunction
.endm
@ Sets a bool that's never read
.macro pike_inwildmonroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM
special CallBattlePikeFunction
.endm
@ Clears a bool that's never read
.macro pike_exitwildmonroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM
special CallBattlePikeFunction
.endm
@ Save the game and set the challenge status
.macro pike_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePikeFunction
.endm
@
.macro pike_getstatus
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS
special CallBattlePikeFunction
.endm
@
.macro pike_getstatusmon
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON
special CallBattlePikeFunction
.endm
@
.macro pike_healonetwomons
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS
special CallBattlePikeFunction
.endm
@
.macro pike_getnpcmsg
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_NPC_MSG
special CallBattlePikeFunction
.endm
@
.macro pike_fadescreen
setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE
special CallBattlePikeFunction
.endm
@ TRUE if the player is currently in a Battle Pike challenge map
.macro pike_inchallenge
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_IN
special CallBattlePikeFunction
.endm
@ TRUE if its the Pike Queens room
.macro pike_sethintroom
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HINT_ROOM
special CallBattlePikeFunction
.endm
@
.macro pike_gethintroomid
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID
special CallBattlePikeFunction
.endm
@
.macro pike_gethint
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT
special CallBattlePikeFunction special CallBattlePikeFunction
.endm .endm
.macro battlepike_nohealing set:req @
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEALING_ROOMS_DISABLED .macro pike_cleartrainerids
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS
special CallBattlePikeFunction
.endm
@
.macro pike_gettrainerintro trainer:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_TRAINER_INTRO
setvar VAR_0x8005, \trainer
special CallBattlePikeFunction
.endm
@ Get the status of the Pike Queen (Not ready, Silver/Gold streak before symbols, Silver/Gold streak after symbols)
.macro pike_getbrainstatus
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE
special CallBattlePikeFunction
.endm
@
.macro pike_prequeenheal
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN
special CallBattlePikeFunction
.endm
@
.macro pike_nohealing set:req
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEAL_ROOMS_DISABLED
setvar VAR_0x8005, \set setvar VAR_0x8005, \set
special CallBattlePikeFunction special CallBattlePikeFunction
.endm .endm
.macro battlepike_ispartyfullhealth @
.macro pike_ispartyfullhealth
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH
special CallBattlePikeFunction special CallBattlePikeFunction
.endm .endm
@
.macro pike_savehelditems
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE_HELD_ITEMS
special CallBattlePikeFunction
.endm
@
.macro pike_resethelditems
setvar VAR_0x8004, BATTLE_PIKE_FUNC_RESET_HELD_ITEMS
special CallBattlePikeFunction
.endm
@ Initialize the Battle Pike challenge
.macro pike_init
setvar VAR_0x8004, BATTLE_PIKE_FUNC_INIT
special CallBattlePikeFunction
.endm
+97 -1
View File
@@ -1 +1,97 @@
@ To be populated with macros for CallBattlePyramidFunction @ TODO: Add explanatory comments to macros
@ Initialize the Battle Pyramid challenge
.macro pyramid_init
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT
special CallBattlePyramidFunction
.endm
@ Get the value of some PYRAMID_DATA_*. See GetBattlePyramidData for the data types that can be retrieved
.macro pyramid_get data:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePyramidFunction
.endm
@ Set some PYRAMID_DATA_* to val. See SetBattlePyramidData for the data types that can be set
.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
@ Save the game and set the challenge status
.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 player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise
.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
@
.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
+60 -5
View File
@@ -1,7 +1,62 @@
@ To be populated with macros for CallBattleTowerFunc @ Initialize the Battle Tower challenge
.macro tower_init
.macro battletower_getstreak setvar VAR_0x8004, BATTLE_TOWER_FUNC_INIT
setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 special CallBattleTowerFunc
setvar VAR_0x8005, 1 .endm
@ Get the value of some TOWER_DATA_*. See GetTowerData for the data types that can be retrieved
.macro tower_get data:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleTowerFunc
.endm
@ Set some TOWER_DATA_* to val. See SetTowerData for the data types that can be set
.macro tower_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val != 0xFFFF
setvar VAR_0x8006, \val
.endif
special CallBattleTowerFunc
.endm
@ Choose and set the gfx for the next opponent. Also used by Battle Tents
.macro tower_setopponent
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_OPPONENT
special CallBattleTowerFunc
.endm
@ Increments the battle number and returns the new one. Also clears E-Reader trainer if defeated, and saves the current win streak
.macro tower_setbattlewon
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_BATTLE_WON
special CallBattleTowerFunc
.endm
@ Try to award ribbons for completing 56th straight Battle Tower win. VAR_RESULT is TRUE if ribbons were awarded.
.macro tower_giveribbons
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GIVE_RIBBONS
special CallBattleTowerFunc
.endm
@ Save the game and set the challenge status
.macro tower_save challengeStatus:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleTowerFunc
.endm
@ Buffer the opponent's easy chat intro speech to STR_VAR_4
.macro tower_getopponentintro opponent:req
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO
setvar VAR_0x8005, \opponent
special CallBattleTowerFunc
.endm
@ TODO: Document and add macros for BATTLE_TOWER_FUNC_10 - BATTLE_TOWER_FUNC_14
@ Set the data used for the post-challenge Battle Tower interview
.macro tower_setinterviewdata
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA
special CallBattleTowerFunc special CallBattleTowerFunc
.endm .endm
+167 -1
View File
@@ -1 +1,167 @@
@ To be populated with macros for CallVerdanturfTentFunction, CallFallarborTentFunction, and CallSlateportTentFunction @ Verdanturf Tent
@ Initialize the Verdanturf Battle Tent challenge
.macro verdanturftent_init
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_INIT
special CallVerdanturfTentFunction
.endm
@ Get the current prize item id
.macro verdanturftent_getprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_PRIZE
special CallVerdanturfTentFunction
.endm
@ Unused. Set the prize item to be given
.macro verdanturftent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallVerdanturfTentFunction
.endm
@ Unused. Set the opponent trainer and gfx. SetNextBattleTentOpponent is used through tower_setopponent instead
.macro verdanturftent_setopponentgfx
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_OPPONENT_GFX
special CallVerdanturfTentFunction
.endm
@ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents.
.macro battletent_getopponentintro
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO
special CallVerdanturfTentFunction
.endm
@ Save the game and set the challenge status
.macro verdanturftent_save challengeStatus:req
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallVerdanturfTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro verdanturftent_setrandomprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SET_RANDOM_PRIZE
special CallVerdanturfTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro verdanturftent_giveprize
setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GIVE_PRIZE
special CallVerdanturfTentFunction
.endm
@ Fallarbor Tent
@ Initialize the Fallarbor Battle Tent challenge
.macro fallarbortent_init
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_INIT
special CallFallarborTentFunction
.endm
@ Get the current prize item id
.macro fallarbortent_getprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_PRIZE
special CallFallarborTentFunction
.endm
@ Unused. Set the prize item to be given
.macro fallarbortent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallFallarborTentFunction
.endm
@ Save the game and set the challenge status
.macro fallarbortent_save challengeStatus:req
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallFallarborTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro fallarbortent_setrandomprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SET_RANDOM_PRIZE
special CallFallarborTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro fallarbortent_giveprize
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GIVE_PRIZE
special CallFallarborTentFunction
.endm
@ Buffer the opponent trainers name to STR_VAR_1
.macro fallarbortent_getopponentname
setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME
special CallFallarborTentFunction
.endm
@ Slateport Tent
@ Initialize the Slateport Battle Tent challenge
.macro slateporttent_init
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_INIT
special CallSlateportTentFunction
.endm
@ Get the current prize item id
.macro slateporttent_getprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GET_PRIZE
special CallSlateportTentFunction
.endm
@ Unused. Set the prize item to be given
.macro slateporttent_setprize unusedArg:req, itemId:req
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_PRIZE
setvar VAR_0x8005, \unusedArg
setvar VAR_0x8006, \itemId
special CallSlateportTentFunction
.endm
@ Save the game and set the challenge status
.macro slateporttent_save challengeStatus:req
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallSlateportTentFunction
.endm
@ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item
.macro slateporttent_setrandomprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE
special CallSlateportTentFunction
.endm
@ Give the current prize item. FALSE if no room for prize
.macro slateporttent_giveprize
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GIVE_PRIZE
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_rentmons
.macro slateporttent_rentmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SELECT_RENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_swapmons
.macro slateporttent_swapmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SWAP_RENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_generateopponentmons
.macro slateporttent_generateopponentmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS
special CallSlateportTentFunction
.endm
@ Slateport Tent's version of factory_generaterentalmons
.macro slateporttent_generaterentalmons
setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_RENTAL_MONS
special CallSlateportTentFunction
.endm
+18 -2
View File
@@ -1,90 +1,106 @@
@ TODO: These need to have description comment @ Initialize the Trainer Hill challenge and start the timer
.macro trainerhill_start .macro trainerhill_start
setvar VAR_0x8004, TRAINER_HILL_FUNC_START setvar VAR_0x8004, TRAINER_HILL_FUNC_START
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ 0 if not spoken to yet, 1 if spoken to but not received prize, 2 if received prize
.macro trainerhill_getownerstate .macro trainerhill_getownerstate
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_OWNER_STATE setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_OWNER_STATE
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Try to give prize. 0 if given successfully, 1 if no room for prize, 2 if giving prize should be skipped
.macro trainerhill_giveprize .macro trainerhill_giveprize
setvar VAR_0x8004, TRAINER_HILL_FUNC_GIVE_PRIZE setvar VAR_0x8004, TRAINER_HILL_FUNC_GIVE_PRIZE
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Check the final challenge time. 0 if new record, 1 if not, 2 if time has already been checked
.macro trainerhill_finaltime .macro trainerhill_finaltime
setvar VAR_0x8004, TRAINER_HILL_FUNC_CHECK_FINAL_TIME setvar VAR_0x8004, TRAINER_HILL_FUNC_CHECK_FINAL_TIME
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Resume the timer. Wont resume if owner has been spoken to or max time has been reached
.macro trainerhill_resumetimer .macro trainerhill_resumetimer
setvar VAR_0x8004, TRAINER_HILL_FUNC_RESUME_TIMER setvar VAR_0x8004, TRAINER_HILL_FUNC_RESUME_TIMER
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Set player lost the challenge (trainerHill.hasLost) to TRUE
.macro trainerhill_lost .macro trainerhill_lost
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_LOST setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_LOST
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Get the current challenge status (TRAINER_HILL_PLAYER_STATUS_*)
.macro trainerhill_getstatus .macro trainerhill_getstatus
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Buffer the current timer to string vars (mins to STR_VAR_1, secs to STR_VAR_2, fraction of sec to STR_VAR_3)
.macro trainerhill_gettime .macro trainerhill_gettime
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_TIME setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_TIME
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ FALSE if fewer than all 4 floors used, TRUE otherwise. Only FALSE in JP-exclusive modes
.macro trainerhill_allfloorsused .macro trainerhill_allfloorsused
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Unknown, dummied. Only side effect is setting VAR_RESULT to 0.
.macro trainerhill_clearresult .macro trainerhill_clearresult
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_RESULT setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_RESULT
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ TRUE if currently in a Trainer Hill challenge
.macro trainerhill_inchallenge .macro trainerhill_inchallenge
setvar VAR_0x8004, TRAINER_HILL_FUNC_IN_CHALLENGE setvar VAR_0x8004, TRAINER_HILL_FUNC_IN_CHALLENGE
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Show the post battle text for the spoken to Trainer Hill trainer
.macro trainerhill_postbattletext .macro trainerhill_postbattletext
setvar VAR_0x8004, TRAINER_HILL_FUNC_POST_BATTLE_TEXT setvar VAR_0x8004, TRAINER_HILL_FUNC_POST_BATTLE_TEXT
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Set all Trainer Hill trainers defeated
.macro trainerhill_settrainerflags .macro trainerhill_settrainerflags
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ TRUE if the game has been saved for the challenge, FALSE otherwise
.macro trainerhill_getsaved .macro trainerhill_getsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_GAME_SAVED setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_GAME_SAVED
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Set that the game has been saved for the challenge
.macro trainerhill_setsaved .macro trainerhill_setsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_GAME_SAVED setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_GAME_SAVED
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Clear that the game has been saved for the challenge
.macro trainerhill_clearsaved .macro trainerhill_clearsaved
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_GAME_SAVED setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_GAME_SAVED
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ FALSE if the Trainer Hill challenge was lost, TRUE otherwise
.macro trainerhill_getwon .macro trainerhill_getwon
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_WON setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_WON
special CallTrainerHillFunction special CallTrainerHillFunction
.endm .endm
@ Set the challenge mode to HILL_TAG_* (Normal, Variety, Unique, or Expert)
.macro trainerhill_settag tag:req .macro trainerhill_settag tag:req
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG
copyvar VAR_0x8005, \tag copyvar VAR_0x8005, \tag
+3 -15
View File
@@ -2,11 +2,14 @@
#include "constants/apprentice.h" #include "constants/apprentice.h"
#include "constants/battle.h" #include "constants/battle.h"
#include "constants/battle_arena.h" #include "constants/battle_arena.h"
#include "constants/battle_dome.h"
#include "constants/battle_factory.h"
#include "constants/battle_frontier.h" #include "constants/battle_frontier.h"
#include "constants/battle_palace.h" #include "constants/battle_palace.h"
#include "constants/battle_pike.h" #include "constants/battle_pike.h"
#include "constants/battle_pyramid.h" #include "constants/battle_pyramid.h"
#include "constants/battle_setup.h" #include "constants/battle_setup.h"
#include "constants/battle_tent.h"
#include "constants/battle_tower.h" #include "constants/battle_tower.h"
#include "constants/berry.h" #include "constants/berry.h"
#include "constants/cable_club.h" #include "constants/cable_club.h"
@@ -453,21 +456,6 @@ gStdScripts_End:: @ 81DC2CC
.include "data/maps/SSTidalLowerDeck/scripts.inc" .include "data/maps/SSTidalLowerDeck/scripts.inc"
.include "data/maps/SSTidalRooms/scripts.inc" .include "data/maps/SSTidalRooms/scripts.inc"
.include "data/maps/BattlePyramidSquare01/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/UnionRoom/scripts.inc"
.include "data/maps/SafariZone_Northwest/scripts.inc" .include "data/maps/SafariZone_Northwest/scripts.inc"
.include "data/maps/SafariZone_North/scripts.inc" .include "data/maps/SafariZone_North/scripts.inc"
@@ -52,8 +52,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_EnterRoom:: @ 82574DC
goto BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent goto BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent
BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers:: @ 825752E BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers:: @ 825752E
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 7 addobject 7
applymovement 7, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentEnter applymovement 7, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentEnter
waitmovement 0 waitmovement 0
@@ -6,8 +6,7 @@ BattleFrontier_BattleDomeBattleRoom_MapScripts:: @ 824BC9C
.byte 0 .byte 0
BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1: @ 824BCB1 BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1: @ 824BCB1
setvar VAR_0x8004, 10 dome_setopponentgfx
special CallBattleDomeFunction
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
copyvar VAR_TEMP_F, VAR_RESULT copyvar VAR_TEMP_F, VAR_RESULT
compare VAR_RESULT, 0 compare VAR_RESULT, 0
@@ -68,20 +67,16 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BD61:: @ 824BD61
goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_24C1CB goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_24C1CB
BattleFrontier_BattleDomeBattleRoom_EventScript_24BD82:: @ 824BD82 BattleFrontier_BattleDomeBattleRoom_EventScript_24BD82:: @ 824BD82
setvar VAR_0x8004, 4 dome_getopponentname
special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24C990, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeBattleRoom_Text_24C990, MSGBOX_DEFAULT
closemessage closemessage
applymovement 13, BattleFrontier_BattleDomeBattleRoom_Movement_24C77B applymovement 13, BattleFrontier_BattleDomeBattleRoom_Movement_24C77B
applymovement 15, BattleFrontier_BattleDomeBattleRoom_Movement_24C789 applymovement 15, BattleFrontier_BattleDomeBattleRoom_Movement_24C789
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, 5 dome_initopponentparty
special CallBattleDomeFunction
call BattleFrontier_BattleDomeBattleRoom_EventScript_24C440 call BattleFrontier_BattleDomeBattleRoom_EventScript_24C440
setvar VAR_TEMP_2, 0 setvar VAR_TEMP_2, 0
switch VAR_RESULT switch VAR_RESULT
@@ -105,16 +100,14 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BDF7:: @ 824BDF7
waitmovement 0 waitmovement 0
compare VAR_TEMP_2, 2 compare VAR_TEMP_2, 2
goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F
setvar VAR_0x8004, 19 dome_compareseeds
special CallBattleDomeFunction
switch VAR_RESULT switch VAR_RESULT
case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_24BEE0 case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_24BEE0
BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F:: @ 824BE4F BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F:: @ 824BE4F
applymovement 1, Common_Movement_WalkInPlaceDown applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0 waitmovement 0
setvar VAR_0x8004, 4 dome_getopponentname
special CallBattleDomeFunction
compare VAR_TEMP_2, 0 compare VAR_TEMP_2, 0
call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BEB1 call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BEB1
compare VAR_TEMP_2, 1 compare VAR_TEMP_2, 1
@@ -126,10 +119,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BE4F:: @ 824BE4F
delay 60 delay 60
BattleFrontier_BattleDomeBattleRoom_EventScript_24BE8D:: @ 824BE8D BattleFrontier_BattleDomeBattleRoom_EventScript_24BE8D:: @ 824BE8D
setvar VAR_0x8004, 12 dome_resolvewinners 2
setvar VAR_0x8005, 2
special CallBattleDomeFunction
BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A:: @ 824BE9A BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A:: @ 824BE9A
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
goto BattleFrontier_BattleDomeBattleRoom_EventScript_24C8F5 goto BattleFrontier_BattleDomeBattleRoom_EventScript_24C8F5
@@ -162,11 +152,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BEE0:: @ 824BEE0
playse SE_W227B playse SE_W227B
call BattleFrontier_BattleDomeBattleRoom_EventScript_24C82E call BattleFrontier_BattleDomeBattleRoom_EventScript_24C82E
delay 60 delay 60
setvar VAR_0x8004, 3 dome_getroundtext
special CallBattleDomeFunction dome_resolvewinners 1
setvar VAR_0x8004, 12
setvar VAR_0x8005, 1
special CallBattleDomeFunction
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
@@ -205,20 +192,14 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BFCC:: @ 824BFCC
return return
BattleFrontier_BattleDomeBattleRoom_EventScript_24BFD5:: @ 824BFD5 BattleFrontier_BattleDomeBattleRoom_EventScript_24BFD5:: @ 824BFD5
setvar VAR_0x8004, 1 dome_get DOME_DATA_6
setvar VAR_0x8005, 6
special CallBattleDomeFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C023 goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C023
setvar VAR_0x8004, 1 dome_get DOME_DATA_7
setvar VAR_0x8005, 7
special CallBattleDomeFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C076 goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C076
setvar VAR_0x8004, 1 dome_get DOME_DATA_WIN_STREAK_ACTIVE
setvar VAR_0x8005, 1 compare VAR_RESULT, FALSE
special CallBattleDomeFunction
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C16A goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24C16A
goto BattleFrontier_BattleDomeBattleRoom_EventScript_24C0C9 goto BattleFrontier_BattleDomeBattleRoom_EventScript_24C0C9
return return
@@ -417,9 +398,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C2B9:: @ 824C2B9
case 9, BattleFrontier_BattleDomeBattleRoom_EventScript_24C420 case 9, BattleFrontier_BattleDomeBattleRoom_EventScript_24C420
case 3, BattleFrontier_BattleDomeBattleRoom_EventScript_24C436 case 3, BattleFrontier_BattleDomeBattleRoom_EventScript_24C436
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, MSGBOX_DEFAULT
setvar VAR_0x8004, 12 dome_resolvewinners 1
setvar VAR_0x8005, 1
special CallBattleDomeFunction
frontier_getsymbols frontier_getsymbols
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_24BF62 goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_24BF62
@@ -449,9 +428,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C373:: @ 824C373
case 9, BattleFrontier_BattleDomeBattleRoom_EventScript_24C420 case 9, BattleFrontier_BattleDomeBattleRoom_EventScript_24C420
case 3, BattleFrontier_BattleDomeBattleRoom_EventScript_24C436 case 3, BattleFrontier_BattleDomeBattleRoom_EventScript_24C436
msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeBattleRoom_Text_24D0F6, MSGBOX_DEFAULT
setvar VAR_0x8004, 12 dome_resolvewinners 1
setvar VAR_0x8005, 1
special CallBattleDomeFunction
frontier_getsymbols frontier_getsymbols
compare VAR_RESULT, 2 compare VAR_RESULT, 2
goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BF62 goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BF62
@@ -496,11 +473,9 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C440:: @ 824C440
special DoSpecialTrainerBattle special DoSpecialTrainerBattle
waitstate waitstate
setvar VAR_TEMP_9, 0 setvar VAR_TEMP_9, 0
setvar VAR_0x8004, 17 dome_restorehelditems
special CallBattleDomeFunction
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, 16 dome_resetsketch
special CallBattleDomeFunction
return return
BattleFrontier_BattleDomeBattleRoom_MapScript2_24C481: @ 824C481 BattleFrontier_BattleDomeBattleRoom_MapScript2_24C481: @ 824C481
@@ -5,8 +5,7 @@ BattleFrontier_BattleDomeLobby_MapScripts:: @ 82497E2
.byte 0 .byte 0
BattleFrontier_BattleDomeLobby_MapScript1_2497F2: @ 82497F2 BattleFrontier_BattleDomeLobby_MapScript1_2497F2: @ 82497F2
setvar VAR_0x8004, 21 dome_21
special CallBattleDomeFunction
end end
BattleFrontier_BattleDomeLobby_MapScript2_2497FB: @ 82497FB BattleFrontier_BattleDomeLobby_MapScript2_2497FB: @ 82497FB
@@ -35,18 +34,9 @@ BattleFrontier_BattleDomeLobby_EventScript_249842:: @ 8249842
lockall lockall
msgbox BattleFrontier_BattleDomeLobby_Text_24A45F, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeLobby_Text_24A45F, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, 2 dome_set DOME_DATA_WIN_STREAK, 0
setvar VAR_0x8005, 0 dome_set DOME_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8006, 0 dome_set DOME_DATA_6, 1
special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
special CallBattleDomeFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
releaseall releaseall
@@ -73,18 +63,9 @@ BattleFrontier_BattleDomeLobby_EventScript_2498C9:: @ 82498C9
special LoadPlayerParty special LoadPlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE frontier_setpartyorder FRONTIER_PARTY_SIZE
frontier_checkairshow frontier_checkairshow
setvar VAR_0x8004, 2 dome_set DOME_DATA_6, 1
setvar VAR_0x8005, 6 dome_set DOME_DATA_7, 1
setvar VAR_0x8006, 1 dome_set DOME_DATA_WIN_STREAK_ACTIVE, TRUE
special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 7
setvar VAR_0x8006, 1
special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 1
special CallBattleDomeFunction
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
goto BattleFrontier_BattleDomeLobby_EventScript_249991 goto BattleFrontier_BattleDomeLobby_EventScript_249991
@@ -97,21 +78,13 @@ BattleFrontier_BattleDomeLobby_EventScript_249940:: @ 8249940
special LoadPlayerParty special LoadPlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE frontier_setpartyorder FRONTIER_PARTY_SIZE
frontier_checkairshow frontier_checkairshow
setvar VAR_0x8004, 2 dome_set DOME_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 1 dome_set DOME_DATA_6, 1
setvar VAR_0x8006, 0
special CallBattleDomeFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
special CallBattleDomeFunction
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
BattleFrontier_BattleDomeLobby_EventScript_249991:: @ 8249991 BattleFrontier_BattleDomeLobby_EventScript_249991:: @ 8249991
setvar VAR_0x8004, 13 dome_save 0
setvar VAR_0x8005, 0
special CallBattleDomeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
call BattleFrontier_BattleDomeLobby_EventScript_23E8E0 call BattleFrontier_BattleDomeLobby_EventScript_23E8E0
@@ -139,9 +112,7 @@ BattleFrontier_BattleDomeLobby_EventScript_2499F9:: @ 82499F9
msgbox BattleFrontier_BattleDomeLobby_Text_24A5FE, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeLobby_Text_24A5FE, MSGBOX_DEFAULT
message BattleFrontier_BattleDomeLobby_Text_24A61A message BattleFrontier_BattleDomeLobby_Text_24A61A
waitmessage waitmessage
setvar VAR_0x8004, 13 dome_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattleDomeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -213,8 +184,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249ABF:: @ 8249ABF
BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60 BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, 0 dome_init
special CallBattleDomeFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
@@ -224,14 +194,11 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_249C4A goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_249C4A
setvar VAR_0x8004, 22 dome_inittrainers
special CallBattleDomeFunction
BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2 BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2
special SavePlayerParty special SavePlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE frontier_setpartyorder FRONTIER_PARTY_SIZE
setvar VAR_0x8004, 15 dome_settrainers
special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeLobby_Text_24A437, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomeLobby_Text_24A437, MSGBOX_DEFAULT
closemessage closemessage
call BattleFrontier_BattleDomeLobby_EventScript_249C6E call BattleFrontier_BattleDomeLobby_EventScript_249C6E
@@ -392,9 +359,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D6B:: @ 8249D6B
end end
BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84 BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84
setvar VAR_0x8004, 1 dome_get DOME_DATA_9
setvar VAR_0x8005, 9
special CallBattleDomeFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DC9 call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DC9
compare VAR_RESULT, 1 compare VAR_RESULT, 1
@@ -404,8 +369,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84
compare VAR_RESULT, 3 compare VAR_RESULT, 3
call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DE4 call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DE4
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 8 dome_showresultstree
special CallBattleDomeFunction
waitstate waitstate
end end
@@ -426,8 +390,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249DE4:: @ 8249DE4
return return
BattleFrontier_BattleDomeLobby_EventScript_249DED:: @ 8249DED BattleFrontier_BattleDomeLobby_EventScript_249DED:: @ 8249DED
setvar VAR_0x8004, 20 dome_getwinnersname
special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomeLobby_Text_24AA76, MSGBOX_NPC msgbox BattleFrontier_BattleDomeLobby_Text_24AA76, MSGBOX_NPC
end end
@@ -82,17 +82,13 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B377:: @ 824B377
case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F case MULTI_B_PRESSED, BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3A9:: @ 824B3A9 BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3A9:: @ 824B3A9
setvar VAR_0x8004, 12 dome_resolvewinners 9
setvar VAR_0x8005, 9
special CallBattleDomeFunction
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24BE9A
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB
message BattleFrontier_BattleDomePreBattleRoom_Text_24BAD3 message BattleFrontier_BattleDomePreBattleRoom_Text_24BAD3
waitmessage waitmessage
setvar VAR_0x8004, 13 dome_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallBattleDomeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -102,16 +98,14 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD:: @ 824B3DD BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD:: @ 824B3DD
msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B9B5, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B9B5, MSGBOX_DEFAULT
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 6 dome_showopponentinfo
special CallBattleDomeFunction
waitstate waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5:: @ 824B3F5 BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5:: @ 824B3F5
call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B40A call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B40A
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 7 dome_showtourneytree
special CallBattleDomeFunction
waitstate waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
@@ -153,13 +147,9 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B46D:: @ 824B46D
frontier_resetsketch frontier_resetsketch
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
setvar VAR_0x8004, 2 dome_set DOME_DATA_8
setvar VAR_0x8005, 8 dome_reduceparty
special CallBattleDomeFunction dome_setopponent
setvar VAR_0x8004, 18
special CallBattleDomeFunction
setvar VAR_0x8004, 9
special CallBattleDomeFunction
msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B748, MSGBOX_DEFAULT msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B748, MSGBOX_DEFAULT
closemessage closemessage
applymovement 1, BattleFrontier_BattleDomePreBattleRoom_Movement_24B64F applymovement 1, BattleFrontier_BattleDomePreBattleRoom_Movement_24B64F
@@ -238,8 +228,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B5C7:: @ 824B5C7
special HealPlayerParty special HealPlayerParty
call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B600 call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B600
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 11 dome_showstatictourneytree
special CallBattleDomeFunction
waitstate waitstate
goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F
@@ -66,8 +66,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE67:: @ 825AE67
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B
waitmovement 0 waitmovement 0
call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4 call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4
setvar VAR_0x8004, 11 factory_setopponentgfx
special CallBattleFactoryFunction
removeobject 2 removeobject 2
setobjectxyperm 2, 7, 1 setobjectxyperm 2, 7, 1
addobject 2 addobject 2
@@ -90,7 +89,6 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEA7:: @ 825AEA7
waitstate waitstate
switch VAR_RESULT switch VAR_RESULT
case 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F case 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F
BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEF8:: @ 825AEF8 BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEF8:: @ 825AEF8
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8:: @ 825AEF8 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8:: @ 825AEF8
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
@@ -98,16 +96,12 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8:: @ 825AEF8
@ goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B190 @ goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B190
BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F:: @ 825AF0F BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F:: @ 825AF0F
setvar VAR_0x8004, 1 factory_get FACTORY_DATA_WIN_STREAK_SWAPS
setvar VAR_0x8005, 3
special CallBattleFactoryFunction
compare VAR_RESULT, MAX_STREAK compare VAR_RESULT, MAX_STREAK
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
setorcopyvar VAR_0x8006, VAR_RESULT setorcopyvar VAR_0x8006, VAR_RESULT
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above
setvar VAR_0x8005, 3
special CallBattleFactoryFunction
BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E:: @ 825AF3E BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E:: @ 825AF3E
call BattleFrontier_EventScript_IncrementWinStreak call BattleFrontier_EventScript_IncrementWinStreak
BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43:: @ 825AF43 BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43:: @ 825AF43
@@ -196,26 +190,17 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25B0E0:: @ 825B0E0
return return
BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105:: @ 825B105 BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105:: @ 825B105
setvar VAR_0x8004, 1 factory_get FACTORY_DATA_WIN_STREAK_SWAPS
setvar VAR_0x8005, 3
special CallBattleFactoryFunction
compare VAR_RESULT, MAX_STREAK compare VAR_RESULT, MAX_STREAK
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
setorcopyvar VAR_0x8006, VAR_RESULT setorcopyvar VAR_0x8006, VAR_RESULT
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above
setvar VAR_0x8005, 3 factory_get FACTORY_DATA_WIN_STREAK
special CallBattleFactoryFunction
setvar VAR_0x8004, 1
setvar VAR_0x8005, 1
special CallBattleFactoryFunction
compare VAR_RESULT, MAX_STREAK compare VAR_RESULT, MAX_STREAK
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43 goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
special CallBattleFactoryFunction
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF85 goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF85
@@ -28,20 +28,10 @@ BattleFrontier_BattleFactoryLobby_EventScript_25843A:: @ 825843A
lockall lockall
msgbox BattleFrontier_BattleFactoryLobby_Text_258ECA, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryLobby_Text_258ECA, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, 8 factory_setswapped
special CallBattleFactoryFunction factory_set FACTORY_DATA_WIN_STREAK_SWAPS, 0
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK, 0
setvar VAR_0x8005, 3 factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8006, 0
special CallBattleFactoryFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 1
setvar VAR_0x8006, 0
special CallBattleFactoryFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattleFactoryFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
releaseall releaseall
@@ -68,9 +58,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2584C6:: @ 82584C6
waitmessage waitmessage
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
setvar VAR_0x8004, 3 factory_save 0
setvar VAR_0x8005, 0
special CallBattleFactoryFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
goto BattleFrontier_BattleFactoryLobby_EventScript_25853B goto BattleFrontier_BattleFactoryLobby_EventScript_25853B
@@ -82,13 +70,8 @@ BattleFrontier_BattleFactoryLobby_EventScript_258506:: @ 8258506
waitmessage waitmessage
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 2 factory_save 0
setvar VAR_0x8006, 0
special CallBattleFactoryFunction
setvar VAR_0x8004, 3
setvar VAR_0x8005, 0
special CallBattleFactoryFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
@@ -117,9 +100,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_258592:: @ 8258592
lockall lockall
message BattleFrontier_BattleFactoryLobby_Text_258E77 message BattleFrontier_BattleFactoryLobby_Text_258E77
waitmessage waitmessage
setvar VAR_0x8004, 3 factory_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattleFactoryFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -177,13 +158,9 @@ BattleFrontier_BattleFactoryLobby_EventScript_258653:: @ 8258653
BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9 BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_0x8004, 0 factory_init
special CallBattleFactoryFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
setvar VAR_0x8004, 2 factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattleFactoryFunction
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
closemessage closemessage
delay 2 delay 2
@@ -31,33 +31,26 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AF9:: @ 8259AF9
waitmovement 0 waitmovement 0
compare VAR_0x8006, 2 compare VAR_0x8006, 2
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69 goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69
setvar VAR_0x8004, 13 factory_generaterentalmons
special CallBattleFactoryFunction factory_generateopponentmons
setvar VAR_0x8004, 12 factory_getopponentmontype
special CallBattleFactoryFunction
setvar VAR_0x8004, 14
special CallBattleFactoryFunction
setorcopyvar VAR_0x8005, VAR_RESULT setorcopyvar VAR_0x8005, VAR_RESULT
setvar VAR_0x8004, 15 factory_getopponentstyle
special CallBattleFactoryFunction
setorcopyvar VAR_0x8006, VAR_RESULT setorcopyvar VAR_0x8006, VAR_RESULT
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A1C8, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A1C8, MSGBOX_DEFAULT
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 8 factory_setswapped
special CallBattleFactoryFunction factory_rentmons
setvar VAR_0x8004, 6
special CallBattleFactoryFunction
waitstate waitstate
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74:: @ 8259B74 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74:: @ 8259B74
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB96, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB96, MSGBOX_DEFAULT
closemessage closemessage
call BattleFrontier_EventScript_GetLvlMode call BattleFrontier_EventScript_GetLvlMode
compare VAR_RESULT, 0 compare VAR_RESULT, FRONTIER_LVL_50
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A17C call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A17C
compare VAR_RESULT, 1 compare VAR_RESULT, FRONTIER_LVL_OPEN
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A18B call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A18B
waitmovement 0 waitmovement 0
warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 255, 6, 11 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 255, 6, 11
@@ -65,10 +58,8 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74:: @ 8259B74
end end
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259BA5:: @ 8259BA5 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259BA5:: @ 8259BA5
setvar VAR_0x8004, 9 factory_setopponentmons
special CallBattleFactoryFunction factory_resethelditems
setvar VAR_0x8004, 16
special CallBattleFactoryFunction
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A22D, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A22D, MSGBOX_DEFAULT
playfanfare MUS_ME_ASA playfanfare MUS_ME_ASA
waitfanfare waitfanfare
@@ -160,13 +151,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66:: @ 8259D66
case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98
setvar VAR_0x8004, 12 factory_generateopponentmons
special CallBattleFactoryFunction factory_getopponentmontype
setvar VAR_0x8004, 14
special CallBattleFactoryFunction
setorcopyvar VAR_0x8005, VAR_RESULT setorcopyvar VAR_0x8005, VAR_RESULT
setvar VAR_0x8004, 15 factory_getopponentstyle
special CallBattleFactoryFunction
setorcopyvar VAR_0x8006, VAR_RESULT setorcopyvar VAR_0x8006, VAR_RESULT
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93
call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004
@@ -178,13 +166,11 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2:: @ 8259DF2 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2:: @ 8259DF2
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 7 factory_swapmons
special CallBattleFactoryFunction
waitstate waitstate
compare VAR_RESULT, 1 compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74
setvar VAR_0x8004, 8 factory_setswapped
special CallBattleFactoryFunction
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB6C, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB6C, MSGBOX_DEFAULT
goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74
@@ -221,9 +207,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E40:: @ 8259E40
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47
message BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABAE message BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABAE
waitmessage waitmessage
setvar VAR_0x8004, 3 factory_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallBattleFactoryFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -232,50 +216,48 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69:: @ 8259E69 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69:: @ 8259E69
special SavePlayerParty special SavePlayerParty
setvar VAR_0x8004, 10 factory_setparties 0
setvar VAR_0x8005, 0
special CallBattleFactoryFunction
frontier_set FRONTIER_DATA_6, 1 frontier_set FRONTIER_DATA_6, 1
special CalculatePlayerPartyCount special CalculatePlayerPartyCount
goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93:: @ 8259E93 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93:: @ 8259E93
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3B4, MSGBOX_DEFAULT msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3B4, MSGBOX_DEFAULT
compare VAR_0x8005, 0 compare VAR_0x8005, TYPE_NORMAL
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F62 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F62
compare VAR_0x8005, 1 compare VAR_0x8005, TYPE_FIGHTING
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F6B call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F6B
compare VAR_0x8005, 2 compare VAR_0x8005, TYPE_FLYING
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F74 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F74
compare VAR_0x8005, 3 compare VAR_0x8005, TYPE_POISON
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F7D call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F7D
compare VAR_0x8005, 4 compare VAR_0x8005, TYPE_GROUND
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F86 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F86
compare VAR_0x8005, 5 compare VAR_0x8005, TYPE_ROCK
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F8F call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F8F
compare VAR_0x8005, 6 compare VAR_0x8005, TYPE_BUG
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F98 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F98
compare VAR_0x8005, 7 compare VAR_0x8005, TYPE_GHOST
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FA1 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FA1
compare VAR_0x8005, 8 compare VAR_0x8005, TYPE_STEEL
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FAA call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FAA
compare VAR_0x8005, 10 compare VAR_0x8005, TYPE_FIRE
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FB3 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FB3
compare VAR_0x8005, 11 compare VAR_0x8005, TYPE_WATER
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FBC call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FBC
compare VAR_0x8005, 12 compare VAR_0x8005, TYPE_GRASS
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FC5 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FC5
compare VAR_0x8005, 13 compare VAR_0x8005, TYPE_ELECTRIC
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FCE call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FCE
compare VAR_0x8005, 14 compare VAR_0x8005, TYPE_PSYCHIC
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FD7 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FD7
compare VAR_0x8005, 15 compare VAR_0x8005, TYPE_ICE
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE0 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE0
compare VAR_0x8005, 16 compare VAR_0x8005, TYPE_DRAGON
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE9 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE9
compare VAR_0x8005, 17 compare VAR_0x8005, TYPE_DARK
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FF2 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FF2
compare VAR_0x8005, 18 compare VAR_0x8005, NUMBER_OF_MON_TYPES
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FFB call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FFB
return return
@@ -352,23 +334,23 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FFB:: @ 8259FFB
return return
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004:: @ 825A004 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004:: @ 825A004
compare VAR_0x8006, 0 compare VAR_0x8006, FACTORY_STYLE_NONE
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A068 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A068
compare VAR_0x8006, 1 compare VAR_0x8006, FACTORY_STYLE_PREPARATION
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A071 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A071
compare VAR_0x8006, 2 compare VAR_0x8006, FACTORY_STYLE_SLOW_STEADY
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A07A call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A07A
compare VAR_0x8006, 3 compare VAR_0x8006, FACTORY_STYLE_ENDURANCE
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A083 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A083
compare VAR_0x8006, 4 compare VAR_0x8006, FACTORY_STYLE_HIGH_RISK
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A08C call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A08C
compare VAR_0x8006, 5 compare VAR_0x8006, FACTORY_STYLE_WEAKENING
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A095 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A095
compare VAR_0x8006, 6 compare VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A09E call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A09E
compare VAR_0x8006, 7 compare VAR_0x8006, FACTORY_STYLE_WEATHER
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0A7 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0A7
compare VAR_0x8006, 8 compare VAR_0x8006, FACTORY_NUM_STYLES
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B0 call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B0
return return
@@ -48,8 +48,7 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8B5:: @ 824F8B5
waitmovement 0 waitmovement 0
BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8BF:: @ 824F8BF BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8BF:: @ 824F8BF
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 2 addobject 2
applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1 applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1
waitmovement 0 waitmovement 0
@@ -164,9 +163,7 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28:: @ 824FB28
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F:: @ 824FB3F BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F:: @ 824FB3F
message BattleFrontier_BattlePalaceBattleRoom_Text_25007E message BattleFrontier_BattlePalaceBattleRoom_Text_25007E
waitmessage waitmessage
setvar VAR_0x8004, 7 palace_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallBattlePalaceFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -233,8 +230,7 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCAA:: @ 824FCAA
goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7:: @ 824FCC7 BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7:: @ 824FCC7
setvar VAR_0x8004, 6 palace_incrementstreak
special CallBattlePalaceFunction
frontier_getsymbols frontier_getsymbols
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28
@@ -269,8 +265,7 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD67:: @ 824FD67
goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA
BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84:: @ 824FD84 BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84:: @ 824FD84
setvar VAR_0x8004, 6 palace_incrementstreak
special CallBattlePalaceFunction
frontier_getsymbols frontier_getsymbols
compare VAR_RESULT, 2 compare VAR_RESULT, 2
goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28
@@ -12,8 +12,7 @@ BattleFrontier_BattlePalaceCorridor_EventScript_24F4B3:: @ 824F4B3
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5B8 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5B8
waitmovement 0 waitmovement 0
lockall lockall
setvar VAR_0x8004, 3 palace_getcomment
special CallBattlePalaceFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F58B call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F58B
compare VAR_RESULT, 1 compare VAR_RESULT, 1
@@ -28,14 +28,8 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D7D0:: @ 824D7D0
lockall lockall
msgbox BattleFrontier_BattlePalaceLobby_Text_24E636, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24E636, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, 2 palace_set PALACE_DATA_WIN_STREAK, 0
setvar VAR_0x8005, 1 palace_set PALACE_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8006, 0
special CallBattlePalaceFunction
setvar VAR_0x8004, 2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattlePalaceFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
releaseall releaseall
@@ -51,7 +45,6 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D817:: @ 824D817
BattleFrontier_BattlePalaceLobby_EventScript_24D838:: @ 824D838 BattleFrontier_BattlePalaceLobby_EventScript_24D838:: @ 824D838
msgbox BattleFrontier_BattlePalaceLobby_Text_24EE81, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24EE81, MSGBOX_DEFAULT
BattleFrontier_BattlePalaceLobby_EventScript_24D840:: @ 824D840 BattleFrontier_BattlePalaceLobby_EventScript_24D840:: @ 824D840
msgbox BattleFrontier_BattlePalaceLobby_Text_24EEB9, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24EEB9, MSGBOX_DEFAULT
frontier_givepoints frontier_givepoints
@@ -69,10 +62,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D873:: @ 824D873
lockall lockall
message BattleFrontier_BattlePalaceLobby_Text_24E41E message BattleFrontier_BattlePalaceLobby_Text_24E41E
waitmessage waitmessage
setvar VAR_0x8004, 2 palace_set PALACE_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattlePalaceFunction
call BattleFrontier_BattlePalaceLobby_EventScript_24D8A1 call BattleFrontier_BattlePalaceLobby_EventScript_24D8A1
msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT
closemessage closemessage
@@ -84,9 +74,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D8A1:: @ 824D8A1
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, 7 palace_save 0
setvar VAR_0x8005, 0
special CallBattlePalaceFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
call BattleFrontier_BattlePalaceLobby_EventScript_23E8E0 call BattleFrontier_BattlePalaceLobby_EventScript_23E8E0
@@ -110,9 +98,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D908:: @ 824D908
msgbox BattleFrontier_BattlePalaceLobby_Text_24E5D8, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24E5D8, MSGBOX_DEFAULT
message BattleFrontier_BattlePalaceLobby_Text_24E5F6 message BattleFrontier_BattlePalaceLobby_Text_24E5F6
waitmessage waitmessage
setvar VAR_0x8004, 7 palace_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattlePalaceFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -136,17 +122,14 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D956:: @ 824D956
end end
BattleFrontier_BattlePalaceLobby_EventScript_24D968:: @ 824D968 BattleFrontier_BattlePalaceLobby_EventScript_24D968:: @ 824D968
setvar VAR_0x8004, 1 palace_get PALACE_DATA_PRIZE
setvar VAR_0x8005, 0 compare VAR_RESULT, ITEM_NONE
special CallBattlePalaceFunction
compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_24D817 goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_24D817
special SavePlayerParty special SavePlayerParty
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB9E call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB9E
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES
call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBA7 call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBA7
BattleFrontier_BattlePalaceLobby_EventScript_24D999:: @ 824D999 BattleFrontier_BattlePalaceLobby_EventScript_24D999:: @ 824D999
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBB0 call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBB0
@@ -189,12 +172,8 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D9E6:: @ 824D9E6
BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87 BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, 0 palace_init
special CallBattlePalaceFunction palace_set PALACE_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, 2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattlePalaceFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
@@ -245,10 +224,8 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DB7A:: @ 824DB7A
BattleFrontier_BattlePalaceLobby_EventScript_24DB91:: @ 824DB91 BattleFrontier_BattlePalaceLobby_EventScript_24DB91:: @ 824DB91
special LoadPlayerParty special LoadPlayerParty
BattleFrontier_BattlePalaceLobby_EventScript_24DB94:: @ 824DB94 BattleFrontier_BattlePalaceLobby_EventScript_24DB94:: @ 824DB94
msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT
BattleFrontier_BattlePalaceLobby_EventScript_24DB9C:: @ 824DB9C BattleFrontier_BattlePalaceLobby_EventScript_24DB9C:: @ 824DB9C
release release
end end
@@ -10,9 +10,8 @@ BattleFrontier_BattlePikeCorridor_MapScript2_25C77C: @ 825C77C
BattleFrontier_BattlePikeCorridor_EventScript_25C786:: @ 825C786 BattleFrontier_BattlePikeCorridor_EventScript_25C786:: @ 825C786
delay 16 delay 16
frontier_set FRONTIER_DATA_BATTLE_NUM, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, 1
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS pike_cleartrainerids
special CallBattlePikeFunction pike_nohealing TRUE
battlepike_nohealing TRUE
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_25C80B applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_25C80B
applymovement 1, BattleFrontier_BattlePikeCorridor_Movement_25C812 applymovement 1, BattleFrontier_BattlePikeCorridor_Movement_25C812
waitmovement 0 waitmovement 0
@@ -25,16 +25,12 @@ BattleFrontier_BattlePikeLobby_EventScript_25B707:: @ 825B707
BattleFrontier_BattlePikeLobby_EventScript_25B710:: @ 825B710 BattleFrontier_BattlePikeLobby_EventScript_25B710:: @ 825B710
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, BATTLE_PIKE_FUNC_LOAD_MON_HELD_ITEMS pike_resethelditems
special CallBattlePikeFunction
lockall lockall
msgbox BattleFrontier_BattlePikeLobby_Text_25C2E0, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePikeLobby_Text_25C2E0, MSGBOX_DEFAULT
closemessage closemessage
battlepike_setstreak 0 pike_set PIKE_DATA_WIN_STREAK 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 4
setvar VAR_0x8006, 0
special CallBattlePikeFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
releaseall releaseall
@@ -58,23 +54,15 @@ BattleFrontier_BattlePikeLobby_EventScript_25B78D:: @ 825B78D
frontier_givepoints frontier_givepoints
msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS
frontier_checkairshow frontier_checkairshow
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA pike_get PIKE_DATA_TOTAL_STREAKS
setvar VAR_0x8005, 3
special CallBattlePikeFunction
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA pike_set PIKE_DATA_TOTAL_STREAKS, VAR_RESULT
setvar VAR_0x8005, 3
copyvar VAR_0x8006, VAR_RESULT
special CallBattlePikeFunction
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, BATTLE_PIKE_FUNC_LOAD_MON_HELD_ITEMS pike_resethelditems
special CallBattlePikeFunction
message BattleFrontier_BattlePikeLobby_Text_25C1DF message BattleFrontier_BattlePikeLobby_Text_25C1DF
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_PIKE_FUNC_8 pike_save 0
setvar VAR_0x8005, 0
special CallBattlePikeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT
@@ -89,17 +77,11 @@ BattleFrontier_BattlePikeLobby_EventScript_25B806:: @ 825B806
waitmessage waitmessage
frontier_checkairshow frontier_checkairshow
frontier_set FRONTIER_DATA_BATTLE_NUM, 0 frontier_set FRONTIER_DATA_BATTLE_NUM, 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 4
setvar VAR_0x8006, 0
special CallBattlePikeFunction
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, BATTLE_PIKE_FUNC_LOAD_MON_HELD_ITEMS pike_resethelditems
special CallBattlePikeFunction pike_save 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_8
setvar VAR_0x8005, 0
special CallBattlePikeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT
@@ -156,23 +138,17 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_TEMP_1, 0 setvar VAR_TEMP_1, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, BATTLE_PIKE_FUNC_INIT_CHALLENGE pike_init
special CallBattlePikeFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA pike_set PIKE_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8005, 4 pike_savehelditems
setvar VAR_0x8006, 1
special CallBattlePikeFunction
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE_MON_HELD_ITEMS
special CallBattlePikeFunction
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
delay 2 delay 2
call Common_EventScript_SaveGame call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE_MON_HELD_ITEMS pike_savehelditems
special CallBattlePikeFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA5C goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA5C
special SavePlayerParty special SavePlayerParty
@@ -11,7 +11,7 @@ BattleFrontier_BattlePikeRoomNormal_OnFrame: @ 825D167
BattleFrontier_BattlePikeRoomNormal_EventScript_25D171:: @ 825D171 BattleFrontier_BattlePikeRoomNormal_EventScript_25D171:: @ 825D171
setvar VAR_TEMP_0, 1 setvar VAR_TEMP_0, 1
battlepike_getroomtype pike_getroomtype
switch VAR_RESULT switch VAR_RESULT
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6 case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_25D50E case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_25D50E
@@ -26,9 +26,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6:: @ 825D1C6
delay 16 delay 16
applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795 applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_RECORD_MIX_MSG pike_gettrainerintro 0
setvar VAR_0x8005, 0
special CallBattlePikeFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
closemessage closemessage
@@ -39,7 +37,6 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6:: @ 825D1C6
waitstate waitstate
switch VAR_RESULT switch VAR_RESULT
case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D226 case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D226
BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A:: @ 825D20A BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A:: @ 825D20A
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
@@ -59,9 +56,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D231:: @ 825D231
closemessage closemessage
applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795 applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_RECORD_MIX_MSG pike_gettrainerintro 0
setvar VAR_0x8005, 0
special CallBattlePikeFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
closemessage closemessage
@@ -98,8 +93,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D2BF:: @ 825D2BF
lockall lockall
applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DF applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DF
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN pike_prequeenheal
special CallBattlePikeFunction
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4DC case 0, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4DC
case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4EA case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4EA
@@ -112,7 +106,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB:: @ 825D2FB
applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_25D9B0 applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_25D9B0
applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E2 applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E2
waitmovement 0 waitmovement 0
playse 267 playse SE_CURTAIN
call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7 call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7
delay 4 delay 4
call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4 call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4
@@ -121,7 +115,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB:: @ 825D2FB
delay 4 delay 4
waitse waitse
delay 60 delay 60
playse 268 playse SE_CURTAIN1
delay 65 delay 65
call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4 call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4
showobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL showobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
@@ -132,12 +126,11 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB:: @ 825D2FB
waitse waitse
applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E7 applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E7
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE pike_getbrainstatus
special CallBattlePikeFunction
switch VAR_RESULT switch VAR_RESULT
case 2, BattleFrontier_BattlePikeRoomNormal_EventScript_25D416 case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePikeRoomNormal_EventScript_25D416
case 3, BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD
case 4, BattleFrontier_BattlePikeRoomNormal_EventScript_25D443 case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePikeRoomNormal_EventScript_25D443
frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD
@@ -199,9 +192,9 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D:: @ 825D49D
waitmovement 0 waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DC applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DC
waitmovement 0 waitmovement 0
battlepike_getstreak pike_get PIKE_DATA_WIN_STREAK
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT pike_set PIKE_DATA_WIN_STREAK VAR_RESULT
call BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom call BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom
waitstate waitstate
end end
@@ -256,17 +249,13 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D53E:: @ 825D53E
waitmovement 0 waitmovement 0
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BB applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BB
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_RECORD_MIX_MSG pike_gettrainerintro 0
setvar VAR_0x8005, 0
special CallBattlePikeFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
closemessage closemessage
delay 16 delay 16
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BD applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BD
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_RECORD_MIX_MSG pike_gettrainerintro 1
setvar VAR_0x8005, 1
special CallBattlePikeFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, SPECIAL_BATTLE_PIKE_DOUBLE setvar VAR_0x8004, SPECIAL_BATTLE_PIKE_DOUBLE
@@ -294,12 +283,11 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D605:: @ 825D605
message BattleFrontier_BattlePikeRoomNormal_Text_25DBD1 message BattleFrontier_BattlePikeRoomNormal_Text_25DBD1
applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7AA applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7AA
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON pike_getstatusmon
special CallBattlePikeFunction
copyvar VAR_0x8004, VAR_RESULT copyvar VAR_0x8004, VAR_RESULT
compare VAR_0x8004, 0 compare VAR_0x8004, PIKE_STATUS_KIRLIA
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D643 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D643
compare VAR_0x8004, 1 compare VAR_0x8004, PIKE_STATUS_DUSCLOPS
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D6D5 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D6D5
msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DD3F, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DD3F, MSGBOX_DEFAULT
closemessage closemessage
@@ -312,18 +300,16 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D643:: @ 825D643
waitse waitse
playmoncry SPECIES_KIRLIA, 0 playmoncry SPECIES_KIRLIA, 0
waitmoncry waitmoncry
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS pike_getstatus
special CallBattlePikeFunction compare VAR_RESULT, PIKE_STATUS_TOXIC
compare VAR_RESULT, 2
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D751 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D751
compare VAR_RESULT, 1 compare VAR_RESULT, PIKE_STATUS_BURN
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D758 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D758
compare VAR_RESULT, 3 compare VAR_RESULT, PIKE_STATUS_PARALYSIS
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D75F call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D75F
compare VAR_RESULT, 4 compare VAR_RESULT, PIKE_STATUS_SLEEP
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D766 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D766
setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE pike_fadescreen
special CallBattlePikeFunction
waitstate waitstate
applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2 applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2
waitmovement 0 waitmovement 0
@@ -349,14 +335,12 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D6D5:: @ 825D6D5
waitse waitse
playmoncry SPECIES_DUSCLOPS, 0 playmoncry SPECIES_DUSCLOPS, 0
waitmoncry waitmoncry
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS pike_getstatus
special CallBattlePikeFunction compare VAR_RESULT, PIKE_STATUS_FREEZE
compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D76D call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D76D
compare VAR_RESULT, 1 compare VAR_RESULT, PIKE_STATUS_BURN
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D774 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D774
setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE pike_fadescreen
special CallBattlePikeFunction
waitstate waitstate
applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2 applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2
waitmovement 0 waitmovement 0
@@ -555,7 +539,7 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D7EA: @ 825D7EA
step_end step_end
BattleFrontier_BattlePikeRoomNormal_EventScript_25D7ED:: @ 825D7ED BattleFrontier_BattlePikeRoomNormal_EventScript_25D7ED:: @ 825D7ED
battlepike_getroomtype pike_getroomtype
switch VAR_RESULT switch VAR_RESULT
case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B
case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_25D831 case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_25D831
@@ -563,8 +547,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D7ED:: @ 825D7ED
BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B:: @ 825D81B BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B:: @ 825D81B
lock lock
faceplayer faceplayer
setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_NPC_MSG pike_getnpcmsg
special CallBattlePikeFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
closemessage closemessage
@@ -580,8 +563,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D831:: @ 825D831
end end
BattleFrontier_BattlePikeRoomNormal_EventScript_25D83E:: @ 825D83E BattleFrontier_BattlePikeRoomNormal_EventScript_25D83E:: @ 825D83E
setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS pike_healonetwomons
special CallBattlePikeFunction
compare VAR_RESULT, 2 compare VAR_RESULT, 2
call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D881 call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D881
compare VAR_RESULT, 1 compare VAR_RESULT, 1
@@ -11,8 +11,7 @@ BattleFrontier_BattlePikeRoomWildMons_MapScript2_25E42A: @ 825E42A
BattleFrontier_BattlePikeRoomWildMons_EventScript_25E43C:: @ 825E43C BattleFrontier_BattlePikeRoomWildMons_EventScript_25E43C:: @ 825E43C
setvar VAR_TEMP_0, 1 setvar VAR_TEMP_0, 1
setvar VAR_0x8004, BATTLE_PIKE_FUNC_6 pike_inwildmonroom
special CallBattlePikeFunction
end end
BattleFrontier_BattlePikeRoomWildMons_EventScript_25E44A:: @ 825E44A BattleFrontier_BattlePikeRoomWildMons_EventScript_25E44A:: @ 825E44A
@@ -34,9 +34,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C8A4:: @ 825C8A4
lockall lockall
message BattleFrontier_BattlePikeThreePathRoom_Text_AwaitingReturnSaveBeforeResume message BattleFrontier_BattlePikeThreePathRoom_Text_AwaitingReturnSaveBeforeResume
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_PIKE_FUNC_8 pike_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattlePikeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -124,9 +122,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD:: @ 825C9FD
message BattleFrontier_BattlePikeThreePathRoom_Text_SavingYourData message BattleFrontier_BattlePikeThreePathRoom_Text_SavingYourData
waitmessage waitmessage
special LoadPlayerParty special LoadPlayerParty
setvar VAR_0x8004, BATTLE_PIKE_FUNC_8 pike_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallBattlePikeFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -152,9 +148,8 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A:: @ 825CA5A
end end
BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA78:: @ 825CA78 BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA78:: @ 825CA78
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HINT_ROOM pike_sethintroom
special CallBattlePikeFunction compare VAR_RESULT, TRUE
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA91 goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA91
setvar VAR_TEMP_5, 255 setvar VAR_TEMP_5, 255
end end
@@ -175,7 +170,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA97:: @ 825CA97
end end
BattleFrontier_BattlePikeThreePathRoom_EventScript_HintGiver:: @ 825CABB BattleFrontier_BattlePikeThreePathRoom_EventScript_HintGiver:: @ 825CABB
battlepike_gethint pike_gethint
compare VAR_RESULT, PIKE_HINT_BRAIN compare VAR_RESULT, PIKE_HINT_BRAIN
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint
lock lock
@@ -194,8 +189,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_DeclineHint:: @ 825CB00
end end
BattleFrontier_BattlePikeThreePathRoom_EventScript_AcceptHint:: @ 825CB0A BattleFrontier_BattlePikeThreePathRoom_EventScript_AcceptHint:: @ 825CB0A
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID pike_gethintroomid
special CallBattlePikeFunction
switch VAR_RESULT switch VAR_RESULT
case PIKE_ROOM_LEFT, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveLeftRoomHint case PIKE_ROOM_LEFT, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveLeftRoomHint
case PIKE_ROOM_CENTER, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveCenterRoomHint case PIKE_ROOM_CENTER, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveCenterRoomHint
@@ -215,7 +209,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveRightRoomHint:: @ 825CB53
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveHint goto BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveHint
BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveHint:: @ 825CB60 BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveHint:: @ 825CB60
battlepike_gethint pike_gethint
switch VAR_RESULT switch VAR_RESULT
case PIKE_HINT_NOSTALGIA, BattleFrontier_BattlePikeThreePathRoom_EventScript_HintNostalgia case PIKE_HINT_NOSTALGIA, BattleFrontier_BattlePikeThreePathRoom_EventScript_HintNostalgia
case PIKE_HINT_WHISPERING, BattleFrontier_BattlePikeThreePathRoom_EventScript_HintWhispering case PIKE_HINT_WHISPERING, BattleFrontier_BattlePikeThreePathRoom_EventScript_HintWhispering
@@ -14,8 +14,8 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252A5D:: @ 8252A5D
lockall lockall
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
setvar VAR_0x8005, 4 setvar VAR_0x8005, 4
setvar VAR_0x8006, 1 setvar VAR_0x8006, PYRAMID_LIGHT_INCR_RADIUS
setvar VAR_0x8007, 55 setvar VAR_0x8007, SE_SAVE
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
BattleFrontier_BattlePyramidEmptySquare_EventScript_252A77:: @ 8252A77 BattleFrontier_BattlePyramidEmptySquare_EventScript_252A77:: @ 8252A77
special CallBattlePyramidFunction special CallBattlePyramidFunction
@@ -37,8 +37,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252A98:: @ 8252A98
end end
BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2: @ 8252AA2 BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2: @ 8252AA2
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE pyramid_setfloorpal
special CallBattlePyramidFunction
frontier_getstatus frontier_getstatus
switch VAR_TEMP_0 switch VAR_TEMP_0
case 0, BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D 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 frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here
setvar VAR_TEMP_D, 1 setvar VAR_TEMP_D, 1
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39:: @ 8252B39 BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39:: @ 8252B39
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY pyramid_healparty
special CallBattlePyramidFunction
end end
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42:: @ 8252B42 BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42:: @ 8252B42
BattleFrontier_BattlePyramidTop_EventScript_252B42:: @ 8252B42 BattleFrontier_BattlePyramidTop_EventScript_252B42:: @ 8252B42
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA pyramid_set PYRAMID_DATA_TRAINER_FLAGS, 255
setvar VAR_0x8005, 7
setvar VAR_0x8006, 255
special CallBattlePyramidFunction
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B66:: @ 8252B66 BattleFrontier_BattlePyramidEmptySquare_EventScript_252B66:: @ 8252B66
BattleFrontier_BattlePyramidTop_EventScript_252B66:: @ 8252B66 BattleFrontier_BattlePyramidTop_EventScript_252B66:: @ 8252B66
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS
setvar VAR_0x8005, 0 pyramid_clearhelditems
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
special CallBattlePyramidFunction
special HealPlayerParty special HealPlayerParty
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13
waitstate waitstate
end end
BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D:: @ 8252B8D BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D:: @ 8252B8D
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3 pyramid_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattlePyramidFunction
special SavePlayerParty special SavePlayerParty
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS pyramid_inittrainers
special CallBattlePyramidFunction
frontier_setpartyorder FRONTIER_PARTY_SIZE frontier_setpartyorder FRONTIER_PARTY_SIZE
setvar VAR_TEMP_F, 1 setvar VAR_TEMP_F, 1
end end
@@ -103,10 +90,7 @@ BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA: @ 8252BCA
end end
BattleFrontier_BattlePyramidEmptySquare_EventScript_252BD5:: @ 8252BD5 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BD5:: @ 8252BD5
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT pyramid_updatelight 32, PYRAMID_LIGHT_SET_RADIUS
setvar VAR_0x8005, 32
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
return return
BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8
@@ -116,8 +100,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
compare VAR_RESULT, 7 compare VAR_RESULT, 7
goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45 goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR pyramid_seedfloor
special CallBattlePyramidFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE, 255, 1, 1 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 @ TRAINER_PHILLIP is used as a placeholder
BattlePyramid_TrainerBattle:: @ 8252C4F BattlePyramid_TrainerBattle:: @ 8252C4F
trainerbattle TRAINER_BATTLE_PYRAMID, TRAINER_PHILLIP, 0, BattleFacility_TrainerBattle_PlaceholderText, BattleFacility_TrainerBattle_PlaceholderText trainerbattle TRAINER_BATTLE_PYRAMID, TRAINER_PHILLIP, 0, BattleFacility_TrainerBattle_PlaceholderText, BattleFacility_TrainerBattle_PlaceholderText
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT pyramid_showhint
special CallBattlePyramidFunction
waitmessage waitmessage
waitbuttonpress waitbuttonpress
closemessage closemessage
@@ -141,14 +123,11 @@ BattlePyramid_TrainerBattle:: @ 8252C4F
end end
BattlePyramid_FindItemBall:: @ 8252C6A BattlePyramid_FindItemBall:: @ 8252C6A
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM pyramid_setitem
special CallBattlePyramidFunction
callstd STD_FIND_ITEM callstd STD_FIND_ITEM
compare VAR_0x8007, 0 compare VAR_0x8007, 0
goto_if_eq BattlePyramid_FindItemBall_End goto_if_eq BattlePyramid_FindItemBall_End
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM pyramid_hideitem
special CallBattlePyramidFunction
BattlePyramid_FindItemBall_End:: @ 8252C87 BattlePyramid_FindItemBall_End:: @ 8252C87
end end
@@ -31,14 +31,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_250768:: @ 8250768
playse SE_EXPMAX playse SE_EXPMAX
waitse waitse
closemessage closemessage
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA pyramid_set PYRAMID_DATA_WIN_STREAK, 0
setvar VAR_0x8005, 1 pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
releaseall releaseall
@@ -61,8 +55,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS pyramid_clearhelditems
special CallBattlePyramidFunction
special HealPlayerParty special HealPlayerParty
message BattleFrontier_BattlePyramidLobby_Text_2519F8 message BattleFrontier_BattlePyramidLobby_Text_2519F8
waitmessage waitmessage
@@ -73,11 +66,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS
message BattleFrontier_BattlePyramidLobby_Text_251A77 message BattleFrontier_BattlePyramidLobby_Text_251A77
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_REWARD pyramid_setprize
special CallBattlePyramidFunction pyramid_save 0
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
setvar VAR_0x8005, 0
special CallBattlePyramidFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT
@@ -89,8 +79,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852 BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS pyramid_clearhelditems
special CallBattlePyramidFunction
special HealPlayerParty special HealPlayerParty
lockall lockall
message BattleFrontier_BattlePyramidLobby_Text_251B5A message BattleFrontier_BattlePyramidLobby_Text_251B5A
@@ -99,13 +88,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852
waitse waitse
message BattleFrontier_BattlePyramidLobby_Text_251A77 message BattleFrontier_BattlePyramidLobby_Text_251A77
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 2 pyramid_save 0
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3
setvar VAR_0x8005, 0
special CallBattlePyramidFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT
@@ -164,18 +148,12 @@ BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904
BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5 BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_CHALLENGE pyramid_init
special CallBattlePyramidFunction pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattlePyramidFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR pyramid_seedfloor
special CallBattlePyramidFunction pyramid_inittrainers
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS
special CallBattlePyramidFunction
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
delay 2 delay 2
@@ -251,37 +229,29 @@ BattleFrontier_BattlePyramidLobby_EventScript_250B27:: @ 8250B27
BattleFrontier_BattlePyramidLobby_EventScript_250B28:: @ 8250B28 BattleFrontier_BattlePyramidLobby_EventScript_250B28:: @ 8250B28
msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_50
setvar VAR_0x8005, 5 compare VAR_RESULT, FALSE
special CallBattlePyramidFunction
compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B53 goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B53
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
return return
BattleFrontier_BattlePyramidLobby_EventScript_250B53:: @ 8250B53 BattleFrontier_BattlePyramidLobby_EventScript_250B53:: @ 8250B53
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA pyramid_get PYRAMID_DATA_WIN_STREAK_50
setvar VAR_0x8005, 3
special CallBattlePyramidFunction
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
return return
BattleFrontier_BattlePyramidLobby_EventScript_250B66:: @ 8250B66 BattleFrontier_BattlePyramidLobby_EventScript_250B66:: @ 8250B66
msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN
setvar VAR_0x8005, 6 compare VAR_RESULT, FALSE
special CallBattlePyramidFunction
compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B91 goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B91
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
return return
BattleFrontier_BattlePyramidLobby_EventScript_250B91:: @ 8250B91 BattleFrontier_BattlePyramidLobby_EventScript_250B91:: @ 8250B91
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA pyramid_get PYRAMID_DATA_WIN_STREAK_OPEN
setvar VAR_0x8005, 4
special CallBattlePyramidFunction
goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4
return return
@@ -404,9 +374,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250D56:: @ 8250D56
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_250DCD applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_250DCD
waitmovement 0 waitmovement 0
msgbox BattleFrontier_BattlePyramidLobby_Text_251569, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_251569, MSGBOX_DEFAULT
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA pyramid_get PYRAMID_DATA_WIN_STREAK
setvar VAR_0x8005, 1
special CallBattlePyramidFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250D94 goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250D94
msgbox BattleFrontier_BattlePyramidLobby_Text_2515AD, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePyramidLobby_Text_2515AD, MSGBOX_DEFAULT
@@ -6,10 +6,7 @@ BattleFrontier_BattlePyramidTop_MapScripts:: @ 82550A1
.byte 0 .byte 0
BattleFrontier_BattlePyramidTop_MapScript1_2550B6: @ 82550B6 BattleFrontier_BattlePyramidTop_MapScript1_2550B6: @ 82550B6
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT pyramid_updatelight 200, PYRAMID_LIGHT_SET_RADIUS
setvar VAR_0x8005, 200
setvar VAR_0x8006, 0
special CallBattlePyramidFunction
setvar VAR_TEMP_F, 1 setvar VAR_TEMP_F, 1
end end
@@ -64,13 +61,10 @@ BattleFrontier_BattlePyramidTop_EventScript_25518A:: @ 825518A
end end
BattleFrontier_BattlePyramidTop_EventScript_255193:: @ 8255193 BattleFrontier_BattlePyramidTop_EventScript_255193:: @ 8255193
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_3 pyramid_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattlePyramidFunction
special SavePlayerParty special SavePlayerParty
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS pyramid_inittrainers
special CallBattlePyramidFunction
frontier_setpartyorder FRONTIER_PARTY_SIZE frontier_setpartyorder FRONTIER_PARTY_SIZE
setvar VAR_TEMP_F, 1 setvar VAR_TEMP_F, 1
end end
@@ -32,14 +32,11 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241B6C:: @ 8241B6C
goto BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F goto BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F
BattleFrontier_BattleTowerBattleRoom_EventScript_241BC3:: @ 8241BC3 BattleFrontier_BattleTowerBattleRoom_EventScript_241BC3:: @ 8241BC3
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 1 addobject 1
applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242182 applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242182
waitmovement 0 waitmovement 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
call BattleFrontier_BattleTowerBattleRoom_EventScript_24210E call BattleFrontier_BattleTowerBattleRoom_EventScript_24210E
@@ -48,17 +45,14 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241BC3:: @ 8241BC3
BattleFrontier_BattleTowerBattleRoom_EventScript_241C03:: @ 8241C03 BattleFrontier_BattleTowerBattleRoom_EventScript_241C03:: @ 8241C03
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_241C03:: @ 8241C03 BattleFrontier_BattleTowerMultiBattleRoom_EventScript_241C03:: @ 8241C03
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8005, 3
special CallBattleTowerFunc
setvar VAR_0x8004, 3 setvar VAR_0x8004, 3
special Script_TryGainNewFanFromCounter special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8 goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8
BattleFrontier_BattleTowerBattleRoom_EventScript_241C2F:: @ 8241C2F BattleFrontier_BattleTowerBattleRoom_EventScript_241C2F:: @ 8241C2F
call BattleFrontier_EventScript_IncrementWinStreak call BattleFrontier_EventScript_IncrementWinStreak
setvar VAR_0x8004, BATTLE_TOWER_FUNC_4 tower_setbattlewon
special CallBattleTowerFunc
switch VAR_RESULT switch VAR_RESULT
case 7, BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6 case 7, BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6
applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242188 applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242188
@@ -141,9 +135,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241DDC:: @ 8241DDC
BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6:: @ 8241DF6 BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6:: @ 8241DF6
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8005, 3
special CallBattleTowerFunc
setvar VAR_0x8004, 3 setvar VAR_0x8004, 3
special Script_TryGainNewFanFromCounter special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8 goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8
@@ -151,9 +143,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6:: @ 8241DF6
BattleFrontier_BattleTowerBattleRoom_EventScript_241E22:: @ 8241E22 BattleFrontier_BattleTowerBattleRoom_EventScript_241E22:: @ 8241E22
message BattleFrontier_BattleTowerBattleRoom_Text_242426 message BattleFrontier_BattleTowerBattleRoom_Text_242426
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, CHALLENGE_STATUS_PAUSED
special CallBattleTowerFunc
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -333,8 +323,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_24210E:: @ 824210E
special HealPlayerParty special HealPlayerParty
frontier_resetsketch frontier_resetsketch
BattleFrontier_BattleTowerBattleRoom_EventScript_24215A:: @ 824215A BattleFrontier_BattleTowerBattleRoom_EventScript_24215A:: @ 824215A
setvar VAR_0x8004, BATTLE_TOWER_FUNC_15 tower_setinterviewdata
special CallBattleTowerFunc
frontier_get FRONTIER_DATA_BATTLE_OUTCOME frontier_get FRONTIER_DATA_BATTLE_OUTCOME
return return
@@ -58,8 +58,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248F4D:: @ 8248F4D
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249143 goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249143
BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4 BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 1 addobject 1
addobject 4 addobject 4
applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249528 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249528
@@ -67,17 +66,13 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4
waitmovement 0 waitmovement 0
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249026 goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249026
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
delay 15 delay 15
applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545
waitmovement 0 waitmovement 0
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 1
setvar VAR_0x8005, 1
special CallBattleTowerFunc
applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545
waitmovement 0 waitmovement 0
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
@@ -85,21 +80,17 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249069 goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249069
BattleFrontier_BattleTowerBattleRoom2_EventScript_249026:: @ 8249026 BattleFrontier_BattleTowerBattleRoom2_EventScript_249026:: @ 8249026
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
delay 15 delay 15
applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545
waitmovement 0 waitmovement 0
messageautoscroll 0x2021fc4 messageautoscroll gStringVar4
waitmessage waitmessage
delay 48 delay 48
setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 tower_getopponentintro 1
setvar VAR_0x8005, 1
special CallBattleTowerFunc
applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545
waitmovement 0 waitmovement 0
messageautoscroll 0x2021fc4 messageautoscroll gStringVar4
waitmessage waitmessage
delay 48 delay 48
@@ -110,17 +101,14 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249069:: @ 8249069
BattleFrontier_BattleTowerBattleRoom2_EventScript_24907E:: @ 824907E BattleFrontier_BattleTowerBattleRoom2_EventScript_24907E:: @ 824907E
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8005, 3
special CallBattleTowerFunc
setvar VAR_0x8004, 3 setvar VAR_0x8004, 3
special Script_TryGainNewFanFromCounter special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8 goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8
BattleFrontier_BattleTowerBattleRoom2_EventScript_2490AA:: @ 82490AA BattleFrontier_BattleTowerBattleRoom2_EventScript_2490AA:: @ 82490AA
call BattleFrontier_EventScript_IncrementWinStreak call BattleFrontier_EventScript_IncrementWinStreak
setvar VAR_0x8004, BATTLE_TOWER_FUNC_4 tower_setbattlewon
special CallBattleTowerFunc
switch VAR_RESULT switch VAR_RESULT
case 7, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF case 7, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF
applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249534 applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249534
@@ -220,9 +208,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249283:: @ 8249283
BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF:: @ 82492AF BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF:: @ 82492AF
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8005, 3
special CallBattleTowerFunc
setvar VAR_0x8004, 3 setvar VAR_0x8004, 3
special Script_TryGainNewFanFromCounter special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8 goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8
@@ -230,9 +216,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF:: @ 82492AF
BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB:: @ 82492DB BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB:: @ 82492DB
message BattleFrontier_BattleTowerBattleRoom2_Text_242426 message BattleFrontier_BattleTowerBattleRoom2_Text_242426
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, CHALLENGE_STATUS_PAUSED
special CallBattleTowerFunc
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -51,14 +51,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23E710:: @ 823E710
faceplayer faceplayer
msgbox BattleFrontier_BattleTowerLobby_Text_23F583, MSGBOX_DEFAULT msgbox BattleFrontier_BattleTowerLobby_Text_23F583, MSGBOX_DEFAULT
closemessage closemessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_WIN_STREAK, 0
setvar VAR_0x8005, 1 tower_set TOWER_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8006, 0
special CallBattleTowerFunc
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattleTowerFunc
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
release release
@@ -78,24 +72,20 @@ BattleFrontier_BattleTowerLobby_EventScript_23E778:: @ 823E778
msgbox BattleFrontier_BattleTowerLobby_Text_241486, MSGBOX_DEFAULT msgbox BattleFrontier_BattleTowerLobby_Text_241486, MSGBOX_DEFAULT
BattleFrontier_BattleTowerLobby_EventScript_23E780:: @ 823E780 BattleFrontier_BattleTowerLobby_EventScript_23E780:: @ 823E780
setvar VAR_0x8004, BATTLE_TOWER_FUNC_GIVE_RIBBONS tower_giveribbons
special CallBattleTowerFunc compare VAR_RESULT, FALSE
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E7A5 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E7A5
message BattleFrontier_BattleTowerLobby_Text_23F844 message BattleFrontier_BattleTowerLobby_Text_23F844
waitmessage waitmessage
playfanfare MUS_FANFA4 playfanfare MUS_FANFA4
waitfanfare waitfanfare
msgbox BattleFrontier_BattleTowerLobby_Text_23F89F, MSGBOX_DEFAULT msgbox BattleFrontier_BattleTowerLobby_Text_23F89F, MSGBOX_DEFAULT
BattleFrontier_BattleTowerLobby_EventScript_23E7A5:: @ 823E7A5 BattleFrontier_BattleTowerLobby_EventScript_23E7A5:: @ 823E7A5
msgbox BattleFrontier_BattleTowerLobby_Text_2414D4, MSGBOX_DEFAULT msgbox BattleFrontier_BattleTowerLobby_Text_2414D4, MSGBOX_DEFAULT
frontier_givepoints frontier_givepoints
msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS
call BattleFrontier_BattleTowerLobby_EventScript_23E84D call BattleFrontier_BattleTowerLobby_EventScript_23E84D
setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 tower_get TOWER_DATA_WIN_STREAK
setvar VAR_0x8005, 1
special CallBattleTowerFunc
compare VAR_RESULT, 49 compare VAR_RESULT, 49
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E7E2 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E7E2
msgbox BattleFrontier_BattleTowerLobby_Text_23F79D, MSGBOX_DEFAULT msgbox BattleFrontier_BattleTowerLobby_Text_23F79D, MSGBOX_DEFAULT
@@ -111,18 +101,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7F2:: @ 823E7F2
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E81E goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E81E
goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerLobby_EventScript_23E81E goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerLobby_EventScript_23E81E
setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 tower_get TOWER_DATA_WIN_STREAK
setvar VAR_0x8005, 1
special CallBattleTowerFunc
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E830 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E830
BattleFrontier_BattleTowerLobby_EventScript_23E81E:: @ 823E81E BattleFrontier_BattleTowerLobby_EventScript_23E81E:: @ 823E81E
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 tower_set TOWER_DATA_WIN_STREAK_ACTIVE, FALSE
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
special CallBattleTowerFunc
BattleFrontier_BattleTowerLobby_EventScript_23E830:: @ 823E830 BattleFrontier_BattleTowerLobby_EventScript_23E830:: @ 823E830
lock lock
faceplayer faceplayer
@@ -141,9 +125,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E84D:: @ 823E84D
frontier_checkairshow frontier_checkairshow
special LoadPlayerParty special LoadPlayerParty
special HealPlayerParty special HealPlayerParty
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
playse SE_SAVE playse SE_SAVE
waitse waitse
call BattleFrontier_BattleTowerLobby_EventScript_23E8E0 call BattleFrontier_BattleTowerLobby_EventScript_23E8E0
@@ -193,9 +175,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E8EE:: @ 823E8EE
waitmessage waitmessage
message BattleFrontier_BattleTowerLobby_Text_23F754 message BattleFrontier_BattleTowerLobby_Text_23F754
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattleTowerFunc
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -253,12 +233,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984
BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 tower_init
special CallBattleTowerFunc tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattleTowerFunc
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
@@ -324,12 +300,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED
BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93 BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 tower_init
special CallBattleTowerFunc tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattleTowerFunc
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
@@ -396,12 +368,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59
BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 tower_init
special CallBattleTowerFunc tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattleTowerFunc
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
@@ -467,19 +435,13 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2
BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68 BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 tower_init
special CallBattleTowerFunc tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
setvar VAR_0x8004, BATTLE_TOWER_FUNC_2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 1
special CallBattleTowerFunc
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
closemessage closemessage
delay 2 delay 2
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save 0
setvar VAR_0x8005, 0
special CallBattleTowerFunc
call Common_EventScript_SaveGame call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255 setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0 compare VAR_RESULT, 0
@@ -909,9 +871,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3AF:: @ 823F3AF
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattleTowerFunc
special sub_80A08CC special sub_80A08CC
waitstate waitstate
playse SE_SAVE playse SE_SAVE
@@ -972,9 +932,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F496:: @ 823F496
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage waitmessage
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE tower_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallBattleTowerFunc
special sub_80A08CC special sub_80A08CC
waitstate waitstate
playse SE_SAVE playse SE_SAVE
@@ -6,8 +6,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ 8243D92
.byte 0 .byte 0
BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7: @ 8243DA7 BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7: @ 8243DA7
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY pyramid_healparty
special CallBattlePyramidFunction
end end
BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0 BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0
@@ -453,25 +453,25 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ScopeLens:: @ 825F7A8
end end
BattleFrontier_ExchangeServiceCorner_EventScript_Man:: @ 825F7CB BattleFrontier_ExchangeServiceCorner_EventScript_Man:: @ 825F7CB
msgbox BattleFrontier_ExchangeServiceCorner_Text_260099, MSGBOX_NPC msgbox BattleFrontier_ExchangeServiceCorner_Text_GoGetYourOwnDoll, MSGBOX_NPC
end end
BattleFrontier_ExchangeServiceCorner_EventScript_Sailor:: @ 825F7D4 BattleFrontier_ExchangeServiceCorner_EventScript_Sailor:: @ 825F7D4
msgbox BattleFrontier_ExchangeServiceCorner_Text_26002E, MSGBOX_NPC msgbox BattleFrontier_ExchangeServiceCorner_Text_ItemsWillGetMonTougher, MSGBOX_NPC
end end
BattleFrontier_ExchangeServiceCorner_EventScript_PokefanF:: @ 825F7DD BattleFrontier_ExchangeServiceCorner_EventScript_PokefanF:: @ 825F7DD
lock lock
msgbox BattleFrontier_ExchangeServiceCorner_Text_25FFD0, MSGBOX_DEFAULT msgbox BattleFrontier_ExchangeServiceCorner_Text_GetYouAnythingYouWant, MSGBOX_DEFAULT
release release
end end
BattleFrontier_ExchangeServiceCorner_EventScript_RichBoy:: @ 825F7E8 BattleFrontier_ExchangeServiceCorner_EventScript_RichBoy:: @ 825F7E8
msgbox BattleFrontier_ExchangeServiceCorner_Text_25FF5D, MSGBOX_NPC msgbox BattleFrontier_ExchangeServiceCorner_Text_WishIHadAllDolls, MSGBOX_NPC
end end
BattleFrontier_ExchangeServiceCorner_EventScript_Girl:: @ 825F7F1 BattleFrontier_ExchangeServiceCorner_EventScript_Girl:: @ 825F7F1
msgbox BattleFrontier_ExchangeServiceCorner_Text_26012D, MSGBOX_NPC msgbox BattleFrontier_ExchangeServiceCorner_Text_MoreBattlePointsForRecord, MSGBOX_NPC
end end
BattleFrontier_ExchangeServiceCorner_Text_WelcomePleaseChoosePrize: @ 825F7FA BattleFrontier_ExchangeServiceCorner_Text_WelcomePleaseChoosePrize: @ 825F7FA
@@ -629,7 +629,7 @@ BattleFrontier_ExchangeServiceCorner_Text_ThankYouVisitWithPoints: @ 825FF12
.string "Please visit us when you have\n" .string "Please visit us when you have\n"
.string "saved up Battle Points.$" .string "saved up Battle Points.$"
BattleFrontier_ExchangeServiceCorner_Text_25FF5D: @ 825FF5D BattleFrontier_ExchangeServiceCorner_Text_WishIHadAllDolls: @ 825FF5D
.string "Oh, they're so nice!\n" .string "Oh, they're so nice!\n"
.string "I wish I had them!\l" .string "I wish I had them!\l"
.string "Cute cushions!\l" .string "Cute cushions!\l"
@@ -637,18 +637,18 @@ BattleFrontier_ExchangeServiceCorner_Text_25FF5D: @ 825FF5D
.string "Little plush DOLLS!\l" .string "Little plush DOLLS!\l"
.string "I wish I had them all!$" .string "I wish I had them all!$"
BattleFrontier_ExchangeServiceCorner_Text_25FFD0: @ 825FFD0 BattleFrontier_ExchangeServiceCorner_Text_GetYouAnythingYouWant: @ 825FFD0
.string "Leave it to your mommy!\p" .string "Leave it to your mommy!\p"
.string "If it's anything you want, I'll go\n" .string "If it's anything you want, I'll go\n"
.string "through anything to get it, honey!$" .string "through anything to get it, honey!$"
BattleFrontier_ExchangeServiceCorner_Text_26002E: @ 826002E BattleFrontier_ExchangeServiceCorner_Text_ItemsWillGetMonTougher: @ 826002E
.string "If I can get hold of the items here,\n" .string "If I can get hold of the items here,\n"
.string "my POKéMON will get tougher.\p" .string "my POKéMON will get tougher.\p"
.string "You bet they will!\n" .string "You bet they will!\n"
.string "No question about it!$" .string "No question about it!$"
BattleFrontier_ExchangeServiceCorner_Text_260099: @ 8260099 BattleFrontier_ExchangeServiceCorner_Text_GoGetYourOwnDoll: @ 8260099
.string "Hah?\n" .string "Hah?\n"
.string "What are you gawking at?\p" .string "What are you gawking at?\p"
.string "I don't like you staring at my plush\n" .string "I don't like you staring at my plush\n"
@@ -656,7 +656,7 @@ BattleFrontier_ExchangeServiceCorner_Text_260099: @ 8260099
.string "If you want it, go get one yourself!\n" .string "If you want it, go get one yourself!\n"
.string "Isn't that right, SMOOCHUM?$" .string "Isn't that right, SMOOCHUM?$"
BattleFrontier_ExchangeServiceCorner_Text_26012D: @ 826012D BattleFrontier_ExchangeServiceCorner_Text_MoreBattlePointsForRecord: @ 826012D
.string "Did you know?\p" .string "Did you know?\p"
.string "If you stretch your record at any of\n" .string "If you stretch your record at any of\n"
.string "the BATTLE facilities, they start\l" .string "the BATTLE facilities, they start\l"
@@ -90,11 +90,11 @@ BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment:: @ 8263811
BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield:: @ 826381B BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield:: @ 826381B
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
battletower_getstreak tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 50 compare VAR_RESULT, 50
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN
battletower_getstreak tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 50 compare VAR_RESULT, 50
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
goto BattleFrontier_ScottsHouse_EventScript_RandomComment goto BattleFrontier_ScottsHouse_EventScript_RandomComment
@@ -123,11 +123,11 @@ BattleFrontier_ScottsHouse_EventScript_GivenShield:: @ 82638AA
BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield:: @ 82638B4 BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield:: @ 82638B4
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
battletower_getstreak tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 100 compare VAR_RESULT, 100
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN
battletower_getstreak tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 100 compare VAR_RESULT, 100
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
goto BattleFrontier_ScottsHouse_EventScript_RandomComment goto BattleFrontier_ScottsHouse_EventScript_RandomComment
@@ -1 +1,2 @@
BattlePyramidSquare01_MapScripts:: @ 823D1A5 BattlePyramidSquare01_MapScripts:: @ 823D1A5
.byte 0
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_BOY_3", "graphics_id": "OBJ_EVENT_GFX_BOY_3",
@@ -1 +0,0 @@
BattlePyramidSquare02_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_BOY_1", "graphics_id": "OBJ_EVENT_GFX_BOY_1",
@@ -1 +0,0 @@
BattlePyramidSquare03_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2",
@@ -1 +0,0 @@
BattlePyramidSquare04_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_BOY_2", "graphics_id": "OBJ_EVENT_GFX_BOY_2",
@@ -1 +0,0 @@
BattlePyramidSquare05_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_GIRL_2", "graphics_id": "OBJ_EVENT_GFX_GIRL_2",
@@ -1 +0,0 @@
BattlePyramidSquare06_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_LITTLE_BOY", "graphics_id": "OBJ_EVENT_GFX_LITTLE_BOY",
@@ -1 +0,0 @@
BattlePyramidSquare07_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL", "graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL",
@@ -1 +0,0 @@
BattlePyramidSquare08_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL", "graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL",
@@ -1 +0,0 @@
BattlePyramidSquare09_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_GIRL_3", "graphics_id": "OBJ_EVENT_GFX_GIRL_3",
@@ -1 +0,0 @@
BattlePyramidSquare10_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_RICH_BOY", "graphics_id": "OBJ_EVENT_GFX_RICH_BOY",
@@ -1 +0,0 @@
BattlePyramidSquare11_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_WOMAN_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_1",
@@ -1 +0,0 @@
BattlePyramidSquare12_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_FAT_MAN", "graphics_id": "OBJ_EVENT_GFX_FAT_MAN",
@@ -1 +0,0 @@
BattlePyramidSquare13_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F",
@@ -1 +0,0 @@
BattlePyramidSquare14_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F",
@@ -1 +0,0 @@
BattlePyramidSquare15_MapScripts:: @ 823D1A5
+1
View File
@@ -13,6 +13,7 @@
"show_map_name": false, "show_map_name": false,
"battle_scene": "MAP_BATTLE_SCENE_GYM", "battle_scene": "MAP_BATTLE_SCENE_GYM",
"connections": null, "connections": null,
"shared_scripts_map": "BattlePyramidSquare01",
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F",
@@ -1,3 +0,0 @@
BattlePyramidSquare16_MapScripts:: @ 823D1A5
.byte 0
@@ -40,8 +40,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_2008E7:: @ 82008E7
goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_200B73 goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_200B73
FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 3 addobject 3
applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_200B96 applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_200B96
waitmovement 0 waitmovement 0
@@ -50,8 +49,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F
waitse waitse
waitmovement 0 waitmovement 0
msgbox BattleFrontier_BattleArenaBattleRoom_Text_SetKOTourneyBegin, MSGBOX_DEFAULT msgbox BattleFrontier_BattleArenaBattleRoom_Text_SetKOTourneyBegin, MSGBOX_DEFAULT
setvar VAR_0x8004, 4 battletent_getopponentintro
special CallVerdanturfTentFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
call BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle call BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle
@@ -61,8 +59,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F
playse SE_W173 playse SE_W173
waitse waitse
waitmovement 0 waitmovement 0
setvar VAR_0x8004, 6 fallarbortent_getopponentname
special CallFallarborTentFunction
msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT
FallarborTown_BattleTentBattleRoom_EventScript_20097E:: @ 820097E FallarborTown_BattleTentBattleRoom_EventScript_20097E:: @ 820097E
@@ -143,17 +140,11 @@ FallarborTown_BattleTentBattleRoom_EventScript_200AF3:: @ 8200AF3
special LoadPlayerParty special LoadPlayerParty
warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate waitstate
setvar VAR_0x8004, 1 arena_get ARENA_DATA_WIN_STREAK
setvar VAR_0x8005, 1
special CallBattleArenaFunction
compare VAR_RESULT, MAX_STREAK compare VAR_RESULT, MAX_STREAK
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2009B3 goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2009B3
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
setvar VAR_0x8004, 2 arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
special CallBattleArenaFunction
FallarborTown_BattleTentBattleRoom_EventScript_200B43:: @ 8200B43 FallarborTown_BattleTentBattleRoom_EventScript_200B43:: @ 8200B43
message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor2ndOpponent message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor2ndOpponent
waitmessage waitmessage
@@ -167,9 +158,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_200B4A:: @ 8200B4A
FallarborTown_BattleTentBattleRoom_EventScript_200B51:: @ 8200B51 FallarborTown_BattleTentBattleRoom_EventScript_200B51:: @ 8200B51
message BattleFrontier_BattleArenaBattleRoom_Text_SavingPleaseWait message BattleFrontier_BattleArenaBattleRoom_Text_SavingPleaseWait
waitmessage waitmessage
setvar VAR_0x8004, 3 fallarbortent_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallFallarborTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -39,19 +39,15 @@ FallarborTown_BattleTentLobby_EventScript_1FFEED:: @ 81FFEED
msgbox FallarborTown_BattleTentLobby_Text_2C4EC3, MSGBOX_DEFAULT msgbox FallarborTown_BattleTentLobby_Text_2C4EC3, MSGBOX_DEFAULT
message FallarborTown_BattleTentLobby_Text_2C4EFF message FallarborTown_BattleTentLobby_Text_2C4EFF
waitmessage waitmessage
setvar VAR_0x8004, 4 fallarbortent_setrandomprize
special CallFallarborTentFunction
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 3 fallarbortent_save 0
setvar VAR_0x8005, 0
special CallFallarborTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
FallarborTown_BattleTentLobby_EventScript_1FFF27:: @ 81FFF27 FallarborTown_BattleTentLobby_EventScript_1FFF27:: @ 81FFF27
msgbox FallarborTown_BattleTentLobby_Text_2C4F22, MSGBOX_DEFAULT msgbox FallarborTown_BattleTentLobby_Text_2C4F22, MSGBOX_DEFAULT
setvar VAR_0x8004, 5 fallarbortent_giveprize
special CallFallarborTentFunction
switch VAR_RESULT switch VAR_RESULT
case 0, FallarborTown_BattleTentLobby_EventScript_1FFF73 case 0, FallarborTown_BattleTentLobby_EventScript_1FFF73
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
@@ -84,9 +80,7 @@ FallarborTown_BattleTentLobby_EventScript_1FFF93:: @ 81FFF93
message FallarborTown_BattleTentLobby_Text_2C4FD7 message FallarborTown_BattleTentLobby_Text_2C4FD7
waitmessage waitmessage
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 3 fallarbortent_save 0
setvar VAR_0x8005, 0
special CallFallarborTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox FallarborTown_BattleTentLobby_Text_2C501F, MSGBOX_DEFAULT msgbox FallarborTown_BattleTentLobby_Text_2C501F, MSGBOX_DEFAULT
@@ -99,9 +93,7 @@ FallarborTown_BattleTentLobby_EventScript_1FFFCD:: @ 81FFFCD
lockall lockall
message FallarborTown_BattleTentLobby_Text_2C504C message FallarborTown_BattleTentLobby_Text_2C504C
waitmessage waitmessage
setvar VAR_0x8004, 3 fallarbortent_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallFallarborTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -111,8 +103,7 @@ FallarborTown_BattleTentLobby_EventScript_1FFFCD:: @ 81FFFCD
FallarborTown_BattleTentLobby_EventScript_200001:: @ 8200001 FallarborTown_BattleTentLobby_EventScript_200001:: @ 8200001
lock lock
faceplayer faceplayer
setvar VAR_0x8004, 1 fallarbortent_getprize
special CallFallarborTentFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne FallarborTown_BattleTentLobby_EventScript_1FFF84 goto_if_ne FallarborTown_BattleTentLobby_EventScript_1FFF84
special SavePlayerParty special SavePlayerParty
@@ -153,8 +144,7 @@ FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D
FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2 FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, 0 fallarbortent_init
special CallFallarborTentFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
+2 -2
View File
@@ -138,7 +138,7 @@ MauvilleCity_Gym_EventScript_CompletedNewMauville:: @ 820DFD4
MauvilleCity_Gym_EventScript_WattsonRematch:: @ 820DFDE MauvilleCity_Gym_EventScript_WattsonRematch:: @ 820DFDE
trainerbattle_rematch_double TRAINER_WATTSON_1, MauvilleCity_Gym_Text_WattsonPreRematch, MauvilleCity_Gym_Text_WattsonRematchDefeat, MauvilleCity_Gym_Text_WattsonRematchNeedTwoMons trainerbattle_rematch_double TRAINER_WATTSON_1, MauvilleCity_Gym_Text_WattsonPreRematch, MauvilleCity_Gym_Text_WattsonRematchDefeat, MauvilleCity_Gym_Text_WattsonRematchNeedTwoMons
msgbox MauvilleCity_Gym_Text_20EA5E, MSGBOX_AUTOCLOSE msgbox MauvilleCity_Gym_Text_WattsonPostRematch, MSGBOX_AUTOCLOSE
end end
MauvilleCity_Gym_EventScript_Switch1:: @ 820DFF9 MauvilleCity_Gym_EventScript_Switch1:: @ 820DFF9
@@ -410,7 +410,7 @@ MauvilleCity_Gym_Text_WattsonRematchDefeat: @ 820EA42
.string "Oof…\n" .string "Oof…\n"
.string "Our batteries ran dry…$" .string "Our batteries ran dry…$"
MauvilleCity_Gym_Text_20EA5E: @ 820EA5E MauvilleCity_Gym_Text_WattsonPostRematch: @ 820EA5E
.string "WATTSON: We'll have to recharge our\n" .string "WATTSON: We'll have to recharge our\n"
.string "batteries again.\p" .string "batteries again.\p"
.string "When we're fully charged up, we'll\n" .string "When we're fully charged up, we'll\n"
@@ -1,14 +1,14 @@
MossdeepCity_GameCorner_1F_MapScripts:: @ 8224B27 MossdeepCity_GameCorner_1F_MapScripts:: @ 8224B27
map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_GameCorner_1F_MapScript2_224B41 map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_GameCorner_1F_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, MossdeepCity_GameCorner_1F_MapScript2_224B37 map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, MossdeepCity_GameCorner_1F_OnWarp
map_script MAP_SCRIPT_ON_LOAD, CableClub_OnLoad map_script MAP_SCRIPT_ON_LOAD, CableClub_OnLoad
.byte 0 .byte 0
MossdeepCity_GameCorner_1F_MapScript2_224B37: @ 8224B37 MossdeepCity_GameCorner_1F_OnWarp: @ 8224B37
map_script_2 VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_CheckTurnAttendant map_script_2 VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_CheckTurnAttendant
.2byte 0 .2byte 0
MossdeepCity_GameCorner_1F_MapScript2_224B41: @ 8224B41 MossdeepCity_GameCorner_1F_OnFrame: @ 8224B41
map_script_2 VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_ExitMinigameRoom map_script_2 VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_ExitMinigameRoom
.2byte 0 .2byte 0
@@ -189,7 +189,8 @@ MossdeepCity_StevensHouse_Text_TakeBallContainingBeldum: @ 8222B9E
MossdeepCity_StevensHouse_Text_ObtainedBeldum: @ 8222BED MossdeepCity_StevensHouse_Text_ObtainedBeldum: @ 8222BED
.string "{PLAYER} obtained a BELDUM.$" .string "{PLAYER} obtained a BELDUM.$"
MossdeepCity_StevensHouse_Text_222C03: @ 8222C03 @ Unused
MossdeepCity_StevensHouse_Text_NoSpaceForAnotherMon: @ 8222C03
.string "There is no space for another POKéMON.$" .string "There is no space for another POKéMON.$"
MossdeepCity_StevensHouse_Text_LeftPokeBallWhereItWas: @ 8222C2A MossdeepCity_StevensHouse_Text_LeftPokeBallWhereItWas: @ 8222C2A
@@ -1,9 +1,9 @@
PetalburgCity_WallysHouse_MapScripts:: @ 8204229 PetalburgCity_WallysHouse_MapScripts:: @ 8204229
map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_MapScript2_OnFrame map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_MapScript2_OnWarp map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_OnWarp
.byte 0 .byte 0
PetalburgCity_WallysHouse_MapScript2_OnWarp: @ 8204234 PetalburgCity_WallysHouse_OnWarp: @ 8204234
map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_PlayerUncleFaceEachOther map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_PlayerUncleFaceEachOther
.2byte 0 .2byte 0
@@ -12,7 +12,7 @@ PetalburgCity_WallysHouse_EventScript_PlayerUncleFaceEachOther:: @ 820423E
turnobject 1, DIR_WEST turnobject 1, DIR_WEST
end end
PetalburgCity_WallysHouse_MapScript2_OnFrame: @ 8204247 PetalburgCity_WallysHouse_OnFrame: @ 8204247
map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_GiveHM03Surf map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_GiveHM03Surf
.2byte 0 .2byte 0
+1 -1
View File
@@ -24,7 +24,7 @@
"movement_range_y": 0, "movement_range_y": 0,
"trainer_type": "0", "trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0", "trainer_sight_or_berry_tree_id": "0",
"script": "RecordCorner_EventScript_2774C6", "script": "RecordCorner_EventScript_Attendant",
"flag": "0" "flag": "0"
} }
], ],
+1 -1
View File
@@ -24,7 +24,7 @@
"movement_range_y": 1, "movement_range_y": 1,
"trainer_type": "0", "trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0", "trainer_sight_or_berry_tree_id": "0",
"script": "SeafloorCavern_Entrance_EventScript_234485", "script": "SeafloorCavern_Entrance_EventScript_Grunt",
"flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ENTRANCE_AQUA_GRUNT" "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ENTRANCE_AQUA_GRUNT"
} }
], ],
+18 -18
View File
@@ -1,16 +1,16 @@
SeafloorCavern_Entrance_MapScripts:: @ 823446E SeafloorCavern_Entrance_MapScripts:: @ 823446E
map_script MAP_SCRIPT_ON_RESUME, SeafloorCavern_Entrance_MapScript1_234474 map_script MAP_SCRIPT_ON_RESUME, SeafloorCavern_Entrance_OnResume
.byte 0 .byte 0
SeafloorCavern_Entrance_MapScript1_234474: @ 8234474 SeafloorCavern_Entrance_OnResume: @ 8234474
setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5
setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5
end end
SeafloorCavern_Entrance_EventScript_234485:: @ 8234485 SeafloorCavern_Entrance_EventScript_Grunt:: @ 8234485
lockall lockall
compare VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 compare VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1
goto_if_eq SeafloorCavern_Entrance_EventScript_2344ED goto_if_eq SeafloorCavern_Entrance_EventScript_GruntSpeechShort
waitse waitse
playse SE_PIN playse SE_PIN
applymovement 1, Common_Movement_ExclamationMark applymovement 1, Common_Movement_ExclamationMark
@@ -19,51 +19,51 @@ SeafloorCavern_Entrance_EventScript_234485:: @ 8234485
waitmovement 0 waitmovement 0
delay 20 delay 20
compare VAR_FACING, DIR_WEST compare VAR_FACING, DIR_WEST
call_if_eq SeafloorCavern_Entrance_EventScript_23452E call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest
compare VAR_FACING, DIR_EAST compare VAR_FACING, DIR_EAST
call_if_eq SeafloorCavern_Entrance_EventScript_234523 call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast
compare VAR_FACING, DIR_NORTH compare VAR_FACING, DIR_NORTH
call_if_eq SeafloorCavern_Entrance_EventScript_234539 call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth
delay 30 delay 30
setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1
copyobjectxytoperm 1 copyobjectxytoperm 1
msgbox SeafloorCavern_Entrance_Text_234544, MSGBOX_DEFAULT msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeep, MSGBOX_DEFAULT
closemessage closemessage
applymovement 1, Common_Movement_WalkInPlaceFastestUp applymovement 1, Common_Movement_WalkInPlaceFastestUp
waitmovement 0 waitmovement 0
releaseall releaseall
end end
SeafloorCavern_Entrance_EventScript_2344ED:: @ 82344ED SeafloorCavern_Entrance_EventScript_GruntSpeechShort:: @ 82344ED
compare VAR_FACING, DIR_WEST compare VAR_FACING, DIR_WEST
call_if_eq SeafloorCavern_Entrance_EventScript_23452E call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest
compare VAR_FACING, DIR_EAST compare VAR_FACING, DIR_EAST
call_if_eq SeafloorCavern_Entrance_EventScript_234523 call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast
compare VAR_FACING, DIR_NORTH compare VAR_FACING, DIR_NORTH
call_if_eq SeafloorCavern_Entrance_EventScript_234539 call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth
msgbox SeafloorCavern_Entrance_Text_2346C8, MSGBOX_DEFAULT msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort, MSGBOX_DEFAULT
closemessage closemessage
applymovement 1, Common_Movement_WalkInPlaceFastestUp applymovement 1, Common_Movement_WalkInPlaceFastestUp
waitmovement 0 waitmovement 0
releaseall releaseall
end end
SeafloorCavern_Entrance_EventScript_234523:: @ 8234523 SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast:: @ 8234523
applymovement 1, Common_Movement_WalkInPlaceFastestLeft applymovement 1, Common_Movement_WalkInPlaceFastestLeft
waitmovement 0 waitmovement 0
return return
SeafloorCavern_Entrance_EventScript_23452E:: @ 823452E SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest:: @ 823452E
applymovement 1, Common_Movement_WalkInPlaceFastestRight applymovement 1, Common_Movement_WalkInPlaceFastestRight
waitmovement 0 waitmovement 0
return return
SeafloorCavern_Entrance_EventScript_234539:: @ 8234539 SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth:: @ 8234539
applymovement 1, Common_Movement_WalkInPlaceFastestDown applymovement 1, Common_Movement_WalkInPlaceFastestDown
waitmovement 0 waitmovement 0
return return
SeafloorCavern_Entrance_Text_234544: @ 8234544 SeafloorCavern_Entrance_Text_HearMagmaNearMossdeep: @ 8234544
.string "Hey!\n" .string "Hey!\n"
.string "I remember your face!\p" .string "I remember your face!\p"
.string "If you're here, it must mean that\n" .string "If you're here, it must mean that\n"
@@ -79,7 +79,7 @@ SeafloorCavern_Entrance_Text_234544: @ 8234544
.string "That bunch of goons, they sure don't\n" .string "That bunch of goons, they sure don't\n"
.string "look good near the sea!$" .string "look good near the sea!$"
SeafloorCavern_Entrance_Text_2346C8: @ 82346C8 SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort: @ 82346C8
.string "A punk like you, do you really think\n" .string "A punk like you, do you really think\n"
.string "you can take on TEAM AQUA?\p" .string "you can take on TEAM AQUA?\p"
.string "I'd say you're too early by about\n" .string "I'd say you're too early by about\n"
@@ -41,15 +41,13 @@ SlateportCity_BattleTentBattleRoom_MapScript2_2099B4: @ 82099B4
SlateportCity_BattleTentBattleRoom_EventScript_2099BE:: @ 82099BE SlateportCity_BattleTentBattleRoom_EventScript_2099BE:: @ 82099BE
applymovement 3, SlateportCity_BattleTentBattleRoom_Movement_209A99 applymovement 3, SlateportCity_BattleTentBattleRoom_Movement_209A99
waitmovement 0 waitmovement 0
setvar VAR_0x8004, 11 factory_setopponentgfx
special CallBattleFactoryFunction
setobjectxyperm 2, 5, 1 setobjectxyperm 2, 5, 1
removeobject 2 removeobject 2
addobject 2 addobject 2
applymovement 2, SlateportCity_BattleTentBattleRoom_Movement_209A9E applymovement 2, SlateportCity_BattleTentBattleRoom_Movement_209A9E
waitmovement 0 waitmovement 0
setvar VAR_0x8004, 4 battletent_getopponentintro
special CallVerdanturfTentFunction
lockall lockall
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
@@ -31,14 +31,11 @@ SlateportCity_BattleTentCorridor_EventScript_208E65:: @ 8208E65
waitmovement 0 waitmovement 0
compare VAR_0x8006, 2 compare VAR_0x8006, 2
goto_if_eq SlateportCity_BattleTentCorridor_EventScript_209044 goto_if_eq SlateportCity_BattleTentCorridor_EventScript_209044
setvar VAR_0x8004, 9 slateporttent_generaterentalmons
special CallSlateportTentFunction slateporttent_generateopponentmons
setvar VAR_0x8004, 8
special CallSlateportTentFunction
msgbox SlateportCity_BattleTentCorridor_Text_25A1C8, MSGBOX_DEFAULT msgbox SlateportCity_BattleTentCorridor_Text_25A1C8, MSGBOX_DEFAULT
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 6 slateporttent_rentmons
special CallSlateportTentFunction
waitstate waitstate
SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4
msgbox SlateportCity_BattleTentCorridor_Text_25AB96, MSGBOX_DEFAULT msgbox SlateportCity_BattleTentCorridor_Text_25AB96, MSGBOX_DEFAULT
@@ -57,10 +54,8 @@ SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4
end end
SlateportCity_BattleTentCorridor_EventScript_208EEE:: @ 8208EEE SlateportCity_BattleTentCorridor_EventScript_208EEE:: @ 8208EEE
setvar VAR_0x8004, 9 factory_setopponentmons
special CallBattleFactoryFunction factory_resethelditems
setvar VAR_0x8004, 16
special CallBattleFactoryFunction
msgbox SlateportCity_BattleTentCorridor_Text_25A22D, MSGBOX_DEFAULT msgbox SlateportCity_BattleTentCorridor_Text_25A22D, MSGBOX_DEFAULT
playfanfare MUS_ME_ASA playfanfare MUS_ME_ASA
waitfanfare waitfanfare
@@ -94,8 +89,7 @@ SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89
case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D
SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB
setvar VAR_0x8004, 8 slateporttent_generateopponentmons
special CallSlateportTentFunction
msgbox SlateportCity_BattleTentCorridor_Text_25AB2E, MSGBOX_YESNO msgbox SlateportCity_BattleTentCorridor_Text_25AB2E, MSGBOX_YESNO
switch VAR_RESULT switch VAR_RESULT
case NO, SlateportCity_BattleTentCorridor_EventScript_208EB4 case NO, SlateportCity_BattleTentCorridor_EventScript_208EB4
@@ -104,8 +98,7 @@ SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB
SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1 SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1
fadescreen 1 fadescreen 1
setvar VAR_0x8004, 7 slateporttent_swapmons
special CallSlateportTentFunction
waitstate waitstate
compare VAR_RESULT, 1 compare VAR_RESULT, 1
goto_if_eq SlateportCity_BattleTentCorridor_EventScript_208EB4 goto_if_eq SlateportCity_BattleTentCorridor_EventScript_208EB4
@@ -125,9 +118,7 @@ SlateportCity_BattleTentCorridor_EventScript_20901B:: @ 820901B
SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022 SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022
message SlateportCity_BattleTentCorridor_Text_25ABAE message SlateportCity_BattleTentCorridor_Text_25ABAE
waitmessage waitmessage
setvar VAR_0x8004, 3 slateporttent_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallSlateportTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -136,9 +127,7 @@ SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022
SlateportCity_BattleTentCorridor_EventScript_209044:: @ 8209044 SlateportCity_BattleTentCorridor_EventScript_209044:: @ 8209044
special SavePlayerParty special SavePlayerParty
setvar VAR_0x8004, 10 factory_setparties 0
setvar VAR_0x8005, 0
special CallBattleFactoryFunction
goto SlateportCity_BattleTentCorridor_EventScript_208F0D goto SlateportCity_BattleTentCorridor_EventScript_208F0D
SlateportCity_BattleTentCorridor_Movement_209059: @ 8209059 SlateportCity_BattleTentCorridor_Movement_209059: @ 8209059
@@ -38,18 +38,14 @@ SlateportCity_BattleTentLobby_EventScript_2087B7:: @ 82087B7
lockall lockall
message SlateportCity_BattleTentLobby_Text_2C5C6F message SlateportCity_BattleTentLobby_Text_2C5C6F
waitmessage waitmessage
setvar VAR_0x8004, 4 slateporttent_setrandomprize
special CallSlateportTentFunction
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 3 slateporttent_save 0
setvar VAR_0x8005, 0
special CallSlateportTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
SlateportCity_BattleTentLobby_EventScript_2087E9:: @ 82087E9 SlateportCity_BattleTentLobby_EventScript_2087E9:: @ 82087E9
msgbox SlateportCity_BattleTentLobby_Text_2C5D14, MSGBOX_DEFAULT msgbox SlateportCity_BattleTentLobby_Text_2C5D14, MSGBOX_DEFAULT
setvar VAR_0x8004, 5 slateporttent_giveprize
special CallSlateportTentFunction
switch VAR_RESULT switch VAR_RESULT
case 0, SlateportCity_BattleTentLobby_EventScript_20882A case 0, SlateportCity_BattleTentLobby_EventScript_20882A
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
@@ -68,9 +64,7 @@ SlateportCity_BattleTentLobby_EventScript_208837:: @ 8208837
message SlateportCity_BattleTentLobby_Text_2C5BA2 message SlateportCity_BattleTentLobby_Text_2C5BA2
waitmessage waitmessage
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 3 slateporttent_save 0
setvar VAR_0x8005, 0
special CallSlateportTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
@@ -85,9 +79,7 @@ SlateportCity_BattleTentLobby_EventScript_208871:: @ 8208871
lockall lockall
message SlateportCity_BattleTentLobby_Text_2C5DA7 message SlateportCity_BattleTentLobby_Text_2C5DA7
waitmessage waitmessage
setvar VAR_0x8004, 3 slateporttent_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallSlateportTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -98,13 +90,11 @@ SlateportCity_BattleTentLobby_EventScript_208871:: @ 8208871
SlateportCity_BattleTentLobby_EventScript_2088AA:: @ 82088AA SlateportCity_BattleTentLobby_EventScript_2088AA:: @ 82088AA
lock lock
faceplayer faceplayer
setvar VAR_0x8004, 1 slateporttent_getprize
special CallSlateportTentFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne SlateportCity_BattleTentLobby_EventScript_2087E9 goto_if_ne SlateportCity_BattleTentLobby_EventScript_2087E9
special SavePlayerParty special SavePlayerParty
msgbox SlateportCity_BattleTentLobby_Text_2C5810, MSGBOX_DEFAULT msgbox SlateportCity_BattleTentLobby_Text_2C5810, MSGBOX_DEFAULT
SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA
message SlateportCity_BattleTentLobby_Text_2C586A message SlateportCity_BattleTentLobby_Text_2C586A
waitmessage waitmessage
@@ -128,8 +118,7 @@ SlateportCity_BattleTentLobby_EventScript_208906:: @ 8208906
SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950 SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, 0 slateporttent_init
special CallSlateportTentFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
closemessage closemessage
@@ -39,13 +39,11 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202348:: @ 8202348
goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_20243C goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_20243C
VerdanturfTown_BattleTentBattleRoom_EventScript_20236F:: @ 820236F VerdanturfTown_BattleTentBattleRoom_EventScript_20236F:: @ 820236F
setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER tower_setopponent
special CallBattleTowerFunc
addobject 2 addobject 2
applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_20257B applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_20257B
waitmovement 0 waitmovement 0
setvar VAR_0x8004, 4 battletent_getopponentintro
special CallVerdanturfTentFunction
msgbox gStringVar4, MSGBOX_DEFAULT msgbox gStringVar4, MSGBOX_DEFAULT
waitmessage waitmessage
call VerdanturfTown_BattleTentBattleRoom_EventScript_24FDF7 call VerdanturfTown_BattleTentBattleRoom_EventScript_24FDF7
@@ -122,9 +120,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202501:: @ 8202501
VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F
message VerdanturfTown_BattleTentBattleRoom_Text_25007E message VerdanturfTown_BattleTentBattleRoom_Text_25007E
waitmessage waitmessage
setvar VAR_0x8004, 5 verdanturftent_save CHALLENGE_STATUS_PAUSED
setvar VAR_0x8005, 2
special CallVerdanturfTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
fadescreen 1 fadescreen 1
@@ -39,19 +39,15 @@ VerdanturfTown_BattleTentLobby_EventScript_201757:: @ 8201757
msgbox VerdanturfTown_BattleTentLobby_Text_2C5731, MSGBOX_DEFAULT msgbox VerdanturfTown_BattleTentLobby_Text_2C5731, MSGBOX_DEFAULT
message VerdanturfTown_BattleTentLobby_Text_2C5791 message VerdanturfTown_BattleTentLobby_Text_2C5791
waitmessage waitmessage
setvar VAR_0x8004, 6 verdanturftent_setrandomprize
special CallVerdanturfTentFunction
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 5 verdanturftent_save 0
setvar VAR_0x8005, 0
special CallVerdanturfTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
VerdanturfTown_BattleTentLobby_EventScript_201791:: @ 8201791 VerdanturfTown_BattleTentLobby_EventScript_201791:: @ 8201791
msgbox VerdanturfTown_BattleTentLobby_Text_2C57CD, MSGBOX_DEFAULT msgbox VerdanturfTown_BattleTentLobby_Text_2C57CD, MSGBOX_DEFAULT
setvar VAR_0x8004, 7 verdanturftent_giveprize
special CallVerdanturfTentFunction
switch VAR_RESULT switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_2017DD case 0, VerdanturfTown_BattleTentLobby_EventScript_2017DD
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
@@ -84,9 +80,7 @@ VerdanturfTown_BattleTentLobby_EventScript_2017FD:: @ 82017FD
message VerdanturfTown_BattleTentLobby_Text_2C56B8 message VerdanturfTown_BattleTentLobby_Text_2C56B8
waitmessage waitmessage
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
setvar VAR_0x8004, 5 verdanturftent_save 0
setvar VAR_0x8005, 0
special CallVerdanturfTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, MSGBOX_DEFAULT msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, MSGBOX_DEFAULT
@@ -100,9 +94,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201837:: @ 8201837
msgbox VerdanturfTown_BattleTentLobby_Text_24E5D8, MSGBOX_DEFAULT msgbox VerdanturfTown_BattleTentLobby_Text_24E5D8, MSGBOX_DEFAULT
message VerdanturfTown_BattleTentLobby_Text_24E5F6 message VerdanturfTown_BattleTentLobby_Text_24E5F6
waitmessage waitmessage
setvar VAR_0x8004, 5 verdanturftent_save CHALLENGE_STATUS_SAVING
setvar VAR_0x8005, 1
special CallVerdanturfTentFunction
playse SE_SAVE playse SE_SAVE
waitse waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -112,8 +104,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201837:: @ 8201837
VerdanturfTown_BattleTentLobby_EventScript_201873:: @ 8201873 VerdanturfTown_BattleTentLobby_EventScript_201873:: @ 8201873
lock lock
faceplayer faceplayer
setvar VAR_0x8004, 1 verdanturftent_getprize
special CallVerdanturfTentFunction
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_2017EE goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_2017EE
special SavePlayerParty special SavePlayerParty
@@ -154,8 +145,7 @@ VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF
VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954 VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954
setvar VAR_TEMP_0, 0 setvar VAR_TEMP_0, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_0x8004, 0 verdanturftent_init
special CallVerdanturfTentFunction
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
frontier_set FRONTIER_DATA_PAUSED, FALSE frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty special LoadPlayerParty
+18 -19
View File
@@ -3,8 +3,8 @@ BattleFrontier_BattlePikeRoomNormal_MapScripts_2C3E1B: @ 82C3E1B
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoom_OnWarp map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoom_OnWarp
BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25 BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25
battlepike_setroomobjects pike_setroomobjects
battlepike_getroomtype pike_getroomtype
switch VAR_RESULT switch VAR_RESULT
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1 case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1 case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1
@@ -48,7 +48,7 @@ BattleFrontier_BattlePikeRoom_OnWarp: @ 82C3EDE
BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: @ 82C3EE8 BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: @ 82C3EE8
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LINK_RECEPTIONIST setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LINK_RECEPTIONIST
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_LINK_RECEPTIONIST setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_LINK_RECEPTIONIST
battlepike_getroomtype pike_getroomtype
compare VAR_RESULT, PIKE_ROOM_STATUS compare VAR_RESULT, PIKE_ROOM_STATUS
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35 goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35
compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE
@@ -89,14 +89,14 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_RightRoomWarp:: @ 82C3F64
end end
BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp:: @ 82C3F6F BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp:: @ 82C3F6F
battlepike_getstreak pike_get PIKE_DATA_WIN_STREAK
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
battlepike_setnextroom pike_setnextroom
battlepike_getroomtype pike_getroomtype
switch VAR_RESULT switch VAR_RESULT
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
@@ -152,18 +152,18 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D:: @ 82C408D
end end
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: @ 82C40A2 BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: @ 82C40A2
battlepike_ispartyfullhealth pike_ispartyfullhealth
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
battlepike_getstreak pike_get PIKE_DATA_WIN_STREAK
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
battlepike_isfinalroom pike_isfinalroom
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
@@ -172,11 +172,11 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: @ 82C40A2
end end
BattleFrontier_BattlePikeRoom_EventScript_DisableHealing:: @ 82C4128 BattleFrontier_BattlePikeRoom_EventScript_DisableHealing:: @ 82C4128
battlepike_nohealing TRUE pike_nohealing TRUE
return return
BattleFrontier_BattlePikeRoom_EventScript_EnableHealing:: @ 82C4136 BattleFrontier_BattlePikeRoom_EventScript_EnableHealing:: @ 82C4136
battlepike_nohealing FALSE pike_nohealing FALSE
return return
BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: @ 82C4144 BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: @ 82C4144
@@ -194,20 +194,19 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: @ 82C415C
return return
BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174:: @ 82C4174 BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174:: @ 82C4174
setvar VAR_0x8004, BATTLE_PIKE_FUNC_7 pike_exitwildmonroom
special CallBattlePikeFunction pike_ispartyfullhealth
battlepike_ispartyfullhealth
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
battlepike_getstreak pike_get PIKE_DATA_WIN_STREAK
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
frontier_get FRONTIER_DATA_BATTLE_NUM frontier_get FRONTIER_DATA_BATTLE_NUM
addvar VAR_RESULT, 1 addvar VAR_RESULT, 1
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
battlepike_isfinalroom pike_isfinalroom
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
+14 -13
View File
@@ -49,7 +49,7 @@ CableClub_EventScript_DistributeEonTicket:: @ 8276B23
end end
@ Unused? @ Unused?
OldaleTown_PokemonCenter_2F_EventScript_276B62:: @ 8276B62 CableClub_EventScript_MysteryGiftThankYou2:: @ 8276B62
msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_DEFAULT msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_DEFAULT
release release
end end
@@ -301,7 +301,7 @@ CableClub_EventScript_Colosseum:: @ 8276EB7
end end
CableClub_EventScript_SelectBattleMode:: @ 8276EC2 CableClub_EventScript_SelectBattleMode:: @ 8276EC2
message CableClub_Text_WhichBattleMode message CableClub_Text_PlayWhichBattleMode
waitmessage waitmessage
multichoice 0, 0, MULTI_BATTLE_MODE, 0 multichoice 0, 0, MULTI_BATTLE_MODE, 0
switch VAR_RESULT switch VAR_RESULT
@@ -795,39 +795,40 @@ EventScript_TradeCenter_Chair3:: @ 8277413
waitstate waitstate
end end
@ VAR_TEMP_1 for below scripts set by ReceiveGiftItem
EventScript_RecordCenter_Spot0:: @ 827741D EventScript_RecordCenter_Spot0:: @ 827741D
setvar VAR_0x8005, 0 setvar VAR_0x8005, 0
special RecordMixingPlayerSpotTriggered special RecordMixingPlayerSpotTriggered
waitstate waitstate
compare VAR_TEMP_1, 0 compare VAR_TEMP_1, ITEM_NONE
goto_if_ne RecordCorner_EventScript_277471 goto_if_ne RecordCorner_EventScript_ReceivedGiftItem
end end
EventScript_RecordCenter_Spot1:: @ 8277432 EventScript_RecordCenter_Spot1:: @ 8277432
setvar VAR_0x8005, 1 setvar VAR_0x8005, 1
special RecordMixingPlayerSpotTriggered special RecordMixingPlayerSpotTriggered
waitstate waitstate
compare VAR_TEMP_1, 0 compare VAR_TEMP_1, ITEM_NONE
goto_if_ne RecordCorner_EventScript_277471 goto_if_ne RecordCorner_EventScript_ReceivedGiftItem
end end
EventScript_RecordCenter_Spot2:: @ 8277447 EventScript_RecordCenter_Spot2:: @ 8277447
setvar VAR_0x8005, 2 setvar VAR_0x8005, 2
special RecordMixingPlayerSpotTriggered special RecordMixingPlayerSpotTriggered
waitstate waitstate
compare VAR_TEMP_1, 0 compare VAR_TEMP_1, ITEM_NONE
goto_if_ne RecordCorner_EventScript_277471 goto_if_ne RecordCorner_EventScript_ReceivedGiftItem
end end
EventScript_RecordCenter_Spot3:: @ 827745C EventScript_RecordCenter_Spot3:: @ 827745C
setvar VAR_0x8005, 3 setvar VAR_0x8005, 3
special RecordMixingPlayerSpotTriggered special RecordMixingPlayerSpotTriggered
waitstate waitstate
compare VAR_TEMP_1, 0 compare VAR_TEMP_1, ITEM_NONE
goto_if_ne RecordCorner_EventScript_277471 goto_if_ne RecordCorner_EventScript_ReceivedGiftItem
end end
RecordCorner_EventScript_277471:: @ 8277471 RecordCorner_EventScript_ReceivedGiftItem:: @ 8277471
bufferitemname 1, VAR_TEMP_1 bufferitemname 1, VAR_TEMP_1
message RecordCorner_Text_PlayerSentOverOneX message RecordCorner_Text_PlayerSentOverOneX
waitmessage waitmessage
@@ -868,7 +869,7 @@ TradeCenter_EventScript_Attendant:: @ 82774B6
closemessage closemessage
end end
RecordCorner_EventScript_2774C6:: @ 82774C6 RecordCorner_EventScript_Attendant:: @ 82774C6
compare VAR_TEMP_0, 0 compare VAR_TEMP_0, 0
goto_if_ne RecordCorner_EventScript_AlreadyMixed goto_if_ne RecordCorner_EventScript_AlreadyMixed
special Script_FacePlayer special Script_FacePlayer
@@ -1090,7 +1091,7 @@ CableClub_EventScript_WirelessTrade:: @ 827780D
end end
CableClub_EventScript_WirelessBattleSelect:: @ 827783B CableClub_EventScript_WirelessBattleSelect:: @ 827783B
message CableClub_Text_WhichBattleMode message CableClub_Text_PlayWhichBattleMode
waitmessage waitmessage
multichoice 0, 0, MULTI_BATTLE_MODE, 0 multichoice 0, 0, MULTI_BATTLE_MODE, 0
switch VAR_RESULT switch VAR_RESULT
+2 -2
View File
@@ -262,7 +262,7 @@ Route117_PokemonDayCare_Movement_RetrieveDaycareMon: @ 8291F47
step_end step_end
@ Unused. Possibly a commented script, or a typo end added to the above Movement script @ Unused. Possibly a commented script, or a typo end added to the above Movement script
Route117_PokemonDayCare_EventScript_291F5B:: @ 8291F5B Route117_PokemonDayCare_EventScript_UnusedEnd:: @ 8291F5B
end end
Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: @ 8291F5C Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: @ 8291F5C
@@ -279,7 +279,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: @ 8291F5C
end end
@ Unused @ Unused
Route117_PokemonDayCare_EventScript_291F95:: @ 8291F95 Route117_PokemonDayCare_EventScript_UnusedRetrieveMon:: @ 8291F95
special ShowDaycareLevelMenu special ShowDaycareLevelMenu
waitstate waitstate
compare VAR_RESULT, 2 compare VAR_RESULT, 2
+5 -7
View File
@@ -29,15 +29,13 @@ EventScript_FrontierFieldWhiteOut:: @ 82736F8
message gText_PlayerWhitedOut message gText_PlayerWhitedOut
waitmessage waitmessage
waitbuttonpress waitbuttonpress
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_IN pike_inchallenge
special CallBattlePikeFunction compare VAR_RESULT, TRUE
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePike_EventScript_Retire goto_if_eq BattleFrontier_BattlePike_EventScript_Retire
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN pyramid_inchallenge
special CallBattlePyramidFunction compare VAR_RESULT, 1 @ On Pyramid floor
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 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 goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42
trainerhill_inchallenge trainerhill_inchallenge
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
+2 -1
View File
@@ -289,7 +289,8 @@ MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales: @ 828E7EE
.string "Then tell me, have you any tales that\n" .string "Then tell me, have you any tales that\n"
.string "are even remotely legendary?$" .string "are even remotely legendary?$"
MauvilleCity_PokemonCenter_1F_Text_28E844: @ 828E844 @ Unused
MauvilleCity_PokemonCenter_1F_Text_HearAnotherLegendaryTale: @ 828E844
.string "Incidentally… Would you care to hear\n" .string "Incidentally… Would you care to hear\n"
.string "another legendary tale?$" .string "another legendary tale?$"
+1 -2
View File
@@ -128,8 +128,7 @@ EventScript_PickUpItem:: @ 8271C3A
waitfanfare waitfanfare
waitmessage waitmessage
bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN pyramid_inchallenge
special CallBattlePyramidFunction
compare VAR_RESULT, 1 compare VAR_RESULT, 1
goto_if_eq EventScript_PutBattlePyramidItemInBag goto_if_eq EventScript_PutBattlePyramidItemInBag
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
+5 -3
View File
@@ -201,14 +201,16 @@ CableClub_Text_CanMixRecords:: @ 8278831
.string "The records of two to four players\n" .string "The records of two to four players\n"
.string "can be mixed together.$" .string "can be mixed together.$"
OldaleTown_PokemonCenter_2F_Text_27886B: @ 827886B @ Unused
CableClub_Text_GuideToVariousServices: @ 827886B
.string "A guide to the WIRELESS CLUB's\n" .string "A guide to the WIRELESS CLUB's\n"
.string "various services.$" .string "various services.$"
CableClub_Text_CancelSelectedItem:: @ 827889C CableClub_Text_CancelSelectedItem:: @ 827889C
.string "Cancels the selected MENU item.$" .string "Cancels the selected MENU item.$"
OldaleTown_PokemonCenter_2F_Text_2788BC: @ 82788BC @ Unused
CableClub_Text_WhichBattleMode: @ 82788BC
.string "Which battle mode would you like?$" .string "Which battle mode would you like?$"
@ Unused @ Unused
@@ -340,7 +342,7 @@ CableClub_Text_WelcomeWhichDirectCornerRoom: @ 8279013
CableClub_Text_TradePokemon: @ 827909D CableClub_Text_TradePokemon: @ 827909D
.string "Would you like to trade POKéMON?$" .string "Would you like to trade POKéMON?$"
CableClub_Text_WhichBattleMode: @ 82790BE CableClub_Text_PlayWhichBattleMode: @ 82790BE
.string "Which Battle Mode would you like\n" .string "Which Battle Mode would you like\n"
.string "to play?$" .string "to play?$"
+3 -3
View File
@@ -5,11 +5,11 @@
#define BATTLE_ARENA_FUNC_GET_DATA 1 #define BATTLE_ARENA_FUNC_GET_DATA 1
#define BATTLE_ARENA_FUNC_SET_DATA 2 #define BATTLE_ARENA_FUNC_SET_DATA 2
#define BATTLE_ARENA_FUNC_SAVE 3 #define BATTLE_ARENA_FUNC_SAVE 3
#define BATTLE_ARENA_FUNC_SET_REWARD 4 #define BATTLE_ARENA_FUNC_SET_PRIZE 4
#define BATTLE_ARENA_FUNC_GIVE_REWARD 5 #define BATTLE_ARENA_FUNC_GIVE_PRIZE 5
#define BATTLE_ARENA_FUNC_GET_TRAINER_NAME 6 #define BATTLE_ARENA_FUNC_GET_TRAINER_NAME 6
#define ARENA_DATA_REWARD 0 #define ARENA_DATA_PRIZE 0
#define ARENA_DATA_WIN_STREAK 1 #define ARENA_DATA_WIN_STREAK 1
#define ARENA_DATA_WIN_STREAK_ACTIVE 2 #define ARENA_DATA_WIN_STREAK_ACTIVE 2
+45
View File
@@ -0,0 +1,45 @@
#ifndef GUARD_CONSTANTS_BATTLE_DOME_H
#define GUARD_CONSTANTS_BATTLE_DOME_H
#define BATTLE_DOME_FUNC_INIT 0
#define BATTLE_DOME_FUNC_GET_DATA 1
#define BATTLE_DOME_FUNC_SET_DATA 2
#define BATTLE_DOME_FUNC_GET_ROUND_TEXT 3
#define BATTLE_DOME_FUNC_GET_OPPONENT_NAME 4
#define BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY 5
#define BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO 6
#define BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE 7
#define BATTLE_DOME_FUNC_SHOW_PREV_RESULTS_TREE 8
#define BATTLE_DOME_FUNC_SET_OPPONENT_ID 9
#define BATTLE_DOME_FUNC_SET_OPPONENT_GFX 10
#define BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE 11
#define BATTLE_DOME_FUNC_RESOLVE_WINNERS 12
#define BATTLE_DOME_FUNC_SAVE 13
#define BATTLE_DOME_FUNC_INCREMENT_STREAK 14
#define BATTLE_DOME_FUNC_SET_TRAINERS 15
#define BATTLE_DOME_FUNC_RESET_SKETCH 16
#define BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS 17
#define BATTLE_DOME_FUNC_REDUCE_PARTY 18
#define BATTLE_DOME_FUNC_COMPARE_SEEDS 19
#define BATTLE_DOME_FUNC_GET_WINNER_NAME 20
#define BATTLE_DOME_FUNC_21 21
#define BATTLE_DOME_FUNC_INIT_TRAINERS 22
#define DOME_DATA_WIN_STREAK 0
#define DOME_DATA_WIN_STREAK_ACTIVE 1
#define DOME_DATA_2 2
#define DOME_DATA_3 3
#define DOME_DATA_4 4
#define DOME_DATA_5 5
#define DOME_DATA_6 6
#define DOME_DATA_7 7
#define DOME_DATA_8 8
#define DOME_DATA_9 9
#define DOME_ROUND1 0
#define DOME_ROUND2 1
#define DOME_SEMIFINAL 2
#define DOME_FINAL 3
#define DOME_ROUNDS_COUNT 4
#endif //GUARD_CONSTANTS_BATTLE_DOME_H
+37
View File
@@ -0,0 +1,37 @@
#ifndef GUARD_CONSTANTS_BATTLE_FACTORY_H
#define GUARD_CONSTANTS_BATTLE_FACTORY_H
#define FACTORY_STYLE_NONE 0
#define FACTORY_STYLE_PREPARATION 1
#define FACTORY_STYLE_SLOW_STEADY 2
#define FACTORY_STYLE_ENDURANCE 3
#define FACTORY_STYLE_HIGH_RISK 4
#define FACTORY_STYLE_WEAKENING 5
#define FACTORY_STYLE_UNPREDICTABLE 6
#define FACTORY_STYLE_WEATHER 7
#define FACTORY_NUM_STYLES 8
#define BATTLE_FACTORY_FUNC_INIT 0
#define BATTLE_FACTORY_FUNC_GET_DATA 1
#define BATTLE_FACTORY_FUNC_SET_DATA 2
#define BATTLE_FACTORY_FUNC_SAVE 3
#define BATTLE_FACTORY_FUNC_NULL 4
#define BATTLE_FACTORY_FUNC_NULL2 5
#define BATTLE_FACTORY_FUNC_SELECT_RENT_MONS 6
#define BATTLE_FACTORY_FUNC_SWAP_RENT_MONS 7
#define BATTLE_FACTORY_FUNC_SET_SWAPPED 8
#define BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS 9
#define BATTLE_FACTORY_FUNC_SET_PARTIES 10
#define BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX 11
#define BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS 12
#define BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS 13
#define BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE 14
#define BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE 15
#define BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS 16
#define FACTORY_DATA_WIN_STREAK 1
#define FACTORY_DATA_WIN_STREAK_ACTIVE 2
#define FACTORY_DATA_WIN_STREAK_SWAPS 3
#endif // GUARD_CONSTANTS_BATTLE_FACTORY_H
+14 -10
View File
@@ -1,15 +1,19 @@
#ifndef GUARD_CONSTANTS_BATTLE_PALACE_H #ifndef GUARD_CONSTANTS_BATTLE_PALACE_H
#define GUARD_CONSTANTS_BATTLE_PALACE_H #define GUARD_CONSTANTS_BATTLE_PALACE_H
#define BATTLE_PALACE_FUNC_0 0 #define BATTLE_PALACE_FUNC_INIT 0
#define BATTLE_PALACE_FUNC_1 1 #define BATTLE_PALACE_FUNC_GET_DATA 1
#define BATTLE_PALACE_FUNC_2 2 #define BATTLE_PALACE_FUNC_SET_DATA 2
#define BATTLE_PALACE_FUNC_3 3 #define BATTLE_PALACE_FUNC_GET_COMMENT_ID 3
#define BATTLE_PALACE_FUNC_4 4 #define BATTLE_PALACE_FUNC_SET_OPPONENT 4
#define BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO 5 #define BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO 5
#define BATTLE_PALACE_FUNC_6 6 #define BATTLE_PALACE_FUNC_INCREMENT_STREAK 6
#define BATTLE_PALACE_FUNC_7 7 #define BATTLE_PALACE_FUNC_SAVE 7
#define BATTLE_PALACE_FUNC_8 8 #define BATTLE_PALACE_FUNC_SET_PRIZE 8
#define BATTLE_PALACE_FUNC_9 9 #define BATTLE_PALACE_FUNC_GIVE_PRIZE 9
#define PALACE_DATA_PRIZE 0
#define PALACE_DATA_WIN_STREAK 1
#define PALACE_DATA_WIN_STREAK_ACTIVE 2
#endif //GUARD_CONSTANTS_BATTLE_PALACE_H #endif //GUARD_CONSTANTS_BATTLE_PALACE_H
+42 -30
View File
@@ -23,38 +23,50 @@
#define PIKE_HINT_BRAIN 4 #define PIKE_HINT_BRAIN 4
// For the room with a status effect. // For the room with a status effect.
#define PIKE_STATUS_KIRLIA 0 #define PIKE_STATUS_KIRLIA 0
#define PIKE_STATUS_DUSCLOPS 1 #define PIKE_STATUS_DUSCLOPS 1
#define PIKE_STATUS_FREEZE 0
#define PIKE_STATUS_BURN 1
#define PIKE_STATUS_TOXIC 2
#define PIKE_STATUS_PARALYSIS 3
#define PIKE_STATUS_SLEEP 4
// Function IDs for sBattlePikeFunctions / CallBattlePikeFunction // Function IDs for sBattlePikeFunctions / CallBattlePikeFunction
#define BATTLE_PIKE_FUNC_SET_ROOM_TYPE 0 #define BATTLE_PIKE_FUNC_SET_ROOM_TYPE 0
#define BATTLE_PIKE_FUNC_GET_DATA 1 #define BATTLE_PIKE_FUNC_GET_DATA 1
#define BATTLE_PIKE_FUNC_SET_DATA 2 #define BATTLE_PIKE_FUNC_SET_DATA 2
#define BATTLE_PIKE_FUNC_IS_FINAL_ROOM 3 #define BATTLE_PIKE_FUNC_IS_FINAL_ROOM 3
#define BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS 4 #define BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS 4
#define BATTLE_PIKE_FUNC_GET_ROOM_TYPE 5 #define BATTLE_PIKE_FUNC_GET_ROOM_TYPE 5
#define BATTLE_PIKE_FUNC_6 6 #define BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM 6
#define BATTLE_PIKE_FUNC_7 7 #define BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM 7
#define BATTLE_PIKE_FUNC_8 8 #define BATTLE_PIKE_FUNC_SAVE 8
#define BATTLE_PIKE_FUNC_NULL_9 9 #define BATTLE_PIKE_FUNC_NULL_9 9
#define BATTLE_PIKE_FUNC_NULL_10 10 #define BATTLE_PIKE_FUNC_NULL_10 10
#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS 11 #define BATTLE_PIKE_FUNC_GET_ROOM_STATUS 11
#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON 12 #define BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON 12
#define BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS 13 #define BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS 13
#define BATTLE_PIKE_FUNC_BUFFER_NPC_MSG 14 #define BATTLE_PIKE_FUNC_BUFFER_NPC_MSG 14
#define BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE 15 #define BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE 15
#define BATTLE_PIKE_FUNC_IS_IN 16 #define BATTLE_PIKE_FUNC_IS_IN 16
#define BATTLE_PIKE_FUNC_SET_HINT_ROOM 17 #define BATTLE_PIKE_FUNC_SET_HINT_ROOM 17
#define BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID 18 #define BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID 18
#define BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT 19 #define BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT 19
#define BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS 20 #define BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS 20
#define BATTLE_PIKE_FUNC_BUFFER_RECORD_MIX_MSG 21 #define BATTLE_PIKE_FUNC_GET_TRAINER_INTRO 21
#define BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE 22 #define BATTLE_PIKE_FUNC_GET_QUEEN_FIGHT_TYPE 22
#define BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN 23 #define BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN 23
#define BATTLE_PIKE_FUNC_SET_HEALING_ROOMS_DISABLED 24 #define BATTLE_PIKE_FUNC_SET_HEAL_ROOMS_DISABLED 24
#define BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH 25 #define BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH 25
#define BATTLE_PIKE_FUNC_SAVE_MON_HELD_ITEMS 26 #define BATTLE_PIKE_FUNC_SAVE_HELD_ITEMS 26
#define BATTLE_PIKE_FUNC_LOAD_MON_HELD_ITEMS 27 #define BATTLE_PIKE_FUNC_RESET_HELD_ITEMS 27
#define BATTLE_PIKE_FUNC_INIT_CHALLENGE 28 #define BATTLE_PIKE_FUNC_INIT 28
#define PIKE_DATA_PRIZE 0
#define PIKE_DATA_WIN_STREAK 1
#define PIKE_DATA_RECORD_STREAK 2
#define PIKE_DATA_TOTAL_STREAKS 3
#define PIKE_DATA_WIN_STREAK_ACTIVE 4
#endif // GUARD_CONSTANTS_BATTLE_PIKE_H #endif // GUARD_CONSTANTS_BATTLE_PIKE_H
+18 -6
View File
@@ -27,23 +27,35 @@
#define OBJ_POSITIONS_NEAR_EXIT 4 #define OBJ_POSITIONS_NEAR_EXIT 4
// Functions IDs for sBattlePyramidFunctions / CallBattlePyramidFunction // 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_GET_DATA 1
#define BATTLE_PYRAMID_FUNC_SET_DATA 2 #define BATTLE_PYRAMID_FUNC_SET_DATA 2
#define BATTLE_PYRAMID_FUNC_3 3 #define BATTLE_PYRAMID_FUNC_SAVE 3
#define BATTLE_PYRAMID_FUNC_SET_REWARD 4 #define BATTLE_PYRAMID_FUNC_SET_PRIZE 4
#define BATTLE_PYRAMID_FUNC_GIVE_REWARD 5 #define BATTLE_PYRAMID_FUNC_GIVE_PRIZE 5 // unused
#define BATTLE_PYRAMID_FUNC_SEED_FLOOR 6 #define BATTLE_PYRAMID_FUNC_SEED_FLOOR 6
#define BATTLE_PYRAMID_FUNC_SET_ITEM 7 #define BATTLE_PYRAMID_FUNC_SET_ITEM 7
#define BATTLE_PYRAMID_FUNC_HIDE_ITEM 8 #define BATTLE_PYRAMID_FUNC_HIDE_ITEM 8
#define BATTLE_PYRAMID_FUNC_INIT_TRAINERS 9 #define BATTLE_PYRAMID_FUNC_INIT_TRAINERS 9
#define BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT 10 #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_IS_IN 12
#define BATTLE_PYRAMID_FUNC_UPDATE_LIGHT 13 #define BATTLE_PYRAMID_FUNC_UPDATE_LIGHT 13
#define BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS 14 #define BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS 14
#define BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE 15 #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 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 #endif // GUARD_CONSTANTS_BATTLE_PYRAMID_H
+32
View File
@@ -0,0 +1,32 @@
#ifndef GUARD_CONSTANTS_BATTLE_TENT_H
#define GUARD_CONSTANTS_BATTLE_TENT_H
#define VERDANTURF_TENT_FUNC_INIT 0
#define VERDANTURF_TENT_FUNC_GET_PRIZE 1
#define VERDANTURF_TENT_FUNC_SET_PRIZE 2
#define VERDANTURF_TENT_FUNC_SET_OPPONENT_GFX 3
#define VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO 4
#define VERDANTURF_TENT_FUNC_SAVE 5
#define VERDANTURF_TENT_FUNC_SET_RANDOM_PRIZE 6
#define VERDANTURF_TENT_FUNC_GIVE_PRIZE 7
#define FALLARBOR_TENT_FUNC_INIT 0
#define FALLARBOR_TENT_FUNC_GET_PRIZE 1
#define FALLARBOR_TENT_FUNC_SET_PRIZE 2
#define FALLARBOR_TENT_FUNC_SAVE 3
#define FALLARBOR_TENT_FUNC_SET_RANDOM_PRIZE 4
#define FALLARBOR_TENT_FUNC_GIVE_PRIZE 5
#define FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME 6
#define SLATEPORT_TENT_FUNC_INIT 0
#define SLATEPORT_TENT_FUNC_GET_PRIZE 1
#define SLATEPORT_TENT_FUNC_SET_PRIZE 2
#define SLATEPORT_TENT_FUNC_SAVE 3
#define SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE 4
#define SLATEPORT_TENT_FUNC_GIVE_PRIZE 5
#define SLATEPORT_TENT_FUNC_SELECT_RENT_MONS 6
#define SLATEPORT_TENT_FUNC_SWAP_RENT_MONS 7
#define SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS 8
#define SLATEPORT_TENT_FUNC_GENERATE_RENTAL_MONS 9
#endif // GUARD_CONSTANTS_BATTLE_TENT_H
+20 -16
View File
@@ -1,21 +1,25 @@
#ifndef GUARD_CONSTANTS_BATTLE_TOWER_H #ifndef GUARD_CONSTANTS_BATTLE_TOWER_H
#define GUARD_CONSTANTS_BATTLE_TOWER_H #define GUARD_CONSTANTS_BATTLE_TOWER_H
#define BATTLE_TOWER_FUNC_0 0 #define BATTLE_TOWER_FUNC_INIT 0
#define BATTLE_TOWER_FUNC_1 1 #define BATTLE_TOWER_FUNC_GET_DATA 1
#define BATTLE_TOWER_FUNC_2 2 #define BATTLE_TOWER_FUNC_SET_DATA 2
#define BATTLE_TOWER_FUNC_CHOOSE_TRAINER 3 #define BATTLE_TOWER_FUNC_SET_OPPONENT 3
#define BATTLE_TOWER_FUNC_4 4 #define BATTLE_TOWER_FUNC_SET_BATTLE_WON 4
#define BATTLE_TOWER_FUNC_GIVE_RIBBONS 5 #define BATTLE_TOWER_FUNC_GIVE_RIBBONS 5
#define BATTLE_TOWER_FUNC_SAVE 6 #define BATTLE_TOWER_FUNC_SAVE 6
#define BATTLE_TOWER_FUNC_7 7 #define BATTLE_TOWER_FUNC_GET_OPPONENT_INTRO 7
#define BATTLE_TOWER_FUNC_NOP 8 #define BATTLE_TOWER_FUNC_NOP 8
#define BATTLE_TOWER_FUNC_NOP2 9 #define BATTLE_TOWER_FUNC_NOP2 9
#define BATTLE_TOWER_FUNC_10 10 #define BATTLE_TOWER_FUNC_10 10
#define BATTLE_TOWER_FUNC_11 11 #define BATTLE_TOWER_FUNC_11 11
#define BATTLE_TOWER_FUNC_12 12 #define BATTLE_TOWER_FUNC_12 12
#define BATTLE_TOWER_FUNC_13 13 #define BATTLE_TOWER_FUNC_13 13
#define BATTLE_TOWER_FUNC_14 14 #define BATTLE_TOWER_FUNC_14 14
#define BATTLE_TOWER_FUNC_15 15 #define BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA 15
#define TOWER_DATA_WIN_STREAK 1
#define TOWER_DATA_WIN_STREAK_ACTIVE 2
#define TOWER_DATA_LVL_MODE 3
#endif //GUARD_CONSTANTS_BATTLE_TOWER_H #endif //GUARD_CONSTANTS_BATTLE_TOWER_H
+8 -8
View File
@@ -363,18 +363,18 @@ struct BattleFrontier
/*0xD1C*/ u16 domeTotalChampionships[2][2]; /*0xD1C*/ u16 domeTotalChampionships[2][2];
/*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT];
/*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE]; /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE];
/*0xDC4*/ u16 field_DC4; /*0xDC4*/ u16 unused_DC4;
/*0xDC6*/ u16 field_DC6; /*0xDC6*/ u16 palacePrize;
/*0xDC8*/ u16 palaceWinStreaks[2][2]; /*0xDC8*/ u16 palaceWinStreaks[2][2];
/*0xDD0*/ u16 palaceRecordWinStreaks[2][2]; /*0xDD0*/ u16 palaceRecordWinStreaks[2][2];
/*0xDD8*/ u16 arenaRewardItem; /*0xDD8*/ u16 arenaPrize;
/*0xDDA*/ u16 arenaWinStreaks[2]; /*0xDDA*/ u16 arenaWinStreaks[2];
/*0xDDE*/ u16 arenaRecordStreaks[2]; /*0xDDE*/ u16 arenaRecordStreaks[2];
/*0xDE2*/ u16 factoryWinStreaks[2][2]; /*0xDE2*/ u16 factoryWinStreaks[2][2];
/*0xDEA*/ u16 factoryRecordWinStreaks[2][2]; /*0xDEA*/ u16 factoryRecordWinStreaks[2][2];
/*0xDF6*/ u16 factoryRentsCount[2][2]; /*0xDF6*/ u16 factoryRentsCount[2][2];
/*0xDFA*/ u16 factoryRecordRentsCount[2][2]; /*0xDFA*/ u16 factoryRecordRentsCount[2][2];
/*0xE02*/ u16 field_E02; /*0xE02*/ u16 pikePrize;
/*0xE04*/ u16 pikeWinStreaks[2]; /*0xE04*/ u16 pikeWinStreaks[2];
/*0xE08*/ u16 pikeRecordStreaks[2]; /*0xE08*/ u16 pikeRecordStreaks[2];
/*0xE0C*/ u16 pikeTotalStreaks[2]; /*0xE0C*/ u16 pikeTotalStreaks[2];
@@ -382,16 +382,16 @@ struct BattleFrontier
/*0xE10*/ u8 pikeHintedRoomType:4; /*0xE10*/ u8 pikeHintedRoomType:4;
/*0xE10*/ u8 pikeHealingRoomsDisabled:1; /*0xE10*/ u8 pikeHealingRoomsDisabled:1;
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE]; /*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
/*0xE18*/ u16 pyramidRewardItem; /*0xE18*/ u16 pyramidPrize;
/*0xE1A*/ u16 pyramidWinStreaks[2]; /*0xE1A*/ u16 pyramidWinStreaks[2];
/*0xE1E*/ u16 pyramidRecordStreaks[2]; /*0xE1E*/ u16 pyramidRecordStreaks[2];
/*0xE22*/ u16 pyramidRandoms[4]; /*0xE22*/ u16 pyramidRandoms[4];
/*0xE2A*/ u8 pyramidTrainerFlags; /*0xE2A*/ u8 pyramidTrainerFlags;
/*0xE2C*/ struct PyramidBag pyramidBag; /*0xE2C*/ struct PyramidBag pyramidBag;
/*0xE68*/ u8 pyramidLightRadius; /*0xE68*/ u8 pyramidLightRadius;
/*0xE6A*/ u16 field_E6A; /*0xE6A*/ u16 verdanturfTentPrize;
/*0xE6C*/ u16 field_E6C; /*0xE6C*/ u16 fallarborTentPrize;
/*0xE6E*/ u16 field_E6E; /*0xE6E*/ u16 slateportTentPrize;
/*0xE70*/ struct RentalMon rentalMons[PARTY_SIZE]; /*0xE70*/ struct RentalMon rentalMons[PARTY_SIZE];
/*0xEB8*/ u16 battlePoints; /*0xEB8*/ u16 battlePoints;
/*0xEBA*/ u16 cardBattlePoints; /*0xEBA*/ u16 cardBattlePoints;
+17 -17
View File
@@ -33,8 +33,8 @@ static void InitArenaChallenge(void);
static void GetArenaData(void); static void GetArenaData(void);
static void SetArenaData(void); static void SetArenaData(void);
static void SaveArenaChallenge(void); static void SaveArenaChallenge(void);
static void SetArenaRewardItem(void); static void SetArenaPrize(void);
static void GiveArenaRewardItem(void); static void GiveArenaPrize(void);
static void BufferArenaOpponentName(void); static void BufferArenaOpponentName(void);
static void SpriteCb_JudgmentIcon(struct Sprite *sprite); static void SpriteCb_JudgmentIcon(struct Sprite *sprite);
static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler); static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler);
@@ -473,12 +473,12 @@ static void (* const sArenaFunctions[])(void) =
[BATTLE_ARENA_FUNC_GET_DATA] = GetArenaData, [BATTLE_ARENA_FUNC_GET_DATA] = GetArenaData,
[BATTLE_ARENA_FUNC_SET_DATA] = SetArenaData, [BATTLE_ARENA_FUNC_SET_DATA] = SetArenaData,
[BATTLE_ARENA_FUNC_SAVE] = SaveArenaChallenge, [BATTLE_ARENA_FUNC_SAVE] = SaveArenaChallenge,
[BATTLE_ARENA_FUNC_SET_REWARD] = SetArenaRewardItem, [BATTLE_ARENA_FUNC_SET_PRIZE] = SetArenaPrize,
[BATTLE_ARENA_FUNC_GIVE_REWARD] = GiveArenaRewardItem, [BATTLE_ARENA_FUNC_GIVE_PRIZE] = GiveArenaPrize,
[BATTLE_ARENA_FUNC_GET_TRAINER_NAME] = BufferArenaOpponentName, [BATTLE_ARENA_FUNC_GET_TRAINER_NAME] = BufferArenaOpponentName,
}; };
static const u16 sShortStreakRewardItems[] = static const u16 sShortStreakPrizeItems[] =
{ {
ITEM_HP_UP, ITEM_HP_UP,
ITEM_PROTEIN, ITEM_PROTEIN,
@@ -488,7 +488,7 @@ static const u16 sShortStreakRewardItems[] =
ITEM_ZINC, ITEM_ZINC,
}; };
static const u16 sLongStreakRewardItems[] = static const u16 sLongStreakPrizeItems[] =
{ {
ITEM_BRIGHT_POWDER, ITEM_BRIGHT_POWDER,
ITEM_WHITE_HERB, ITEM_WHITE_HERB,
@@ -810,8 +810,8 @@ static void GetArenaData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case ARENA_DATA_REWARD: case ARENA_DATA_PRIZE:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.arenaRewardItem; gSpecialVar_Result = gSaveBlock2Ptr->frontier.arenaPrize;
break; break;
case ARENA_DATA_WIN_STREAK: case ARENA_DATA_WIN_STREAK:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode]; gSpecialVar_Result = gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode];
@@ -831,8 +831,8 @@ static void SetArenaData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case ARENA_DATA_REWARD: case ARENA_DATA_PRIZE:
gSaveBlock2Ptr->frontier.arenaRewardItem = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.arenaPrize = gSpecialVar_0x8006;
break; break;
case ARENA_DATA_WIN_STREAK: case ARENA_DATA_WIN_STREAK:
gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] = gSpecialVar_0x8006;
@@ -864,22 +864,22 @@ static void SaveArenaChallenge(void)
SaveGameFrontier(); SaveGameFrontier();
} }
static void SetArenaRewardItem(void) static void SetArenaPrize(void)
{ {
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
if (gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] > 41) if (gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] > 41)
gSaveBlock2Ptr->frontier.arenaRewardItem = sLongStreakRewardItems[Random() % ARRAY_COUNT(sLongStreakRewardItems)]; gSaveBlock2Ptr->frontier.arenaPrize = sLongStreakPrizeItems[Random() % ARRAY_COUNT(sLongStreakPrizeItems)];
else else
gSaveBlock2Ptr->frontier.arenaRewardItem = sShortStreakRewardItems[Random() % ARRAY_COUNT(sShortStreakRewardItems)]; gSaveBlock2Ptr->frontier.arenaPrize = sShortStreakPrizeItems[Random() % ARRAY_COUNT(sShortStreakPrizeItems)];
} }
static void GiveArenaRewardItem(void) static void GiveArenaPrize(void)
{ {
if (AddBagItem(gSaveBlock2Ptr->frontier.arenaRewardItem, 1) == TRUE) if (AddBagItem(gSaveBlock2Ptr->frontier.arenaPrize, 1) == TRUE)
{ {
CopyItemName(gSaveBlock2Ptr->frontier.arenaRewardItem, gStringVar1); CopyItemName(gSaveBlock2Ptr->frontier.arenaPrize, gStringVar1);
gSaveBlock2Ptr->frontier.arenaRewardItem = ITEM_NONE; gSaveBlock2Ptr->frontier.arenaPrize = ITEM_NONE;
gSpecialVar_Result = TRUE; gSpecialVar_Result = TRUE;
} }
else else
+63 -69
View File
@@ -30,6 +30,7 @@
#include "scanline_effect.h" #include "scanline_effect.h"
#include "script_pokemon_util_80F87D8.h" #include "script_pokemon_util_80F87D8.h"
#include "graphics.h" #include "graphics.h"
#include "constants/battle_dome.h"
#include "constants/frontier_util.h" #include "constants/frontier_util.h"
#include "constants/species.h" #include "constants/species.h"
#include "constants/moves.h" #include "constants/moves.h"
@@ -39,13 +40,6 @@
#include "constants/battle_frontier.h" #include "constants/battle_frontier.h"
#include "constants/rgb.h" #include "constants/rgb.h"
#define DOME_ROUND1 0
#define DOME_ROUND2 1
#define DOME_QUARTERFINAL 1 // Different name for the same round.
#define DOME_SEMIFINAL 2
#define DOME_FINAL 3
#define DOME_ROUNDS_COUNT 4
struct BattleDomeStruct struct BattleDomeStruct
{ {
u8 arr[DOME_TOURNAMENT_TRAINERS_COUNT]; u8 arr[DOME_TOURNAMENT_TRAINERS_COUNT];
@@ -107,9 +101,9 @@ static void SetDomeOpponentId(void);
static void SetDomeOpponentGraphicsId(void); static void SetDomeOpponentGraphicsId(void);
static void ShowNonInteractiveDomeTourneyTree(void); static void ShowNonInteractiveDomeTourneyTree(void);
static void ResolveDomeRoundWinners(void); static void ResolveDomeRoundWinners(void);
static void sub_81902F8(void); static void SaveDomeChallenge(void);
static void UpdateDomeStreaks(void); static void IncrementDomeStreaks(void);
static void RestoreDomePlayerParty(void); static void ResetSketchedMoves(void);
static void RestoreDomePlayerPartyHeldItems(void); static void RestoreDomePlayerPartyHeldItems(void);
static void ReduceDomePlayerPartyTo3Mons(void); static void ReduceDomePlayerPartyTo3Mons(void);
static void GetPlayerSeededBeforeOpponent(void); static void GetPlayerSeededBeforeOpponent(void);
@@ -1079,29 +1073,29 @@ static const u8 sTourneyTreeTrainerIds[] = {0, 8, 12, 4, 7, 15, 11, 3, 2, 10, 14
static void (* const sBattleDomeFunctions[])(void) = static void (* const sBattleDomeFunctions[])(void) =
{ {
InitDomeChallenge, [BATTLE_DOME_FUNC_INIT] = InitDomeChallenge,
GetDomeData, [BATTLE_DOME_FUNC_GET_DATA] = GetDomeData,
SetDomeData, [BATTLE_DOME_FUNC_SET_DATA] = SetDomeData,
BufferDomeRoundText, [BATTLE_DOME_FUNC_GET_ROUND_TEXT] = BufferDomeRoundText,
BufferDomeOpponentName, [BATTLE_DOME_FUNC_GET_OPPONENT_NAME] = BufferDomeOpponentName,
InitDomeOpponentParty, [BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY] = InitDomeOpponentParty,
ShowDomeOpponentInfo, [BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO] = ShowDomeOpponentInfo,
ShowDomeTourneyTree, [BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE] = ShowDomeTourneyTree,
ShowPreviousDomeResultsTourneyTree, [BATTLE_DOME_FUNC_SHOW_PREV_RESULTS_TREE] = ShowPreviousDomeResultsTourneyTree,
SetDomeOpponentId, [BATTLE_DOME_FUNC_SET_OPPONENT_ID] = SetDomeOpponentId,
SetDomeOpponentGraphicsId, [BATTLE_DOME_FUNC_SET_OPPONENT_GFX] = SetDomeOpponentGraphicsId,
ShowNonInteractiveDomeTourneyTree, [BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE] = ShowNonInteractiveDomeTourneyTree,
ResolveDomeRoundWinners, [BATTLE_DOME_FUNC_RESOLVE_WINNERS] = ResolveDomeRoundWinners,
sub_81902F8, [BATTLE_DOME_FUNC_SAVE] = SaveDomeChallenge,
UpdateDomeStreaks, [BATTLE_DOME_FUNC_INCREMENT_STREAK] = IncrementDomeStreaks,
InitDomeFacilityTrainersAndMons, [BATTLE_DOME_FUNC_SET_TRAINERS] = InitDomeFacilityTrainersAndMons,
RestoreDomePlayerParty, [BATTLE_DOME_FUNC_RESET_SKETCH] = ResetSketchedMoves,
RestoreDomePlayerPartyHeldItems, [BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS] = RestoreDomePlayerPartyHeldItems,
ReduceDomePlayerPartyTo3Mons, [BATTLE_DOME_FUNC_REDUCE_PARTY] = ReduceDomePlayerPartyTo3Mons,
GetPlayerSeededBeforeOpponent, [BATTLE_DOME_FUNC_COMPARE_SEEDS] = GetPlayerSeededBeforeOpponent,
BufferLastDomeWinnerName, [BATTLE_DOME_FUNC_GET_WINNER_NAME] = BufferLastDomeWinnerName,
sub_8194F58, [BATTLE_DOME_FUNC_21] = sub_8194F58,
InitDomeTrainers, [BATTLE_DOME_FUNC_INIT_TRAINERS] = InitDomeTrainers,
}; };
static const u32 sWinStreakFlags[][2] = static const u32 sWinStreakFlags[][2] =
@@ -2280,25 +2274,25 @@ static void GetDomeData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 0: case DOME_DATA_WIN_STREAK:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode]; gSpecialVar_Result = gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode];
break; break;
case 1: case DOME_DATA_WIN_STREAK_ACTIVE:
gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0); gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0);
break; break;
case 2: case DOME_DATA_2:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_0; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_0;
break; break;
case 3: case DOME_DATA_3:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_1; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_1;
break; break;
case 4: case DOME_DATA_4:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_2; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_2;
break; break;
case 5: case DOME_DATA_5:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_3; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_3;
break; break;
case 6: case DOME_DATA_6:
if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES) if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES)
{ {
if (lvlMode) if (lvlMode)
@@ -2314,7 +2308,7 @@ static void GetDomeData(void)
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_0; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_0;
} }
break; break;
case 7: case DOME_DATA_7:
if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES) if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES)
{ {
if (lvlMode) if (lvlMode)
@@ -2330,12 +2324,12 @@ static void GetDomeData(void)
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_2; gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_D08_2;
} }
break; break;
case 8: case DOME_DATA_8:
ClearSelectedPartyOrder(); ClearSelectedPartyOrder();
gSelectedOrderFromParty[0] = gSaveBlock2Ptr->frontier.selectedPartyMons[3]; gSelectedOrderFromParty[0] = gSaveBlock2Ptr->frontier.selectedPartyMons[3];
gSelectedOrderFromParty[1] = gSaveBlock2Ptr->frontier.selectedPartyMons[3] >> 8; gSelectedOrderFromParty[1] = gSaveBlock2Ptr->frontier.selectedPartyMons[3] >> 8;
break; break;
case 9: case DOME_DATA_9:
gSpecialVar_Result = (gSaveBlock2Ptr->frontier.field_D0A * 2) - 3 + gSaveBlock2Ptr->frontier.field_D0B; gSpecialVar_Result = (gSaveBlock2Ptr->frontier.field_D0A * 2) - 3 + gSaveBlock2Ptr->frontier.field_D0B;
break; break;
} }
@@ -2348,28 +2342,28 @@ static void SetDomeData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 0: case DOME_DATA_WIN_STREAK:
gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006;
break; break;
case 1: case DOME_DATA_WIN_STREAK_ACTIVE:
if (gSpecialVar_0x8006) if (gSpecialVar_0x8006)
gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode]; gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode];
else else
gSaveBlock2Ptr->frontier.winStreakActiveFlags &= sWinStreakMasks[battleMode][lvlMode]; gSaveBlock2Ptr->frontier.winStreakActiveFlags &= sWinStreakMasks[battleMode][lvlMode];
break; break;
case 2: case DOME_DATA_2:
gSaveBlock2Ptr->frontier.field_D08_0 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_0 = gSpecialVar_0x8006;
break; break;
case 3: case DOME_DATA_3:
gSaveBlock2Ptr->frontier.field_D08_1 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_1 = gSpecialVar_0x8006;
break; break;
case 4: case DOME_DATA_4:
gSaveBlock2Ptr->frontier.field_D08_2 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_2 = gSpecialVar_0x8006;
break; break;
case 5: case DOME_DATA_5:
gSaveBlock2Ptr->frontier.field_D08_3 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_3 = gSpecialVar_0x8006;
break; break;
case 6: case DOME_DATA_6:
if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES) if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES)
{ {
if (lvlMode) if (lvlMode)
@@ -2385,7 +2379,7 @@ static void SetDomeData(void)
gSaveBlock2Ptr->frontier.field_D08_0 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_0 = gSpecialVar_0x8006;
} }
break; break;
case 7: case DOME_DATA_7:
if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES) if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES)
{ {
if (lvlMode) if (lvlMode)
@@ -2401,7 +2395,7 @@ static void SetDomeData(void)
gSaveBlock2Ptr->frontier.field_D08_2 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.field_D08_2 = gSpecialVar_0x8006;
} }
break; break;
case 8: case DOME_DATA_8:
gSaveBlock2Ptr->frontier.selectedPartyMons[3] = T1_READ_16(gSelectedOrderFromParty); gSaveBlock2Ptr->frontier.selectedPartyMons[3] = T1_READ_16(gSelectedOrderFromParty);
break; break;
} }
@@ -2411,7 +2405,7 @@ static void InitDomeTrainers(void)
{ {
int i, j, k; int i, j, k;
int monLevel; int monLevel;
int species[3]; int species[FRONTIER_PARTY_SIZE];
int monTypesBits, monTypesCount; int monTypesBits, monTypesCount;
int trainerId; int trainerId;
int monSetId; int monSetId;
@@ -2472,7 +2466,7 @@ static void InitDomeTrainers(void)
gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId = trainerId; gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId = trainerId;
} }
for (j = 0; j < 3; j++) for (j = 0; j < FRONTIER_PARTY_SIZE; j++)
{ {
// Make sure the mon is valid. // Make sure the mon is valid.
do do
@@ -2528,7 +2522,7 @@ static void InitDomeTrainers(void)
monTypesBits = 0; monTypesBits = 0;
statSums[i] = 0; statSums[i] = 0;
ivs = GetDomeTrainerMonIvs(gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId); ivs = GetDomeTrainerMonIvs(gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId);
for (j = 0; j < 3; j++) for (j = 0; j < FRONTIER_PARTY_SIZE; j++)
{ {
CalcDomeMonStats(gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[i][j]].species, CalcDomeMonStats(gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[i][j]].species,
monLevel, ivs, monLevel, ivs,
@@ -2595,7 +2589,7 @@ static void InitDomeTrainers(void)
gSaveBlock2Ptr->frontier.domeTrainers[j].trainerId = TRAINER_FRONTIER_BRAIN; gSaveBlock2Ptr->frontier.domeTrainers[j].trainerId = TRAINER_FRONTIER_BRAIN;
} }
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
gSaveBlock2Ptr->frontier.domeMonIds[j][i] = GetFrontierBrainMonSpecies(i); gSaveBlock2Ptr->frontier.domeMonIds[j][i] = GetFrontierBrainMonSpecies(i);
} }
@@ -2765,14 +2759,14 @@ int GetDomeTrainerMonCountInBits(u16 tournamentTrainerId)
static int sub_818FCBC(u16 tournamentTrainerId, bool8 arg1) static int sub_818FCBC(u16 tournamentTrainerId, bool8 arg1)
{ {
int i, moveId, playerMonId; int i, moveId, playerMonId;
int array[3]; int array[FRONTIER_PARTY_SIZE];
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
array[i] = 0; array[i] = 0;
for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) for (moveId = 0; moveId < MAX_MON_MOVES; moveId++)
{ {
for (playerMonId = 0; playerMonId < 3; playerMonId++) for (playerMonId = 0; playerMonId < FRONTIER_PARTY_SIZE; playerMonId++)
{ {
if (gSaveBlock2Ptr->frontier.domeTrainers[tournamentTrainerId].trainerId == TRAINER_FRONTIER_BRAIN) if (gSaveBlock2Ptr->frontier.domeTrainers[tournamentTrainerId].trainerId == TRAINER_FRONTIER_BRAIN)
{ {
@@ -2793,14 +2787,14 @@ static int sub_818FCBC(u16 tournamentTrainerId, bool8 arg1)
static int sub_818FDB8(u16 tournamentTrainerId, bool8 arg1) static int sub_818FDB8(u16 tournamentTrainerId, bool8 arg1)
{ {
int i, moveId, playerMonId; int i, moveId, playerMonId;
int array[3]; int array[FRONTIER_PARTY_SIZE];
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
array[i] = 0; array[i] = 0;
for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) for (moveId = 0; moveId < MAX_MON_MOVES; moveId++)
{ {
for (playerMonId = 0; playerMonId < 3; playerMonId++) for (playerMonId = 0; playerMonId < FRONTIER_PARTY_SIZE; playerMonId++)
{ {
if (gSaveBlock2Ptr->frontier.domeTrainers[tournamentTrainerId].trainerId == TRAINER_FRONTIER_BRAIN) if (gSaveBlock2Ptr->frontier.domeTrainers[tournamentTrainerId].trainerId == TRAINER_FRONTIER_BRAIN)
{ {
@@ -3327,7 +3321,7 @@ static void SetDomeOpponentGraphicsId(void)
SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_A, 0); SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_A, 0);
} }
static void sub_81902F8(void) static void SaveDomeChallenge(void)
{ {
gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005; gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005;
VarSet(VAR_TEMP_0, 0); VarSet(VAR_TEMP_0, 0);
@@ -3335,7 +3329,7 @@ static void sub_81902F8(void)
SaveGameFrontier(); SaveGameFrontier();
} }
static void UpdateDomeStreaks(void) static void IncrementDomeStreaks(void)
{ {
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
@@ -5937,7 +5931,7 @@ static void InitDomeFacilityTrainersAndMons(void)
gFacilityTrainers = gBattleFrontierTrainers; gFacilityTrainers = gBattleFrontierTrainers;
} }
static void RestoreDomePlayerParty(void) static void ResetSketchedMoves(void)
{ {
int i, moveSlot; int i, moveSlot;
@@ -6005,7 +5999,7 @@ static void sub_8194F58(void)
{ {
int i, j, k; int i, j, k;
int monLevel; int monLevel;
int species[3]; int species[FRONTIER_PARTY_SIZE];
int monTypesBits; int monTypesBits;
int trainerId; int trainerId;
int monSetId; int monSetId;
@@ -6021,7 +6015,7 @@ static void sub_8194F58(void)
return; return;
statSums = AllocZeroed(sizeof(u16) * DOME_TOURNAMENT_TRAINERS_COUNT); statSums = AllocZeroed(sizeof(u16) * DOME_TOURNAMENT_TRAINERS_COUNT);
statValues = AllocZeroed(sizeof(int) * 6); statValues = AllocZeroed(sizeof(int) * NUM_STATS);
lvlMode = gSaveBlock2Ptr->frontier.lvlMode; lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
gSaveBlock2Ptr->frontier.lvlMode = 0; gSaveBlock2Ptr->frontier.lvlMode = 0;
// This one, I'd like to call a 'C fakematching'. // This one, I'd like to call a 'C fakematching'.
@@ -6050,7 +6044,7 @@ static void sub_8194F58(void)
} while (j != i); } while (j != i);
gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId = trainerId; gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId = trainerId;
for (j = 0; j < 3; j++) for (j = 0; j < FRONTIER_PARTY_SIZE; j++)
{ {
// Make sure the mon is valid. // Make sure the mon is valid.
do do
@@ -6081,7 +6075,7 @@ static void sub_8194F58(void)
monTypesBits = 0; monTypesBits = 0;
statSums[i] = 0; statSums[i] = 0;
ivs = GetDomeTrainerMonIvs(gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId); ivs = GetDomeTrainerMonIvs(gSaveBlock2Ptr->frontier.domeTrainers[i].trainerId);
for (j = 0; j < 3; j++) for (j = 0; j < FRONTIER_PARTY_SIZE; j++)
{ {
CalcDomeMonStats(gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[i][j]].species, CalcDomeMonStats(gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[i][j]].species,
monLevel, ivs, monLevel, ivs,
+62 -59
View File
@@ -10,6 +10,7 @@
#include "random.h" #include "random.h"
#include "constants/species.h" #include "constants/species.h"
#include "constants/battle_ai.h" #include "constants/battle_ai.h"
#include "constants/battle_factory.h"
#include "constants/battle_frontier.h" #include "constants/battle_frontier.h"
#include "constants/frontier_util.h" #include "constants/frontier_util.h"
#include "constants/layouts.h" #include "constants/layouts.h"
@@ -23,7 +24,7 @@ static bool8 sPerformedRentalSwap;
static void InitFactoryChallenge(void); static void InitFactoryChallenge(void);
static void GetBattleFactoryData(void); static void GetBattleFactoryData(void);
static void SetBattleFactoryData(void); static void SetBattleFactoryData(void);
static void sub_81A613C(void); static void SaveFactoryChallenge(void);
static void nullsub_75(void); static void nullsub_75(void);
static void nullsub_123(void); static void nullsub_123(void);
static void SelectInitialRentalMons(void); static void SelectInitialRentalMons(void);
@@ -49,14 +50,14 @@ static const u16 sMoves_TotalPreparation[] =
MOVE_MINIMIZE, MOVE_WITHDRAW, MOVE_DEFENSE_CURL, MOVE_BARRIER, MOVE_FOCUS_ENERGY, MOVE_AMNESIA, MOVE_MINIMIZE, MOVE_WITHDRAW, MOVE_DEFENSE_CURL, MOVE_BARRIER, MOVE_FOCUS_ENERGY, MOVE_AMNESIA,
MOVE_ACID_ARMOR, MOVE_SHARPEN, MOVE_CONVERSION, MOVE_CONVERSION_2, MOVE_BELLY_DRUM, MOVE_PSYCH_UP, MOVE_ACID_ARMOR, MOVE_SHARPEN, MOVE_CONVERSION, MOVE_CONVERSION_2, MOVE_BELLY_DRUM, MOVE_PSYCH_UP,
MOVE_CHARGE, MOVE_SNATCH, MOVE_TAIL_GLOW, MOVE_COSMIC_POWER, MOVE_IRON_DEFENSE, MOVE_HOWL, MOVE_BULK_UP, MOVE_CALM_MIND, MOVE_DRAGON_DANCE, MOVE_CHARGE, MOVE_SNATCH, MOVE_TAIL_GLOW, MOVE_COSMIC_POWER, MOVE_IRON_DEFENSE, MOVE_HOWL, MOVE_BULK_UP, MOVE_CALM_MIND, MOVE_DRAGON_DANCE,
0 MOVE_NONE
}; };
static const u16 sMoves_ImpossibleToPredict[] = static const u16 sMoves_ImpossibleToPredict[] =
{ {
MOVE_MIMIC, MOVE_METRONOME, MOVE_MIRROR_MOVE, MOVE_TRANSFORM, MOVE_SUBSTITUTE, MOVE_SKETCH, MOVE_CURSE, MOVE_MIMIC, MOVE_METRONOME, MOVE_MIRROR_MOVE, MOVE_TRANSFORM, MOVE_SUBSTITUTE, MOVE_SKETCH, MOVE_CURSE,
MOVE_PRESENT, MOVE_FOLLOW_ME, MOVE_TRICK, MOVE_ROLE_PLAY, MOVE_ASSIST, MOVE_SKILL_SWAP, MOVE_CAMOUFLAGE, MOVE_PRESENT, MOVE_FOLLOW_ME, MOVE_TRICK, MOVE_ROLE_PLAY, MOVE_ASSIST, MOVE_SKILL_SWAP, MOVE_CAMOUFLAGE,
0 MOVE_NONE
}; };
static const u16 sMoves_WeakeningTheFoe[] = static const u16 sMoves_WeakeningTheFoe[] =
@@ -64,7 +65,7 @@ static const u16 sMoves_WeakeningTheFoe[] =
MOVE_SAND_ATTACK, MOVE_TAIL_WHIP, MOVE_LEER, MOVE_GROWL, MOVE_STRING_SHOT, MOVE_SCREECH, MOVE_SMOKESCREEN, MOVE_KINESIS, MOVE_SAND_ATTACK, MOVE_TAIL_WHIP, MOVE_LEER, MOVE_GROWL, MOVE_STRING_SHOT, MOVE_SCREECH, MOVE_SMOKESCREEN, MOVE_KINESIS,
MOVE_FLASH, MOVE_COTTON_SPORE, MOVE_SPITE, MOVE_SCARY_FACE, MOVE_CHARM, MOVE_KNOCK_OFF, MOVE_SWEET_SCENT, MOVE_FEATHER_DANCE, MOVE_FLASH, MOVE_COTTON_SPORE, MOVE_SPITE, MOVE_SCARY_FACE, MOVE_CHARM, MOVE_KNOCK_OFF, MOVE_SWEET_SCENT, MOVE_FEATHER_DANCE,
MOVE_FAKE_TEARS, MOVE_METAL_SOUND, MOVE_TICKLE, MOVE_FAKE_TEARS, MOVE_METAL_SOUND, MOVE_TICKLE,
0 MOVE_NONE
}; };
static const u16 sMoves_HighRiskHighReturn[] = static const u16 sMoves_HighRiskHighReturn[] =
@@ -73,7 +74,7 @@ static const u16 sMoves_HighRiskHighReturn[] =
MOVE_BIDE, MOVE_SELF_DESTRUCT, MOVE_SKY_ATTACK, MOVE_EXPLOSION, MOVE_FLAIL, MOVE_REVERSAL, MOVE_DESTINY_BOND, MOVE_BIDE, MOVE_SELF_DESTRUCT, MOVE_SKY_ATTACK, MOVE_EXPLOSION, MOVE_FLAIL, MOVE_REVERSAL, MOVE_DESTINY_BOND,
MOVE_PERISH_SONG, MOVE_PAIN_SPLIT, MOVE_MIRROR_COAT, MOVE_MEMENTO, MOVE_GRUDGE, MOVE_FACADE, MOVE_FOCUS_PUNCH, MOVE_PERISH_SONG, MOVE_PAIN_SPLIT, MOVE_MIRROR_COAT, MOVE_MEMENTO, MOVE_GRUDGE, MOVE_FACADE, MOVE_FOCUS_PUNCH,
MOVE_BLAST_BURN, MOVE_HYDRO_CANNON, MOVE_OVERHEAT, MOVE_FRENZY_PLANT, MOVE_PSYCHO_BOOST, MOVE_VOLT_TACKLE, MOVE_BLAST_BURN, MOVE_HYDRO_CANNON, MOVE_OVERHEAT, MOVE_FRENZY_PLANT, MOVE_PSYCHO_BOOST, MOVE_VOLT_TACKLE,
0 MOVE_NONE
}; };
static const u16 sMoves_Endurance[] = static const u16 sMoves_Endurance[] =
@@ -82,7 +83,7 @@ static const u16 sMoves_Endurance[] =
MOVE_DETECT, MOVE_ENDURE, MOVE_MILK_DRINK, MOVE_HEAL_BELL, MOVE_SAFEGUARD, MOVE_BATON_PASS, MOVE_MORNING_SUN, MOVE_DETECT, MOVE_ENDURE, MOVE_MILK_DRINK, MOVE_HEAL_BELL, MOVE_SAFEGUARD, MOVE_BATON_PASS, MOVE_MORNING_SUN,
MOVE_SYNTHESIS, MOVE_MOONLIGHT, MOVE_SWALLOW, MOVE_WISH, MOVE_INGRAIN, MOVE_MAGIC_COAT, MOVE_RECYCLE, MOVE_REFRESH, MOVE_SYNTHESIS, MOVE_MOONLIGHT, MOVE_SWALLOW, MOVE_WISH, MOVE_INGRAIN, MOVE_MAGIC_COAT, MOVE_RECYCLE, MOVE_REFRESH,
MOVE_MUD_SPORT, MOVE_SLACK_OFF, MOVE_AROMATHERAPY, MOVE_WATER_SPORT, MOVE_MUD_SPORT, MOVE_SLACK_OFF, MOVE_AROMATHERAPY, MOVE_WATER_SPORT,
0 MOVE_NONE
}; };
static const u16 sMoves_SlowAndSteady[] = static const u16 sMoves_SlowAndSteady[] =
@@ -91,45 +92,46 @@ static const u16 sMoves_SlowAndSteady[] =
MOVE_THUNDER_WAVE, MOVE_TOXIC, MOVE_HYPNOSIS, MOVE_CONFUSE_RAY, MOVE_GLARE, MOVE_POISON_GAS, MOVE_LOVELY_KISS, MOVE_SPORE, MOVE_THUNDER_WAVE, MOVE_TOXIC, MOVE_HYPNOSIS, MOVE_CONFUSE_RAY, MOVE_GLARE, MOVE_POISON_GAS, MOVE_LOVELY_KISS, MOVE_SPORE,
MOVE_SPIDER_WEB, MOVE_SWEET_KISS, MOVE_SPIKES, MOVE_SWAGGER, MOVE_MEAN_LOOK, MOVE_ATTRACT, MOVE_ENCORE, MOVE_TORMENT, MOVE_SPIDER_WEB, MOVE_SWEET_KISS, MOVE_SPIKES, MOVE_SWAGGER, MOVE_MEAN_LOOK, MOVE_ATTRACT, MOVE_ENCORE, MOVE_TORMENT,
MOVE_FLATTER, MOVE_WILL_O_WISP, MOVE_TAUNT, MOVE_YAWN, MOVE_IMPRISON, MOVE_SNATCH, MOVE_TEETER_DANCE, MOVE_GRASS_WHISTLE, MOVE_BLOCK, MOVE_FLATTER, MOVE_WILL_O_WISP, MOVE_TAUNT, MOVE_YAWN, MOVE_IMPRISON, MOVE_SNATCH, MOVE_TEETER_DANCE, MOVE_GRASS_WHISTLE, MOVE_BLOCK,
0 MOVE_NONE
}; };
static const u16 sMoves_DependsOnTheBattlesFlow[] = static const u16 sMoves_DependsOnTheBattlesFlow[] =
{ {
MOVE_SANDSTORM, MOVE_RAIN_DANCE, MOVE_SUNNY_DAY, MOVE_HAIL, MOVE_WEATHER_BALL, MOVE_SANDSTORM, MOVE_RAIN_DANCE, MOVE_SUNNY_DAY, MOVE_HAIL, MOVE_WEATHER_BALL,
0 MOVE_NONE
}; };
static const u16 *const sMoveStyles[] = // Excludes FACTORY_STYLE_NONE
static const u16 *const sMoveStyles[FACTORY_NUM_STYLES - 1] =
{ {
sMoves_TotalPreparation, [FACTORY_STYLE_PREPARATION - 1] = sMoves_TotalPreparation,
sMoves_SlowAndSteady, [FACTORY_STYLE_SLOW_STEADY - 1] = sMoves_SlowAndSteady,
sMoves_Endurance, [FACTORY_STYLE_ENDURANCE - 1] = sMoves_Endurance,
sMoves_HighRiskHighReturn, [FACTORY_STYLE_HIGH_RISK - 1] = sMoves_HighRiskHighReturn,
sMoves_WeakeningTheFoe, [FACTORY_STYLE_WEAKENING - 1] = sMoves_WeakeningTheFoe,
sMoves_ImpossibleToPredict, [FACTORY_STYLE_UNPREDICTABLE - 1] = sMoves_ImpossibleToPredict,
sMoves_DependsOnTheBattlesFlow, [FACTORY_STYLE_WEATHER - 1] = sMoves_DependsOnTheBattlesFlow,
}; };
static void (* const sBattleFactoryFunctions[])(void) = static void (* const sBattleFactoryFunctions[])(void) =
{ {
InitFactoryChallenge, [BATTLE_FACTORY_FUNC_INIT] = InitFactoryChallenge,
GetBattleFactoryData, [BATTLE_FACTORY_FUNC_GET_DATA] = GetBattleFactoryData,
SetBattleFactoryData, [BATTLE_FACTORY_FUNC_SET_DATA] = SetBattleFactoryData,
sub_81A613C, [BATTLE_FACTORY_FUNC_SAVE] = SaveFactoryChallenge,
nullsub_75, [BATTLE_FACTORY_FUNC_NULL] = nullsub_75,
nullsub_123, [BATTLE_FACTORY_FUNC_NULL2] = nullsub_123,
SelectInitialRentalMons, [BATTLE_FACTORY_FUNC_SELECT_RENT_MONS] = SelectInitialRentalMons,
SwapRentalMons, [BATTLE_FACTORY_FUNC_SWAP_RENT_MONS] = SwapRentalMons,
SetPerformedRentalSwap, [BATTLE_FACTORY_FUNC_SET_SWAPPED] = SetPerformedRentalSwap,
SetRentalsToOpponentParty, [BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS] = SetRentalsToOpponentParty,
SetPlayerAndOpponentParties, [BATTLE_FACTORY_FUNC_SET_PARTIES] = SetPlayerAndOpponentParties,
SetOpponentGfxVar, [BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX] = SetOpponentGfxVar,
GenerateOpponentMons, [BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS] = GenerateOpponentMons,
GenerateInitialRentalMons, [BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS] = GenerateInitialRentalMons,
GetOpponentMostCommonMonType, [BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE] = GetOpponentMostCommonMonType,
GetOpponentBattleStyle, [BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE] = GetOpponentBattleStyle,
RestorePlayerPartyHeldItems, [BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS] = RestorePlayerPartyHeldItems,
}; };
static const u32 sWinStreakFlags[][2] = static const u32 sWinStreakFlags[][2] =
@@ -201,7 +203,7 @@ static void InitFactoryChallenge(void)
sPerformedRentalSwap = FALSE; sPerformedRentalSwap = FALSE;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
gSaveBlock2Ptr->frontier.rentalMons[i].monId = 0xFFFF; gSaveBlock2Ptr->frontier.rentalMons[i].monId = 0xFFFF;
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
gUnknown_03006298[i] = 0xFFFF; gUnknown_03006298[i] = 0xFFFF;
SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
@@ -215,13 +217,13 @@ static void GetBattleFactoryData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 1: case FACTORY_DATA_WIN_STREAK:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode]; gSpecialVar_Result = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode];
break; break;
case 2: case FACTORY_DATA_WIN_STREAK_ACTIVE:
gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0); gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0);
break; break;
case 3: case FACTORY_DATA_WIN_STREAK_SWAPS:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode]; gSpecialVar_Result = gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode];
break; break;
} }
@@ -234,16 +236,16 @@ static void SetBattleFactoryData(void)
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 1: case FACTORY_DATA_WIN_STREAK:
gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006;
break; break;
case 2: case FACTORY_DATA_WIN_STREAK_ACTIVE:
if (gSpecialVar_0x8006) if (gSpecialVar_0x8006)
gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode]; gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode];
else else
gSaveBlock2Ptr->frontier.winStreakActiveFlags &= sWinStreakMasks[battleMode][lvlMode]; gSaveBlock2Ptr->frontier.winStreakActiveFlags &= sWinStreakMasks[battleMode][lvlMode];
break; break;
case 3: case FACTORY_DATA_WIN_STREAK_SWAPS:
if (sPerformedRentalSwap == TRUE) if (sPerformedRentalSwap == TRUE)
{ {
gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode] = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.factoryRentsCount[battleMode][lvlMode] = gSpecialVar_0x8006;
@@ -253,7 +255,7 @@ static void SetBattleFactoryData(void)
} }
} }
static void sub_81A613C(void) static void SaveFactoryChallenge(void)
{ {
gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005; gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005;
VarSet(VAR_TEMP_0, 0); VarSet(VAR_TEMP_0, 0);
@@ -290,8 +292,8 @@ static void SetPerformedRentalSwap(void)
static void GenerateOpponentMons(void) static void GenerateOpponentMons(void)
{ {
int i, j, k; int i, j, k;
u16 species[3]; u16 species[FRONTIER_PARTY_SIZE];
u16 heldItems[3]; u16 heldItems[FRONTIER_PARTY_SIZE];
int firstMonId = 0; int firstMonId = 0;
u16 trainerId = 0; u16 trainerId = 0;
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
@@ -315,7 +317,7 @@ static void GenerateOpponentMons(void)
gSaveBlock2Ptr->frontier.trainerIds[gSaveBlock2Ptr->frontier.curChallengeBattleNum] = trainerId; gSaveBlock2Ptr->frontier.trainerIds[gSaveBlock2Ptr->frontier.curChallengeBattleNum] = trainerId;
i = 0; i = 0;
while (i != 3) while (i != FRONTIER_PARTY_SIZE)
{ {
u16 monSetId = GetMonSetId(lvlMode, challengeNum, FALSE); u16 monSetId = GetMonSetId(lvlMode, challengeNum, FALSE);
if (gFacilityTrainerMons[monSetId].species == SPECIES_UNOWN) if (gFacilityTrainerMons[monSetId].species == SPECIES_UNOWN)
@@ -369,7 +371,7 @@ static void SetRentalsToOpponentParty(void)
else else
gFacilityTrainerMons = gSlateportBattleTentMons; gFacilityTrainerMons = gSlateportBattleTentMons;
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i]; gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL); gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
@@ -407,7 +409,7 @@ static void SetPlayerAndOpponentParties(void)
if (gSpecialVar_0x8005 < 2) if (gSpecialVar_0x8005 < 2)
{ {
ZeroPlayerPartyMons(); ZeroPlayerPartyMons();
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
monSetId = gSaveBlock2Ptr->frontier.rentalMons[i].monId; monSetId = gSaveBlock2Ptr->frontier.rentalMons[i].monId;
ivs = gSaveBlock2Ptr->frontier.rentalMons[i].ivs; ivs = gSaveBlock2Ptr->frontier.rentalMons[i].ivs;
@@ -448,7 +450,7 @@ static void SetPlayerAndOpponentParties(void)
{ {
case 0: case 0:
case 2: case 2:
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
monSetId = gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId; monSetId = gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId;
ivs = gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs; ivs = gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs;
@@ -588,7 +590,7 @@ static void GetOpponentMostCommonMonType(void)
gFacilityTrainerMons = gBattleFrontierMons; gFacilityTrainerMons = gBattleFrontierMons;
for (i = 0; i < NUMBER_OF_MON_TYPES; i++) for (i = 0; i < NUMBER_OF_MON_TYPES; i++)
typesCount[i] = 0; typesCount[i] = 0;
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
u32 species = gFacilityTrainerMons[gUnknown_03006298[i]].species; u32 species = gFacilityTrainerMons[gUnknown_03006298[i]].species;
@@ -617,14 +619,14 @@ static void GetOpponentMostCommonMonType(void)
static void GetOpponentBattleStyle(void) static void GetOpponentBattleStyle(void)
{ {
u8 i, j, count; u8 i, j, count;
u8 stylePoints[8]; u8 stylePoints[FACTORY_NUM_STYLES];
count = 0; count = 0;
gFacilityTrainerMons = gBattleFrontierMons; gFacilityTrainerMons = gBattleFrontierMons;
for (i = 0; i < 8; i++) for (i = 0; i < FACTORY_NUM_STYLES; i++)
stylePoints[i] = 0; stylePoints[i] = 0;
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
u16 monSetId = gUnknown_03006298[i]; u16 monSetId = gUnknown_03006298[i];
for (j = 0; j < MAX_MON_MOVES; j++) for (j = 0; j < MAX_MON_MOVES; j++)
@@ -635,7 +637,7 @@ static void GetOpponentBattleStyle(void)
} }
gSpecialVar_Result = 0; gSpecialVar_Result = 0;
for (i = 1; i < 8; i++) for (i = 1; i < FACTORY_NUM_STYLES; i++)
{ {
if (stylePoints[i] >= sRequiredMoveCounts[i - 1]) if (stylePoints[i] >= sRequiredMoveCounts[i - 1])
{ {
@@ -644,8 +646,9 @@ static void GetOpponentBattleStyle(void)
} }
} }
// Has no singular style
if (count > 2) if (count > 2)
gSpecialVar_Result = 8; gSpecialVar_Result = FACTORY_NUM_STYLES;
} }
static u8 GetMoveBattleStyle(u16 move) static u8 GetMoveBattleStyle(u16 move)
@@ -655,13 +658,13 @@ static u8 GetMoveBattleStyle(u16 move)
for (i = 0; i < ARRAY_COUNT(sMoveStyles); i++) for (i = 0; i < ARRAY_COUNT(sMoveStyles); i++)
{ {
for (j = 0, moves = sMoveStyles[i]; moves[j] != 0; j++) for (j = 0, moves = sMoveStyles[i]; moves[j] != MOVE_NONE; j++)
{ {
if (moves[j] == move) if (moves[j] == move)
return i + 1; return i + 1;
} }
} }
return 0; return FACTORY_STYLE_NONE;
} }
bool8 InBattleFactory(void) bool8 InBattleFactory(void)
@@ -679,7 +682,7 @@ static void RestorePlayerPartyHeldItems(void)
else else
gFacilityTrainerMons = gSlateportBattleTentMons; gFacilityTrainerMons = gSlateportBattleTentMons;
for (i = 0; i < 3; i++) for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
{ {
SetMonData(&gPlayerParty[i], SetMonData(&gPlayerParty[i],
MON_DATA_HELD_ITEM, MON_DATA_HELD_ITEM,
@@ -703,8 +706,8 @@ u8 GetFactoryMonFixedIV(u8 arg0, u8 arg1)
void FillFactoryBrainParty(void) void FillFactoryBrainParty(void)
{ {
int i, j, k; int i, j, k;
u16 species[3]; u16 species[FRONTIER_PARTY_SIZE];
u16 heldItems[3]; u16 heldItems[FRONTIER_PARTY_SIZE];
u8 friendship; u8 friendship;
int monLevel; int monLevel;
u8 fixedIV; u8 fixedIV;
@@ -718,7 +721,7 @@ void FillFactoryBrainParty(void)
i = 0; i = 0;
otId = T1_READ_32(gSaveBlock2Ptr->playerTrainerId); otId = T1_READ_32(gSaveBlock2Ptr->playerTrainerId);
while (i != 3) while (i != FRONTIER_PARTY_SIZE)
{ {
u16 monSetId = GetMonSetId(lvlMode, challengeNum, FALSE); u16 monSetId = GetMonSetId(lvlMode, challengeNum, FALSE);
+62 -42
View File
@@ -14,34 +14,54 @@
#include "constants/trainers.h" #include "constants/trainers.h"
// This file's functions. // This file's functions.
static void sub_8195980(void); static void InitPalaceChallenge(void);
static void sub_8195A38(void); static void GetPalaceData(void);
static void sub_8195AE4(void); static void SetPalaceData(void);
static void sub_8195BB0(void); static void GetPalaceCommentId(void);
static void sub_8195C20(void); static void SetPalaceOpponent(void);
static void BufferOpponentIntroSpeech(void); static void BufferOpponentIntroSpeech(void);
static void sub_8195C7C(void); static void IncrementPalaceStreak(void);
static void sub_8195CE4(void); static void SavePalaceChallenge(void);
static void sub_8195D28(void); static void SetRandomPalacePrize(void);
static void sub_8195DB8(void); static void GivePalacePrize(void);
// Const rom data. // Const rom data.
static void (* const sBattlePalaceFunctions[])(void) = static void (* const sBattlePalaceFunctions[])(void) =
{ {
[BATTLE_PALACE_FUNC_0] = sub_8195980, [BATTLE_PALACE_FUNC_INIT] = InitPalaceChallenge,
[BATTLE_PALACE_FUNC_1] = sub_8195A38, [BATTLE_PALACE_FUNC_GET_DATA] = GetPalaceData,
[BATTLE_PALACE_FUNC_2] = sub_8195AE4, [BATTLE_PALACE_FUNC_SET_DATA] = SetPalaceData,
[BATTLE_PALACE_FUNC_3] = sub_8195BB0, [BATTLE_PALACE_FUNC_GET_COMMENT_ID] = GetPalaceCommentId,
[BATTLE_PALACE_FUNC_4] = sub_8195C20, [BATTLE_PALACE_FUNC_SET_OPPONENT] = SetPalaceOpponent,
[BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO] = BufferOpponentIntroSpeech, [BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO] = BufferOpponentIntroSpeech,
[BATTLE_PALACE_FUNC_6] = sub_8195C7C, [BATTLE_PALACE_FUNC_INCREMENT_STREAK] = IncrementPalaceStreak,
[BATTLE_PALACE_FUNC_7] = sub_8195CE4, [BATTLE_PALACE_FUNC_SAVE] = SavePalaceChallenge,
[BATTLE_PALACE_FUNC_8] = sub_8195D28, [BATTLE_PALACE_FUNC_SET_PRIZE] = SetRandomPalacePrize,
[BATTLE_PALACE_FUNC_9] = sub_8195DB8, [BATTLE_PALACE_FUNC_GIVE_PRIZE] = GivePalacePrize,
}; };
static const u16 gUnknown_0860DE78[] = {ITEM_HP_UP, ITEM_PROTEIN, ITEM_IRON, ITEM_CALCIUM, ITEM_CARBOS, ITEM_ZINC}; static const u16 sBattlePalaceEarlyPrizes[] =
static const u16 gUnknown_0860DE84[] = {ITEM_BRIGHT_POWDER, ITEM_WHITE_HERB, ITEM_QUICK_CLAW, ITEM_LEFTOVERS, ITEM_MENTAL_HERB, ITEM_KINGS_ROCK, ITEM_FOCUS_BAND, ITEM_SCOPE_LENS, ITEM_CHOICE_BAND}; {
ITEM_HP_UP,
ITEM_PROTEIN,
ITEM_IRON,
ITEM_CALCIUM,
ITEM_CARBOS,
ITEM_ZINC
};
static const u16 sBattlePalaceLatePrizes[] =
{
ITEM_BRIGHT_POWDER,
ITEM_WHITE_HERB,
ITEM_QUICK_CLAW,
ITEM_LEFTOVERS,
ITEM_MENTAL_HERB,
ITEM_KINGS_ROCK,
ITEM_FOCUS_BAND,
ITEM_SCOPE_LENS,
ITEM_CHOICE_BAND
};
static const u32 sWinStreakFlags[][2] = static const u32 sWinStreakFlags[][2] =
{ {
@@ -61,7 +81,7 @@ void CallBattlePalaceFunction(void)
sBattlePalaceFunctions[gSpecialVar_0x8004](); sBattlePalaceFunctions[gSpecialVar_0x8004]();
} }
static void sub_8195980(void) static void InitPalaceChallenge(void)
{ {
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
@@ -77,39 +97,39 @@ static void sub_8195980(void)
gTrainerBattleOpponent_A = 0; gTrainerBattleOpponent_A = 0;
} }
static void sub_8195A38(void) static void GetPalaceData(void)
{ {
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 0: case PALACE_DATA_PRIZE:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.field_DC6; gSpecialVar_Result = gSaveBlock2Ptr->frontier.palacePrize;
break; break;
case 1: case PALACE_DATA_WIN_STREAK:
gSpecialVar_Result = gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode]; gSpecialVar_Result = gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode];
break; break;
case 2: case PALACE_DATA_WIN_STREAK_ACTIVE:
gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0); gSpecialVar_Result = ((gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]) != 0);
break; break;
} }
} }
static void sub_8195AE4(void) static void SetPalaceData(void)
{ {
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
switch (gSpecialVar_0x8005) switch (gSpecialVar_0x8005)
{ {
case 0: case PALACE_DATA_PRIZE:
gSaveBlock2Ptr->frontier.field_DC6 = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.palacePrize = gSpecialVar_0x8006;
break; break;
case 1: case PALACE_DATA_WIN_STREAK:
gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006; gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = gSpecialVar_0x8006;
break; break;
case 2: case PALACE_DATA_WIN_STREAK_ACTIVE:
if (gSpecialVar_0x8006) if (gSpecialVar_0x8006)
gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode]; gSaveBlock2Ptr->frontier.winStreakActiveFlags |= sWinStreakFlags[battleMode][lvlMode];
else else
@@ -118,7 +138,7 @@ static void sub_8195AE4(void)
} }
} }
static void sub_8195BB0(void) static void GetPalaceCommentId(void)
{ {
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
@@ -131,7 +151,7 @@ static void sub_8195BB0(void)
gSpecialVar_Result = 4; gSpecialVar_Result = 4;
} }
static void sub_8195C20(void) static void SetPalaceOpponent(void)
{ {
gTrainerBattleOpponent_A = 5 *(Random() % 255) / 64u; gTrainerBattleOpponent_A = 5 *(Random() % 255) / 64u;
SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_A, 0); SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_A, 0);
@@ -143,7 +163,7 @@ static void BufferOpponentIntroSpeech(void)
FrontierSpeechToString(gFacilityTrainers[gTrainerBattleOpponent_A].speechBefore); FrontierSpeechToString(gFacilityTrainers[gTrainerBattleOpponent_A].speechBefore);
} }
static void sub_8195C7C(void) static void IncrementPalaceStreak(void)
{ {
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
@@ -158,7 +178,7 @@ static void sub_8195C7C(void)
} }
} }
static void sub_8195CE4(void) static void SavePalaceChallenge(void)
{ {
gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005; gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005;
VarSet(VAR_TEMP_0, 0); VarSet(VAR_TEMP_0, 0);
@@ -166,23 +186,23 @@ static void sub_8195CE4(void)
SaveGameFrontier(); SaveGameFrontier();
} }
static void sub_8195D28(void) static void SetRandomPalacePrize(void)
{ {
u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u32 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] > 41) if (gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] > 41)
gSaveBlock2Ptr->frontier.field_DC6 = gUnknown_0860DE84[Random() % ARRAY_COUNT(gUnknown_0860DE84)]; gSaveBlock2Ptr->frontier.palacePrize = sBattlePalaceLatePrizes[Random() % ARRAY_COUNT(sBattlePalaceLatePrizes)];
else else
gSaveBlock2Ptr->frontier.field_DC6 = gUnknown_0860DE78[Random() % ARRAY_COUNT(gUnknown_0860DE78)]; gSaveBlock2Ptr->frontier.palacePrize = sBattlePalaceEarlyPrizes[Random() % ARRAY_COUNT(sBattlePalaceEarlyPrizes)];
} }
static void sub_8195DB8(void) static void GivePalacePrize(void)
{ {
if (AddBagItem(gSaveBlock2Ptr->frontier.field_DC6, 1) == TRUE) if (AddBagItem(gSaveBlock2Ptr->frontier.palacePrize, 1) == TRUE)
{ {
CopyItemName(gSaveBlock2Ptr->frontier.field_DC6, gStringVar1); CopyItemName(gSaveBlock2Ptr->frontier.palacePrize, gStringVar1);
gSaveBlock2Ptr->frontier.field_DC6 = 0; gSaveBlock2Ptr->frontier.palacePrize = 0;
gSpecialVar_Result = TRUE; gSpecialVar_Result = TRUE;
} }
else else

Some files were not shown because too many files have changed in this diff Show More