diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-11-16 18:12:21 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-11-17 08:16:28 -0600 |
commit | 6ac7efb54f79a3ecd216cdc560bf2703b6c799c2 (patch) | |
tree | 16b81bf939ce3f96c513c6b63b4575a8148ce0f1 | |
parent | f7e17ca985fcc2b027a16d2cba30e6500e664207 (diff) |
Document Scotts House and begin frontier macros
28 files changed, 332 insertions, 286 deletions
diff --git a/asm/macros.inc b/asm/macros.inc index 7c35e059d..f6a143d7a 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -6,6 +6,7 @@ .include "asm/macros/ec.inc" .include "asm/macros/map.inc" .include "asm/macros/field_effect_script.inc" + .include "asm/macros/battle_frontier.inc" .macro region_map_entry x, y, width, height, name .byte \x diff --git a/asm/macros/battle_frontier.inc b/asm/macros/battle_frontier.inc new file mode 100644 index 000000000..8a5f369a3 --- /dev/null +++ b/asm/macros/battle_frontier.inc @@ -0,0 +1,35 @@ +@ To be populated with macros for the Battle Frontier CallFacilityFunction specials + + +@ Frontier Util + +.macro frontier_setlvlmode lvlmode:req +setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 +setvar VAR_0x8005, 1 +setvar VAR_0x8006, \lvlmode +special CallFrontierUtilFunc +.endm + +@ Battle Tower + +.macro battletower_getstreak +setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 +setvar VAR_0x8005, 1 +special CallBattleTowerFunc +.endm + +@ Battle Dome + +@ Battle Palace + +@ Battle Arena + +@ Battle Factory + +@ Battle Pike + +@ Battle Pyramid + +@ Battle Tent + +@ Apprentice diff --git a/asm/macros/event.inc b/asm/macros/event.inc index ba617f629..9db57daf1 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1655,6 +1655,7 @@ MSGBOX_DEFAULT = 4 MSGBOX_YESNO = 5 MSGBOX_AUTOCLOSE = 6 + MSGBOX_GETPOINTS = 9 YES = 1 NO = 0 diff --git a/data/event_scripts.s b/data/event_scripts.s index b521acdf8..9bde704c9 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1,9 +1,10 @@ #include "constants/global.h" #include "constants/battle.h" +#include "constants/battle_frontier.h" #include "constants/battle_pike.h" #include "constants/battle_pyramid.h" -#include "constants/battle_frontier.h" #include "constants/battle_setup.h" +#include "constants/battle_tower.h" #include "constants/berry.h" #include "constants/cable_club.h" #include "constants/coins.h" @@ -88,7 +89,7 @@ gStdScripts:: @ 81DC2A0 .4byte Std_MsgboxAutoclose .4byte Std_ObtainDecoration .4byte Std_RegisteredInMatchCall - .4byte Std_9 + .4byte Std_MsgboxGetPoints .4byte Std_10 gStdScripts_End:: @ 81DC2CC @@ -607,7 +608,7 @@ Std_MsgboxYesNo: @ 8271332 yesnobox 20, 8 return -Std_9: @ 827133C +Std_MsgboxGetPoints: @ 827133C message 0x0 playfanfare MUS_ME_POINTGET waitfanfare diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index f3f156a39..6eb7e515b 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -55,8 +55,8 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2574DC:: @ 82574DC goto BattleFrontier_BattleArenaBattleRoom_EventScript_2576B0 BattleFrontier_BattleArenaBattleRoom_EventScript_25752E:: @ 825752E - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 7 applymovement 7, BattleFrontier_BattleArenaBattleRoom_Movement_257BEF waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index d5b79b684..34feceb39 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -61,7 +61,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255CF8:: @ 8255CF8 msgbox BattleFrontier_BattleArenaLobby_Text_257353, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattleArenaLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS message BattleFrontier_BattleArenaLobby_Text_256931 waitmessage call BattleFrontier_BattleArenaLobby_EventScript_255D59 diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 60bca60cd..1ee9c29dc 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -78,9 +78,9 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BD82:: @ 824BD82 applymovement 13, BattleFrontier_BattleDomeBattleRoom_Movement_24C77B applymovement 15, BattleFrontier_BattleDomeBattleRoom_Movement_24C789 waitmovement 0 - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc msgbox gStringVar4, MSGBOX_DEFAULT closemessage setvar VAR_0x8004, 5 diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 5699d268c..12940496d 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -73,7 +73,7 @@ BattleFrontier_BattleDomeLobby_EventScript_2498C9:: @ 82498C9 msgbox BattleFrontier_BattleDomeLobby_Text_24ADB1, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattleDomeLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS message BattleFrontier_BattleDomeLobby_Text_24A5D6 waitmessage special LoadPlayerParty @@ -482,16 +482,17 @@ BattleFrontier_BattleDomeLobby_EventScript_249E10:: @ 8249E10 msgbox BattleFrontier_BattleDomeLobby_Text_24ACD3, MSGBOX_NPC end -BattleFrontier_OutsideWest_EventScript_249E19:: @ 8249E19 +@ A few OutsideWest event scripts are inserted here instead, two of which are unused +BattleFrontier_OutsideWest_EventScript_Man3:: @ 8249E19 msgbox BattleFrontier_OutsideWest_Text_24AB06, MSGBOX_NPC end -BattleFrontier_OutsideWest_EventScript_249E22:: @ 8249E22 - msgbox BattleFrontier_OutsideWest_Text_24AB44, MSGBOX_NPC +BattleFrontier_OutsideWest_EventScript_BattleDomeSign2:: @ 8249E22 + msgbox BattleFrontier_OutsideWest_Text_BattleDomeSign2, MSGBOX_NPC end -BattleFrontier_OutsideWest_EventScript_249E2B:: @ 8249E2B - msgbox BattleFrontier_OutsideWest_Text_24AB75, MSGBOX_NPC +BattleFrontier_OutsideWest_EventScript_UnderConstructionSign:: @ 8249E2B + msgbox BattleFrontier_OutsideWest_Text_QuestionMarkUnderConstruction, MSGBOX_NPC end BattleFrontier_BattleDomeLobby_EventScript_249E34:: @ 8249E34 @@ -699,11 +700,11 @@ BattleFrontier_OutsideWest_Text_24AB06: @ 824AB06 .string "The BATTLE FRONTIER…\n" .string "I've long dreamed about a place like it.$" -BattleFrontier_OutsideWest_Text_24AB44: @ 824AB44 +BattleFrontier_OutsideWest_Text_BattleDomeSign2: @ 824AB44 .string "The BATTLE DOME\n" .string "Become the Unbeatable Superstar!$" -BattleFrontier_OutsideWest_Text_24AB75: @ 824AB75 +BattleFrontier_OutsideWest_Text_QuestionMarkUnderConstruction: @ 824AB75 .string "The ??????\n" .string "Under Construction!$" diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index 7894dc558..cead1a1d7 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -69,7 +69,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2584C6:: @ 82584C6 msgbox BattleFrontier_BattleFactoryLobby_Text_2592BD, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattleFactoryLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS message BattleFrontier_BattleFactoryLobby_Text_259323 waitmessage setvar VAR_0x8004, FRONTIER_UTIL_FUNC_8 diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index a85cac041..94c21a6d0 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -54,8 +54,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8B5:: @ 824F8B5 waitmovement 0 BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8BF:: @ 824F8BF - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 2 applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1 waitmovement 0 diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 10a6761cb..649b20f87 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -61,7 +61,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D840:: @ 824D840 msgbox BattleFrontier_BattlePalaceLobby_Text_24EEB9, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattlePalaceLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS message BattleFrontier_BattlePalaceLobby_Text_24E4F7 waitmessage call BattleFrontier_BattlePalaceLobby_EventScript_24D8A1 diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index 23df44956..d145ba429 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -65,7 +65,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B78D:: @ 825B78D msgbox BattleFrontier_BattlePikeLobby_Text_25C3D9, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattlePikeLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS setvar VAR_0x8004, FRONTIER_UTIL_FUNC_8 special CallFrontierUtilFunc setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 4ec807768..0b30d96e3 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -78,7 +78,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA msgbox BattleFrontier_BattlePyramidLobby_Text_252662, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattlePyramidLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS message BattleFrontier_BattlePyramidLobby_Text_251A77 waitmessage setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_REWARD diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index 958c92c09..f2971d3a1 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -37,14 +37,14 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241B6C:: @ 8241B6C goto BattleFrontier_BattleTowerBattleRoom_EventScript_241C8F BattleFrontier_BattleTowerBattleRoom_EventScript_241BC3:: @ 8241BC3 - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 1 applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242182 waitmovement 0 - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc msgbox gStringVar4, MSGBOX_DEFAULT waitmessage call BattleFrontier_BattleTowerBattleRoom_EventScript_24210E @@ -57,17 +57,17 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_241C03:: @ 8241C03 setvar VAR_0x8005, 0 setvar VAR_0x8006, 4 special CallFrontierUtilFunc - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 3 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, 3 special sub_813BF7C goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8 BattleFrontier_BattleTowerBattleRoom_EventScript_241C2F:: @ 8241C2F call BattleFrontier_BattleTowerBattleRoom_EventScript_241EBA - setvar VAR_0x8004, 4 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_4 + special CallBattleTowerFunc switch VAR_RESULT case 7, BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6 applymovement 1, BattleFrontier_BattleTowerBattleRoom_Movement_242188 @@ -157,9 +157,9 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6:: @ 8241DF6 setvar VAR_0x8005, 0 setvar VAR_0x8006, 3 special CallFrontierUtilFunc - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 3 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, 3 special sub_813BF7C goto BattleFrontier_BattleTowerBattleRoom_EventScript_2421B8 @@ -167,9 +167,9 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241DF6:: @ 8241DF6 BattleFrontier_BattleTowerBattleRoom_EventScript_241E22:: @ 8241E22 message BattleFrontier_BattleTowerBattleRoom_Text_242426 waitmessage - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 2 - special sub_8161F74 + special CallBattleTowerFunc playse SE_SAVE waitse fadescreen 1 @@ -376,8 +376,8 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_24210E:: @ 824210E special CallFrontierUtilFunc BattleFrontier_BattleTowerBattleRoom_EventScript_24215A:: @ 824215A - setvar VAR_0x8004, 15 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_15 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_1 setvar VAR_0x8005, 5 special CallFrontierUtilFunc @@ -506,8 +506,8 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_2421F2:: @ 82421F2 end BattleFrontier_BattleTowerBattleRoom_EventScript_2421FC:: @ 82421FC - setvar VAR_0x8004, 13 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_13 + special CallBattleTowerFunc warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc index d5c990623..e280edbe7 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc @@ -12,8 +12,8 @@ BattleFrontier_BattleTowerBattleRoom2_MapScript1_248EF8: @ 8248EF8 end BattleFrontier_BattleTowerBattleRoom2_EventScript_248F0F:: @ 8248F0F - setvar VAR_0x8004, 14 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_14 + special CallBattleTowerFunc checkplayergender compare VAR_RESULT, FEMALE goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_248F29 @@ -63,8 +63,8 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248F4D:: @ 8248F4D goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249143 BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4 - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 1 addobject 4 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249528 @@ -72,17 +72,17 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4 waitmovement 0 compare VAR_FRONTIER_BATTLE_MODE, 3 goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_249026 - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc delay 15 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 waitmovement 0 msgbox gStringVar4, MSGBOX_DEFAULT waitmessage - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 waitmovement 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -90,18 +90,18 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248FB4:: @ 8248FB4 goto BattleFrontier_BattleTowerBattleRoom2_EventScript_249069 BattleFrontier_BattleTowerBattleRoom2_EventScript_249026:: @ 8249026 - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc delay 15 applymovement 1, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 waitmovement 0 messageautoscroll 0x2021fc4 waitmessage delay 48 - setvar VAR_0x8004, 7 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_7 setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249545 waitmovement 0 messageautoscroll 0x2021fc4 @@ -118,17 +118,17 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_24907E:: @ 824907E setvar VAR_0x8005, 0 setvar VAR_0x8006, 4 special CallFrontierUtilFunc - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 3 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, 3 special sub_813BF7C goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8 BattleFrontier_BattleTowerBattleRoom2_EventScript_2490AA:: @ 82490AA call BattleFrontier_BattleTowerBattleRoom2_EventScript_241EBA - setvar VAR_0x8004, 4 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_4 + special CallBattleTowerFunc switch VAR_RESULT case 7, BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF applymovement 4, BattleFrontier_BattleTowerBattleRoom2_Movement_249534 @@ -235,9 +235,9 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF:: @ 82492AF setvar VAR_0x8005, 0 setvar VAR_0x8006, 3 special CallFrontierUtilFunc - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 3 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, 3 special sub_813BF7C goto BattleFrontier_BattleTowerBattleRoom2_EventScript_2421B8 @@ -245,9 +245,9 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2492AF:: @ 82492AF BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB:: @ 82492DB message BattleFrontier_BattleTowerBattleRoom2_Text_242426 waitmessage - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 2 - special sub_8161F74 + special CallBattleTowerFunc playse SE_SAVE waitse fadescreen 1 diff --git a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc index 786f1fa3e..a53cac0c5 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc @@ -12,8 +12,8 @@ BattleFrontier_BattleTowerCorridor2_MapScript1_248D5A: @ 8248D5A end BattleFrontier_BattleTowerCorridor2_EventScript_248D71:: @ 8248D71 - setvar VAR_0x8004, 14 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_14 + special CallBattleTowerFunc checkplayergender compare VAR_RESULT, FEMALE goto_if_eq BattleFrontier_BattleTowerCorridor2_EventScript_248D8B diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 2936218d8..9881def31 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -56,14 +56,14 @@ BattleFrontier_BattleTowerLobby_EventScript_23E710:: @ 823E710 faceplayer msgbox BattleFrontier_BattleTowerLobby_Text_23F583, MSGBOX_DEFAULT closemessage - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 1 setvar VAR_0x8006, 0 - special sub_8161F74 - setvar VAR_0x8004, 2 + special CallBattleTowerFunc + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 0 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 setvar VAR_0x8005, 0 setvar VAR_0x8006, 0 @@ -87,8 +87,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23E778:: @ 823E778 msgbox BattleFrontier_BattleTowerLobby_Text_241486, MSGBOX_DEFAULT BattleFrontier_BattleTowerLobby_EventScript_23E780:: @ 823E780 - setvar VAR_0x8004, 5 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_GIVE_RIBBONS + special CallBattleTowerFunc compare VAR_RESULT, 0 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23E7A5 message BattleFrontier_BattleTowerLobby_Text_23F844 @@ -101,11 +101,11 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7A5:: @ 823E7A5 msgbox BattleFrontier_BattleTowerLobby_Text_2414D4, MSGBOX_DEFAULT setvar VAR_0x8004, FRONTIER_UTIL_FUNC_11 special CallFrontierUtilFunc - msgbox BattleFrontier_BattleTowerLobby_Text_241520, 9 + msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS call BattleFrontier_BattleTowerLobby_EventScript_23E84D - setvar VAR_0x8004, 1 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc compare VAR_RESULT, 49 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E7E2 msgbox BattleFrontier_BattleTowerLobby_Text_23F79D, MSGBOX_DEFAULT @@ -121,17 +121,17 @@ BattleFrontier_BattleTowerLobby_EventScript_23E7F2:: @ 823E7F2 compare VAR_FRONTIER_BATTLE_MODE, 2 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E81E goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerLobby_EventScript_23E81E - setvar VAR_0x8004, 1 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_1 setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc compare VAR_RESULT, 0 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23E830 BattleFrontier_BattleTowerLobby_EventScript_23E81E:: @ 823E81E - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 0 - special sub_8161F74 + special CallBattleTowerFunc BattleFrontier_BattleTowerLobby_EventScript_23E830:: @ 823E830 lock @@ -152,9 +152,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23E84D:: @ 823E84D special CallFrontierUtilFunc special LoadPlayerParty special HealPlayerParty - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc playse SE_SAVE waitse call BattleFrontier_BattleTowerLobby_EventScript_23E8E0 @@ -218,9 +218,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23E8EE:: @ 823E8EE waitmessage message BattleFrontier_BattleTowerLobby_Text_23F754 waitmessage - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc playse SE_SAVE waitse setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 @@ -287,12 +287,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A setvar VAR_0x8005, 4 special CallFrontierUtilFunc setvar VAR_TEMP_0, 0 - setvar VAR_0x8004, 0 - special sub_8161F74 - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 + special CallBattleTowerFunc + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 1 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 setvar VAR_0x8005, 3 setvar VAR_0x8006, 0 @@ -367,12 +367,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93 setvar VAR_0x8005, 4 special CallFrontierUtilFunc setvar VAR_TEMP_0, 0 - setvar VAR_0x8004, 0 - special sub_8161F74 - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 + special CallBattleTowerFunc + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 1 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 setvar VAR_0x8005, 3 setvar VAR_0x8006, 0 @@ -448,12 +448,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF setvar VAR_0x8005, 4 special CallFrontierUtilFunc setvar VAR_TEMP_0, 0 - setvar VAR_0x8004, 0 - special sub_8161F74 - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 + special CallBattleTowerFunc + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 1 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 setvar VAR_0x8005, 3 setvar VAR_0x8006, 0 @@ -528,12 +528,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68 setvar VAR_0x8005, 4 special CallFrontierUtilFunc setvar VAR_TEMP_0, 0 - setvar VAR_0x8004, 0 - special sub_8161F74 - setvar VAR_0x8004, 2 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_0 + special CallBattleTowerFunc + setvar VAR_0x8004, BATTLE_TOWER_FUNC_2 setvar VAR_0x8005, 2 setvar VAR_0x8006, 1 - special sub_8161F74 + special CallBattleTowerFunc setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 setvar VAR_0x8005, 3 setvar VAR_0x8006, 0 @@ -541,9 +541,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68 special LoadPlayerParty closemessage delay 2 - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 @@ -738,8 +738,8 @@ BattleFrontier_BattleTowerLobby_EventScript_23F0F3:: @ 823F0F3 setvar VAR_RESULT, 0 BattleFrontier_BattleTowerLobby_EventScript_23F108:: @ 823F108 - setvar VAR_0x8004, 12 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_12 + special CallBattleTowerFunc delay 1 compare VAR_RESULT, 6 goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_23F108 @@ -998,9 +998,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3AF:: @ 823F3AF setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 message BattleFrontier_BattleTowerLobby_Text_24144D waitmessage - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc special sub_80A08CC waitstate playse SE_SAVE @@ -1061,9 +1061,9 @@ BattleFrontier_BattleTowerLobby_EventScript_23F496:: @ 823F496 setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 message BattleFrontier_BattleTowerLobby_Text_24144D waitmessage - setvar VAR_0x8004, 6 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_SAVE setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc special sub_80A08CC waitstate playse SE_SAVE @@ -1529,13 +1529,7 @@ BattleFrontier_BattleTowerLobby_Text_2414D4: @ 82414D4 .string "In recognition of your infinite talent,\n" .string "we award you these Battle Point(s).$" -BattleFrontier_BattleArenaLobby_Text_241520: @ 8241520 -BattleFrontier_BattleDomeLobby_Text_241520: @ 8241520 -BattleFrontier_BattleFactoryLobby_Text_241520: @ 8241520 -BattleFrontier_BattlePalaceLobby_Text_241520: @ 8241520 -BattleFrontier_BattlePikeLobby_Text_241520: @ 8241520 -BattleFrontier_BattlePyramidLobby_Text_241520: @ 8241520 -BattleFrontier_BattleTowerLobby_Text_241520: @ 8241520 +BattleFrontier_Text_ObtainedXBattlePoints: @ 8241520 .string "{PLAYER} obtained {STR_VAR_1} Battle Point(s).$" BattleFrontier_BattleTowerLobby_Text_241540: @ 8241540 diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index c26a8098e..9da5e6a14 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -20,8 +20,8 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0 clearflag FLAG_HIDE_BATTLE_TOWER_MULTI_BATTLE_PARTNER_6 setflag FLAG_HIDE_BATTLE_TOWER_MULTI_BATTLE_PARTNER_ALT_1 setflag FLAG_HIDE_BATTLE_TOWER_MULTI_BATTLE_PARTNER_ALT_2 - setvar VAR_0x8004, 10 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_10 + special CallBattleTowerFunc end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243DDA:: @ 8243DDA @@ -166,27 +166,27 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243F29:: @ 8243F29 BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243F36:: @ 8243F36 goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3 - setvar VAR_0x8004, 11 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_11 setvar VAR_0x8005, 0 - special sub_8161F74 + special CallBattleTowerFunc waitmessage waitbuttonpress - setvar VAR_0x8004, 11 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_11 setvar VAR_0x8005, 1 - special sub_8161F74 + special CallBattleTowerFunc waitmessage waitbuttonpress - setvar VAR_0x8004, 11 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_11 setvar VAR_0x8005, 2 - special sub_8161F74 + special CallBattleTowerFunc waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT case 1, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3 case MULTI_B_PRESSED, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3 - setvar VAR_0x8004, 11 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_11 setvar VAR_0x8005, 3 - special sub_8161F74 + special CallBattleTowerFunc waitmessage waitbuttonpress closemessage @@ -202,9 +202,9 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243F36:: @ 8243F36 end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243FC3:: @ 8243FC3 - setvar VAR_0x8004, 11 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_11 setvar VAR_0x8005, 4 - special sub_8161F74 + special CallBattleTowerFunc waitmessage waitbuttonpress release diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index ce7a941c3..e892ad3ea 100644 --- a/data/maps/BattleFrontier_Lounge3/scripts.inc +++ b/data/maps/BattleFrontier_Lounge3/scripts.inc @@ -130,7 +130,7 @@ BattleFrontier_Lounge3_EventScript_WonChallenge:: @ 8261F2E call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet10 compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15 call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet15 - msgbox BattleFrontier_Lounge3_Text_ObtainedBattlePoints, 9 + msgbox BattleFrontier_Lounge3_Text_ObtainedBattlePoints, MSGBOX_GETPOINTS special GiveFrontierBattlePoints msgbox BattleFrontier_Lounge3_Text_ThinkOfMeForAnotherChallenge, MSGBOX_DEFAULT setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING diff --git a/data/maps/BattleFrontier_ScottsHouse/map.json b/data/maps/BattleFrontier_ScottsHouse/map.json index bff7696b3..13cb13dd4 100644 --- a/data/maps/BattleFrontier_ScottsHouse/map.json +++ b/data/maps/BattleFrontier_ScottsHouse/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_ScottsHouse_EventScript_2636A8", + "script": "BattleFrontier_ScottsHouse_EventScript_Scott", "flag": "0" } ], diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index 4f5ab96af..c2f7b3fbc 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -1,252 +1,232 @@ BattleFrontier_ScottsHouse_MapScripts:: @ 82636A7 .byte 0 -BattleFrontier_ScottsHouse_EventScript_2636A8:: @ 82636A8 +BattleFrontier_ScottsHouse_EventScript_Scott:: @ 82636A8 lock faceplayer - goto_if_set FLAG_TEMP_4, BattleFrontier_ScottsHouse_EventScript_2637DA - goto_if_set FLAG_TEMP_3, BattleFrontier_ScottsHouse_EventScript_2638AA - goto_if_set FLAG_TEMP_2, BattleFrontier_ScottsHouse_EventScript_263939 - goto BattleFrontier_ScottsHouse_EventScript_2636CB + goto_if_set FLAG_TEMP_4, BattleFrontier_ScottsHouse_EventScript_GivenBerry + goto_if_set FLAG_TEMP_3, BattleFrontier_ScottsHouse_EventScript_GivenShield + goto_if_set FLAG_TEMP_2, BattleFrontier_ScottsHouse_EventScript_GivenBattlePoints + goto BattleFrontier_ScottsHouse_EventScript_CheckGiveItems end -BattleFrontier_ScottsHouse_EventScript_2636CB:: @ 82636CB - goto_if_unset FLAG_SCOTT_GIVES_BATTLE_POINTS, BattleFrontier_ScottsHouse_EventScript_263943 - goto_if_unset FLAG_COLLECTED_ALL_SILVER_SYMBOLS, BattleFrontier_ScottsHouse_EventScript_263704 - goto_if_unset FLAG_RECEIVED_STARF_BERRY_FROM_SCOTT, BattleFrontier_ScottsHouse_EventScript_26376A - goto BattleFrontier_ScottsHouse_EventScript_2636EC +BattleFrontier_ScottsHouse_EventScript_CheckGiveItems:: @ 82636CB + goto_if_unset FLAG_SCOTT_GIVES_BATTLE_POINTS, BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier + goto_if_unset FLAG_COLLECTED_ALL_SILVER_SYMBOLS, BattleFrontier_ScottsHouse_EventScript_CheckSilverSymbols + goto_if_unset FLAG_COLLECTED_ALL_GOLD_SYMBOLS, BattleFrontier_ScottsHouse_EventScript_CheckGoldSymbols + goto BattleFrontier_ScottsHouse_EventScript_CheckGiveShield end -BattleFrontier_ScottsHouse_EventScript_2636EC:: @ 82636EC - goto_if_unset FLAG_RECEIVED_SILVER_SHIELD, BattleFrontier_ScottsHouse_EventScript_26381B - goto_if_unset FLAG_RECEIVED_GOLD_SHIELD, BattleFrontier_ScottsHouse_EventScript_2638B4 - goto BattleFrontier_ScottsHouse_EventScript_2637E4 +BattleFrontier_ScottsHouse_EventScript_CheckGiveShield:: @ 82636EC + goto_if_unset FLAG_RECEIVED_SILVER_SHIELD, BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield + goto_if_unset FLAG_RECEIVED_GOLD_SHIELD, BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield + goto BattleFrontier_ScottsHouse_EventScript_RandomComment end -BattleFrontier_ScottsHouse_EventScript_263704:: @ 8263704 - goto_if_unset FLAG_SYS_TOWER_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_DOME_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PALACE_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_ARENA_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_FACTORY_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PIKE_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PYRAMID_SILVER, BattleFrontier_ScottsHouse_EventScript_2636EC - msgbox BattleFrontier_ScottsHouse_Text_2640BC, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_CheckSilverSymbols:: @ 8263704 + goto_if_unset FLAG_SYS_TOWER_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_DOME_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PALACE_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_ARENA_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_FACTORY_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PIKE_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PYRAMID_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllSilverSymbols, MSGBOX_DEFAULT giveitem_std ITEM_LANSAT_BERRY - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_2637D0 + compare VAR_RESULT, FALSE + goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull setflag FLAG_COLLECTED_ALL_SILVER_SYMBOLS setflag FLAG_TEMP_4 release end -BattleFrontier_ScottsHouse_EventScript_26376A:: @ 826376A - goto_if_unset FLAG_SYS_TOWER_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_DOME_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PALACE_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_ARENA_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_FACTORY_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PIKE_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - goto_if_unset FLAG_SYS_PYRAMID_GOLD, BattleFrontier_ScottsHouse_EventScript_2636EC - msgbox BattleFrontier_ScottsHouse_Text_264216, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_CheckGoldSymbols:: @ 826376A + goto_if_unset FLAG_SYS_TOWER_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_DOME_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PALACE_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_ARENA_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_FACTORY_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PIKE_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + goto_if_unset FLAG_SYS_PYRAMID_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield + msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllGoldSymbols, MSGBOX_DEFAULT giveitem_std ITEM_STARF_BERRY - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_2637D0 - setflag FLAG_RECEIVED_STARF_BERRY_FROM_SCOTT + compare VAR_RESULT, FALSE + goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull + setflag FLAG_COLLECTED_ALL_GOLD_SYMBOLS setflag FLAG_TEMP_4 release end -BattleFrontier_ScottsHouse_EventScript_2637D0:: @ 82637D0 - msgbox BattleFrontier_ScottsHouse_Text_2643EB, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_BerryPocketFull:: @ 82637D0 + msgbox BattleFrontier_ScottsHouse_Text_BerryPocketStuffed, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_2637DA:: @ 82637DA - msgbox BattleFrontier_ScottsHouse_Text_264373, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_GivenBerry:: @ 82637DA + msgbox BattleFrontier_ScottsHouse_Text_SoGladIBroughtYouHere, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_2637E4:: @ 82637E4 +BattleFrontier_ScottsHouse_EventScript_RandomComment:: @ 82637E4 random 3 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_263807 + goto_if_eq BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_263811 - msgbox BattleFrontier_ScottsHouse_Text_263DDD, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment + msgbox BattleFrontier_ScottsHouse_Text_WhyIGoSeekingTrainers, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_263807:: @ 8263807 - msgbox BattleFrontier_ScottsHouse_Text_263F12, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment:: @ 8263807 + msgbox BattleFrontier_ScottsHouse_Text_HaveYouMetFrontierBrain, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_263811:: @ 8263811 - msgbox BattleFrontier_ScottsHouse_Text_263FFE, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment:: @ 8263811 + msgbox BattleFrontier_ScottsHouse_Text_MayFindWildMonsInFrontier, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_26381B:: @ 826381B +BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield:: @ 826381B setvar VAR_FRONTIER_BATTLE_MODE, 0 - setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 - setvar VAR_0x8005, 1 - setvar VAR_0x8006, 0 - special CallFrontierUtilFunc - setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 - special sub_8161F74 + frontier_setlvlmode FRONTIER_LVL_50 + battletower_getstreak compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_26387A - setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 - setvar VAR_0x8005, 1 - setvar VAR_0x8006, 1 - special CallFrontierUtilFunc - setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 - special sub_8161F74 + goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + frontier_setlvlmode FRONTIER_LVL_OPEN + battletower_getstreak compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_26387A - goto BattleFrontier_ScottsHouse_EventScript_2637E4 + goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + goto BattleFrontier_ScottsHouse_EventScript_RandomComment end -BattleFrontier_ScottsHouse_EventScript_26387A:: @ 826387A - msgbox BattleFrontier_ScottsHouse_Text_264412, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_GiveSilverShield:: @ 826387A + msgbox BattleFrontier_ScottsHouse_Text_Beat50TrainersInARow, MSGBOX_DEFAULT givedecoration_std DECOR_SILVER_SHIELD - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_2638A0 + compare VAR_RESULT, FALSE + goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_SILVER_SHIELD setflag FLAG_TEMP_3 - goto BattleFrontier_ScottsHouse_EventScript_2638AA + goto BattleFrontier_ScottsHouse_EventScript_GivenShield end -BattleFrontier_ScottsHouse_EventScript_2638A0:: @ 82638A0 - msgbox BattleFrontier_ScottsHouse_Text_264583, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_NoRoomForShield:: @ 82638A0 + msgbox BattleFrontier_ScottsHouse_Text_ComeBackForThisLater, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_2638AA:: @ 82638AA - msgbox BattleFrontier_ScottsHouse_Text_264546, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_GivenShield:: @ 82638AA + msgbox BattleFrontier_ScottsHouse_Text_ExpectingToHearEvenGreaterThings, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_2638B4:: @ 82638B4 +BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield:: @ 82638B4 setvar VAR_FRONTIER_BATTLE_MODE, 0 - setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 - setvar VAR_0x8005, 1 - setvar VAR_0x8006, 0 - special CallFrontierUtilFunc - setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 - special sub_8161F74 + frontier_setlvlmode FRONTIER_LVL_50 + battletower_getstreak compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_263913 - setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2 - setvar VAR_0x8005, 1 - setvar VAR_0x8006, 1 - special CallFrontierUtilFunc - setvar VAR_0x8004, 1 - setvar VAR_0x8005, 1 - special sub_8161F74 + goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + frontier_setlvlmode FRONTIER_LVL_OPEN + battletower_getstreak compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_263913 - goto BattleFrontier_ScottsHouse_EventScript_2637E4 + goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + goto BattleFrontier_ScottsHouse_EventScript_RandomComment end -BattleFrontier_ScottsHouse_EventScript_263913:: @ 8263913 - msgbox BattleFrontier_ScottsHouse_Text_26449F, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_GiveGoldShield:: @ 8263913 + msgbox BattleFrontier_ScottsHouse_Text_Beat100TrainersInARow, MSGBOX_DEFAULT givedecoration_std DECOR_GOLD_SHIELD - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_2638A0 + compare VAR_RESULT, FALSE + goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_GOLD_SHIELD setflag FLAG_TEMP_3 - goto BattleFrontier_ScottsHouse_EventScript_2638AA + goto BattleFrontier_ScottsHouse_EventScript_GivenShield end -BattleFrontier_ScottsHouse_EventScript_263939:: @ 8263939 - msgbox BattleFrontier_ScottsHouse_Text_263DB8, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_GivenBattlePoints:: @ 8263939 + msgbox BattleFrontier_ScottsHouse_Text_ExpectingGreatThings, MSGBOX_DEFAULT release end -BattleFrontier_ScottsHouse_EventScript_263943:: @ 8263943 - msgbox BattleFrontier_ScottsHouse_Text_263A3F, MSGBOX_DEFAULT +BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier:: @ 8263943 + msgbox BattleFrontier_ScottsHouse_Text_WelcomeToBattleFrontier, MSGBOX_DEFAULT closemessage delay 30 compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_263A13 + call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_263A1E + call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_ScottsHouse_EventScript_263A29 + call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_ScottsHouse_EventScript_263A34 - msgbox BattleFrontier_ScottsHouse_Text_263B29, MSGBOX_DEFAULT + call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest + msgbox BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal, MSGBOX_DEFAULT applymovement 1, Common_Movement_FacePlayer waitmovement 0 - msgbox BattleFrontier_ScottsHouse_Text_263BD4, MSGBOX_DEFAULT + msgbox BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing, MSGBOX_DEFAULT compare VAR_SCOTT_STATE, 13 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_2639BC + goto_if_eq BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints compare VAR_SCOTT_STATE, 9 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_2639CB + goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints compare VAR_SCOTT_STATE, 6 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_2639DA - goto BattleFrontier_ScottsHouse_EventScript_2639E9 + goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints + goto BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint end -BattleFrontier_ScottsHouse_EventScript_2639BC:: @ 82639BC +BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints:: @ 82639BC buffernumberstring 0, 4 setvar VAR_0x8004, 4 - goto BattleFrontier_ScottsHouse_EventScript_2639F8 + goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end -BattleFrontier_ScottsHouse_EventScript_2639CB:: @ 82639CB +BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints:: @ 82639CB buffernumberstring 0, 3 setvar VAR_0x8004, 3 - goto BattleFrontier_ScottsHouse_EventScript_2639F8 + goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end -BattleFrontier_ScottsHouse_EventScript_2639DA:: @ 82639DA +BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints:: @ 82639DA buffernumberstring 0, 2 setvar VAR_0x8004, 2 - goto BattleFrontier_ScottsHouse_EventScript_2639F8 + goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end -BattleFrontier_ScottsHouse_EventScript_2639E9:: @ 82639E9 +BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint:: @ 82639E9 buffernumberstring 0, 1 setvar VAR_0x8004, 1 - goto BattleFrontier_ScottsHouse_EventScript_2639F8 + goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end -BattleFrontier_ScottsHouse_EventScript_2639F8:: @ 82639F8 +BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints:: @ 82639F8 special GiveFrontierBattlePoints - msgbox BattleFrontier_ScottsHouse_Text_263CB0, 9 - msgbox BattleFrontier_ScottsHouse_Text_263CD0, MSGBOX_DEFAULT + msgbox BattleFrontier_ScottsHouse_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS + msgbox BattleFrontier_ScottsHouse_Text_ExplainBattlePoints, MSGBOX_DEFAULT setflag FLAG_SCOTT_GIVES_BATTLE_POINTS setflag FLAG_TEMP_2 release end -BattleFrontier_ScottsHouse_EventScript_263A13:: @ 8263A13 +BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth:: @ 8263A13 applymovement 1, Common_Movement_WalkInPlaceFastestUp waitmovement 0 return -BattleFrontier_ScottsHouse_EventScript_263A1E:: @ 8263A1E +BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth:: @ 8263A1E applymovement 1, Common_Movement_WalkInPlaceFastestDown waitmovement 0 return -BattleFrontier_ScottsHouse_EventScript_263A29:: @ 8263A29 +BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast:: @ 8263A29 applymovement 1, Common_Movement_WalkInPlaceFastestRight waitmovement 0 return -BattleFrontier_ScottsHouse_EventScript_263A34:: @ 8263A34 +BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest:: @ 8263A34 applymovement 1, Common_Movement_WalkInPlaceFastestLeft waitmovement 0 return -BattleFrontier_ScottsHouse_Text_263A3F: @ 8263A3F +BattleFrontier_ScottsHouse_Text_WelcomeToBattleFrontier: @ 8263A3F .string "SCOTT: Well, hello and welcome!\n" .string "Heheh… Sorry about the cramped space.\p" .string "Anyway, {PLAYER}{KUN}, let me formally\n" @@ -255,7 +235,7 @@ BattleFrontier_ScottsHouse_Text_263A3F: @ 8263A3F .string "It took me years and years, but I've\l" .string "finally given shape to my dream.$" -BattleFrontier_ScottsHouse_Text_263B29: @ 8263B29 +BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal: @ 8263B29 .string "On reflection, it was a terribly long\n" .string "journey…\p" .string "I left home alone on a quest to find\n" @@ -263,7 +243,7 @@ BattleFrontier_ScottsHouse_Text_263B29: @ 8263B29 .string "No one can imagine how much effort\n" .string "or time it took to make this real.$" -BattleFrontier_ScottsHouse_Text_263BD4: @ 8263BD4 +BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing: @ 8263BD4 .string "But that's all in the past.\n" .string "No point dwelling on that!\p" .string "All I want for you is to enjoy battling\n" @@ -272,11 +252,11 @@ BattleFrontier_ScottsHouse_Text_263BD4: @ 8263BD4 .string "as a memento for all the time our\l" .string "paths crossed on our journeys.$" -BattleFrontier_ScottsHouse_Text_263CB0: @ 8263CB0 +BattleFrontier_ScottsHouse_Text_ObtainedXBattlePoints: @ 8263CB0 .string "{PLAYER} obtained\n" .string "{STR_VAR_1} Battle Point(s).$" -BattleFrontier_ScottsHouse_Text_263CD0: @ 8263CD0 +BattleFrontier_ScottsHouse_Text_ExplainBattlePoints: @ 8263CD0 .string "SCOTT: You can check your Battle\n" .string "Points on your FRONTIER PASS.\p" .string "The more success you have here at\n" @@ -285,10 +265,10 @@ BattleFrontier_ScottsHouse_Text_263CD0: @ 8263CD0 .string "Use your Battle Points the way you\n" .string "see fit, like trading them for items.$" -BattleFrontier_ScottsHouse_Text_263DB8: @ 8263DB8 +BattleFrontier_ScottsHouse_Text_ExpectingGreatThings: @ 8263DB8 .string "I'm expecting great things from you!$" -BattleFrontier_ScottsHouse_Text_263DDD: @ 8263DDD +BattleFrontier_ScottsHouse_Text_WhyIGoSeekingTrainers: @ 8263DDD .string "SCOTT: Every TRAINER is an individual.\n" .string "They all lead lives of their own.\p" .string "But when they're in a battle,\n" @@ -300,7 +280,7 @@ BattleFrontier_ScottsHouse_Text_263DDD: @ 8263DDD .string "TRAINERS who are serious about\l" .string "battling, and invite them here.$" -BattleFrontier_ScottsHouse_Text_263F12: @ 8263F12 +BattleFrontier_ScottsHouse_Text_HaveYouMetFrontierBrain: @ 8263F12 .string "SCOTT: Have you met any of\n" .string "the FRONTIER BRAINS?\p" .string "Better yet, have you obtained any\n" @@ -310,7 +290,7 @@ BattleFrontier_ScottsHouse_Text_263F12: @ 8263F12 .string "But I'm sure that seeing how tough\n" .string "you are will startle even them!$" -BattleFrontier_ScottsHouse_Text_263FFE: @ 8263FFE +BattleFrontier_ScottsHouse_Text_MayFindWildMonsInFrontier: @ 8263FFE .string "SCOTT: You don't just train for battle,\n" .string "right?\p" .string "I think I remember you working on\n" @@ -320,7 +300,7 @@ BattleFrontier_ScottsHouse_Text_263FFE: @ 8263FFE .string "the BATTLE FRONTIER somewhere…\l" .string "Fufufu!$" -BattleFrontier_ScottsHouse_Text_2640BC: @ 82640BC +BattleFrontier_ScottsHouse_Text_YouveCollectedAllSilverSymbols: @ 82640BC .string "SCOTT: Are you enjoying things in\n" .string "the BATTLE FRONTIER?\p" .string "…Wait a second…\n" @@ -335,7 +315,7 @@ BattleFrontier_ScottsHouse_Text_2640BC: @ 82640BC .string "I want you to have this.\n" .string "I'm sure you can put it to proper use.$" -BattleFrontier_ScottsHouse_Text_264216: @ 8264216 +BattleFrontier_ScottsHouse_Text_YouveCollectedAllGoldSymbols: @ 8264216 .string "SCOTT: I hope you're enjoying\n" .string "everything in the BATTLE FRONTIER.\p" .string "…Wait a second…\n" @@ -350,35 +330,35 @@ BattleFrontier_ScottsHouse_Text_264216: @ 8264216 .string "I think you will be able to\n" .string "appreciate the value of my gift!$" -BattleFrontier_ScottsHouse_Text_264373: @ 8264373 +BattleFrontier_ScottsHouse_Text_SoGladIBroughtYouHere: @ 8264373 .string "I must say I have the gift of knowing\n" .string "a good TRAINER when I see one.\p" .string "I'm so glad I had the foresight to\n" .string "bring you here!$" -BattleFrontier_ScottsHouse_Text_2643EB: @ 82643EB +BattleFrontier_ScottsHouse_Text_BerryPocketStuffed: @ 82643EB .string "Your BERRY POCKET seems to\n" .string "be stuffed.$" -BattleFrontier_ScottsHouse_Text_264412: @ 8264412 +BattleFrontier_ScottsHouse_Text_Beat50TrainersInARow: @ 8264412 .string "SCOTT: Oh, I heard about you!\n" .string "How you ruled the BATTLE TOWER!\l" .string "You beat over 50 TRAINERS in a row?\p" .string "That's fantastic!\n" .string "I want you to have this!$" -BattleFrontier_ScottsHouse_Text_26449F: @ 826449F +BattleFrontier_ScottsHouse_Text_Beat100TrainersInARow: @ 826449F .string "SCOTT: Oh, my! I heard about you!\n" .string "How you overwhelmed the BATTLE TOWER!\l" .string "You beat over 100 TRAINERS in a row?\p" .string "That's ridiculously spectacular!\n" .string "You've got to have this!$" -BattleFrontier_ScottsHouse_Text_264546: @ 8264546 +BattleFrontier_ScottsHouse_Text_ExpectingToHearEvenGreaterThings: @ 8264546 .string "I'll be expecting to hear even greater\n" .string "things about you now!$" -BattleFrontier_ScottsHouse_Text_264583: @ 8264583 +BattleFrontier_ScottsHouse_Text_ComeBackForThisLater: @ 8264583 .string "Oops, well, if you have too much\n" .string "stuff, come back for this later.$" diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index efa3cc488..18f39ecd1 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -42,8 +42,8 @@ FallarborTown_BattleTentBattleRoom_EventScript_2008E7:: @ 82008E7 goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_200B73 FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 3 applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_200B96 waitmovement 0 diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index b2c900e31..e7d7d2fb4 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -41,8 +41,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202348:: @ 8202348 goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_20243C VerdanturfTown_BattleTentBattleRoom_EventScript_20236F:: @ 820236F - setvar VAR_0x8004, 3 - special sub_8161F74 + setvar VAR_0x8004, BATTLE_TOWER_FUNC_CHOOSE_TRAINER + special CallBattleTowerFunc addobject 2 applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_20257B waitmovement 0 diff --git a/data/specials.inc b/data/specials.inc index 76939fbf4..bfc88f619 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -243,7 +243,7 @@ gSpecials:: @ 81DBA64 def_special UpdateCyclingRoadState def_special GetLeadMonFriendshipScore def_special CallFrontierUtilFunc - def_special sub_8161F74 + def_special CallBattleTowerFunc def_special CallBattleDomeFunction def_special CallBattlePalaceFunction def_special CopyEReaderTrainerGreeting diff --git a/include/battle_tower.h b/include/battle_tower.h index 8bc6e6554..2366cac12 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -48,7 +48,7 @@ extern u16 gUnknown_03006298[]; extern const struct BattleFrontierTrainer *gFacilityTrainers; extern const struct FacilityMon *gFacilityTrainerMons; -void sub_8161F74(void); +void CallBattleTowerFunc(void); u16 sub_8162548(u8 challengeNum, u8 battleNum); void SetBattleFacilityTrainerGfxId(u16 trainerId, u8 tempVarId); void SetEReaderTrainerGfxId(void); diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h index 5473f04c6..54d50c18a 100644 --- a/include/constants/battle_frontier.h +++ b/include/constants/battle_frontier.h @@ -46,18 +46,30 @@ #define MAX_BATTLE_FRONTIER_POINTS 9999 -// Frontier Maniac -#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0 -#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1 -#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2 -#define FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS 3 -#define FRONTIER_MANIAC_BATTLE_DOME 4 -#define FRONTIER_MANIAC_BATTLE_FACTORY 5 -#define FRONTIER_MANIAC_BATTLE_PALACE 6 -#define FRONTIER_MANIAC_BATTLE_ARENA 7 -#define FRONTIER_MANIAC_BATTLE_PIKE 8 -#define FRONTIER_MANIAC_BATTLE_PYRAMID 9 -#define FRONTIER_MANIAC_FACILITY_COUNT 10 +// These sets of facility ids would be redunant if the order was consistent +// The order is important for this set so that all the non-link records can be continuous +#define RANKING_HALL_BATTLE_TOWER_SINGLES 0 +#define RANKING_HALL_BATTLE_TOWER_DOUBLES 1 +#define RANKING_HALL_BATTLE_TOWER_MULTIS 2 +#define RANKING_HALL_BATTLE_DOME 3 +#define RANKING_HALL_BATTLE_PALACE 4 +#define RANKING_HALL_BATTLE_ARENA 5 +#define RANKING_HALL_BATTLE_FACTORY 6 +#define RANKING_HALL_BATTLE_PIKE 7 +#define RANKING_HALL_BATTLE_PYRAMID 8 +#define RANKING_HALL_BATTLE_TOWER_LINK 9 + +#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0 +#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1 +#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2 +#define FRONTIER_MANIAC_BATTLE_TOWER_LINK 3 +#define FRONTIER_MANIAC_BATTLE_DOME 4 +#define FRONTIER_MANIAC_BATTLE_FACTORY 5 +#define FRONTIER_MANIAC_BATTLE_PALACE 6 +#define FRONTIER_MANIAC_BATTLE_ARENA 7 +#define FRONTIER_MANIAC_BATTLE_PIKE 8 +#define FRONTIER_MANIAC_BATTLE_PYRAMID 9 +#define FRONTIER_MANIAC_FACILITY_COUNT 10 #define FRONTIER_MANIAC_MESSAGE_COUNT 3 diff --git a/include/constants/battle_tower.h b/include/constants/battle_tower.h new file mode 100644 index 000000000..fa5dd109d --- /dev/null +++ b/include/constants/battle_tower.h @@ -0,0 +1,21 @@ +#ifndef GUARD_CONSTANTS_BATTLE_TOWER_H +#define GUARD_CONSTANTS_BATTLE_TOWER_H + +#define BATTLE_TOWER_FUNC_0 0 +#define BATTLE_TOWER_FUNC_1 1 +#define BATTLE_TOWER_FUNC_2 2 +#define BATTLE_TOWER_FUNC_CHOOSE_TRAINER 3 +#define BATTLE_TOWER_FUNC_4 4 +#define BATTLE_TOWER_FUNC_GIVE_RIBBONS 5 +#define BATTLE_TOWER_FUNC_SAVE 6 +#define BATTLE_TOWER_FUNC_7 7 +#define BATTLE_TOWER_FUNC_NOP 8 +#define BATTLE_TOWER_FUNC_NOP_SPRITE 9 +#define BATTLE_TOWER_FUNC_10 10 +#define BATTLE_TOWER_FUNC_11 11 +#define BATTLE_TOWER_FUNC_12 12 +#define BATTLE_TOWER_FUNC_13 13 +#define BATTLE_TOWER_FUNC_14 14 +#define BATTLE_TOWER_FUNC_15 15 + +#endif //GUARD_CONSTANTS_BATTLE_TOWER_H diff --git a/include/constants/flags.h b/include/constants/flags.h index f72adf50a..1eb8a0673 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -491,7 +491,7 @@ #define FLAG_MET_SCOTT_IN_EVERGRANDE 0x1CF #define FLAG_MET_SCOTT_ON_SS_TIDAL 0x1D0 #define FLAG_SCOTT_GIVES_BATTLE_POINTS 0x1D1 -#define FLAG_RECEIVED_STARF_BERRY_FROM_SCOTT 0x1D2 +#define FLAG_COLLECTED_ALL_GOLD_SYMBOLS 0x1D2 #define FLAG_ENABLE_ROXANNE_MATCH_CALL 0x1D3 #define FLAG_ENABLE_BRAWLY_MATCH_CALL 0x1D4 #define FLAG_ENABLE_WATTSON_MATCH_CALL 0x1D5 |