mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Fixed battle frontier tutors (for real this time)
This commit is contained in:
parent
f8fb4e8cf2
commit
9f16d1dd12
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user