diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index a51fd9d07..9528dd11d 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -66,52 +66,62 @@ BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove:: end BattleFrontier_Lounge7_EventScript_Softboiled:: - setvar VAR_0x8008, MOVE_SOFT_BOILED + setvar VAR_0x8008, 16 + setvar VAR_0x8005, MOVE_SOFT_BOILED goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_SeismicToss:: - setvar VAR_0x8008, MOVE_SEISMIC_TOSS + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_SEISMIC_TOSS goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_DreamEater:: - setvar VAR_0x8008, MOVE_DREAM_EATER + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_DREAM_EATER goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_MegaPunch:: - setvar VAR_0x8008, MOVE_MEGA_PUNCH + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_MEGA_PUNCH goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_MegaKick:: - setvar VAR_0x8008, MOVE_MEGA_KICK + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_MEGA_KICK goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_BodySlam:: - setvar VAR_0x8008, MOVE_BODY_SLAM + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_BODY_SLAM goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_RockSlide:: - setvar VAR_0x8008, MOVE_ROCK_SLIDE + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_ROCK_SLIDE goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_Counter:: - setvar VAR_0x8008, MOVE_COUNTER + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_COUNTER goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_ThunderWave:: - setvar VAR_0x8008, MOVE_THUNDER_WAVE + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_THUNDER_WAVE goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_SwordsDance:: - setvar VAR_0x8008, MOVE_SWORDS_DANCE + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_SWORDS_DANCE goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end @@ -135,7 +145,6 @@ BattleFrontier_Lounge7_EventScript_ChooseRightTutorMove:: waitmessage special ShowBattlePointsWindow setvar VAR_TEMP_E, 1 - setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2 setvar VAR_0x8006, 0 special ShowScrollableMultichoice waitstate @@ -159,7 +168,6 @@ BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove:: message BattleFrontier_Lounge7_Text_TeachWhichMove waitmessage setvar VAR_TEMP_E, 1 - setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2 setvar VAR_0x8006, 1 special ShowScrollableMultichoice waitstate @@ -180,52 +188,62 @@ BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove:: end BattleFrontier_Lounge7_EventScript_DefenseCurl:: - setvar VAR_0x8008, MOVE_DEFENSE_CURL + setvar VAR_0x8008, 16 + setvar VAR_0x8005, MOVE_DEFENSE_CURL goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_Snore:: - setvar VAR_0x8008, MOVE_SNORE + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_SNORE goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_MudSlap:: - setvar VAR_0x8008, MOVE_MUD_SLAP + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_MUD_SLAP goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_Swift:: - setvar VAR_0x8008, MOVE_SWIFT + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_SWIFT goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_IcyWind:: - setvar VAR_0x8008, MOVE_ICY_WIND + setvar VAR_0x8008, 24 + setvar VAR_0x8005, MOVE_ICY_WIND goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_Endure:: - setvar VAR_0x8008, MOVE_ENDURE + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_ENDURE goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_PsychUp:: - setvar VAR_0x8008, MOVE_PSYCH_UP + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_PSYCH_UP goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_IcePunch:: - setvar VAR_0x8008, MOVE_ICE_PUNCH + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_ICE_PUNCH goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_ThunderPunch:: - setvar VAR_0x8008, MOVE_THUNDER_PUNCH + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_THUNDER_PUNCH goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end BattleFrontier_Lounge7_EventScript_FirePunch:: - setvar VAR_0x8008, MOVE_FIRE_PUNCH + setvar VAR_0x8008, 48 + setvar VAR_0x8005, MOVE_FIRE_PUNCH goto BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection end @@ -246,11 +264,8 @@ BattleFrontier_Lounge7_EventScript_CancelChooseMon:: @ VAR_TEMP_D is the move selection @ VAR_TEMP_E is which move tutor was spoken to BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: - copyvar VAR_0x8004, VAR_TEMP_D - copyvar VAR_0x8005, VAR_TEMP_E special BufferBattleFrontierTutorMoveName buffernumberstring STR_VAR_2, VAR_0x8008 - copyvar VAR_0x8004, VAR_TEMP_C msgbox BattleFrontier_Lounge7_Text_MoveWillBeXBattlePoints, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge7_EventScript_ChooseNewMove specialvar VAR_TEMP_1, GetFrontierBattlePoints @@ -261,7 +276,6 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: BattleFrontier_Lounge7_EventScript_TeachTutorMove:: msgbox BattleFrontier_Lounge7_Text_TeachMoveToWhichMon, MSGBOX_DEFAULT - special GetBattleFrontierTutorMoveIndex fadescreen FADE_TO_BLACK special CloseBattlePointsWindow special CloseBattleFrontierTutorWindow diff --git a/data/specials.inc b/data/specials.inc index b4d0ecf90..a1b2fd201 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -486,7 +486,6 @@ gSpecials:: def_special CloseBattleFrontierTutorWindow def_special ScrollableMultichoice_RedrawPersistentMenu def_special ChooseMonForMoveTutor - def_special GetBattleFrontierTutorMoveIndex def_special ScrollableMultichoice_ClosePersistentMenu def_special DoDeoxysRockInteraction def_special SetDeoxysRockPalette diff --git a/src/field_specials.c b/src/field_specials.c index 434d2f776..8f2bfcbed 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2988,10 +2988,7 @@ static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused) void BufferBattleFrontierTutorMoveName(void) { - if (gSpecialVar_0x8005 != 0) - StringCopy(gStringVar1, gMoveNames[gSpecialVar_0x8004]); - else - StringCopy(gStringVar1, gMoveNames[gSpecialVar_0x8004]); + StringCopy(gStringVar1, gMoveNames[gSpecialVar_0x8005]); } static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) @@ -3087,44 +3084,6 @@ void ScrollableMultichoice_RedrawPersistentMenu(void) } } -void GetBattleFrontierTutorMoveIndex(void) -{ - u8 i; - u16 moveTutor = 0; - u16 moveIndex = 0; - gSpecialVar_0x8005 = 0; - - moveTutor = VarGet(VAR_TEMP_E); - moveIndex = VarGet(VAR_TEMP_D); - - if (moveTutor != 0) - { - i = 0; - do - { - if (i == moveIndex) - { - gSpecialVar_0x8005 = i; - break; - } - i++; - } while (i < MOVES_COUNT); - } - else - { - i = 0; - do - { - if (i == moveIndex) - { - gSpecialVar_0x8005 = i; - break; - } - i++; - } while (i < MOVES_COUNT); - } -} - // Never called // Close a scrollable multichoice that stays open after selection void ScrollableMultichoice_ClosePersistentMenu(void)