-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Quickly Run from a Battle by Holding Right While the Wild Pokémon's Name Appears
voloved edited this page Apr 6, 2023
·
5 revisions
By devolov
Goal: Make running from a wild battle 10x faster. The video of this hack also uses the simplistic battle intro. Holding the right D-pad button while pressing A or B when the Wild Pokemon's name appears will immediately cause you to run.
------------------------------ src/battle_main.c ------------------------------
index 4f82d8d75..fd3986fe8 100644
@@ -96,8 +96,9 @@ static void BattleIntroPrepareBackgroundSlide(void);
static void BattleIntroDrawTrainersOrMonsSprites(void);
static void BattleIntroDrawPartySummaryScreens(void);
static void BattleIntroPrintTrainerWantsToBattle(void);
static void BattleIntroPrintWildMonAttacked(void);
+static void BattleIntroQuickRun(void);
static void BattleIntroPrintOpponentSendsOut(void);
static void BattleIntroPrintPlayerSendsOut(void);
static void BattleIntroOpponent1SendsOutMonAnimation(void);
static void BattleIntroOpponent2SendsOutMonAnimation(void);
@@ -3664,14 +3665,26 @@ static void BattleIntroPrintTrainerWantsToBattle(void)
static void BattleIntroPrintWildMonAttacked(void)
{
if (gBattleControllerExecFlags == 0)
{
- gBattleMainFunc = BattleIntroPrintPlayerSendsOut;
+ gBattleMainFunc = BattleIntroQuickRun;
PrepareStringBattle(STRINGID_INTROMSG, 0);
}
}
+static void BattleIntroQuickRun(void)
+{
+ if (gBattleControllerExecFlags == 0)
+ {
+ if (JOY_HELD(DPAD_RIGHT)){
+ if (!IsRunningFromBattleImpossible()){
+ gBattleMainFunc = HandleEndTurn_RanFromBattle;
+ return;
+ }
+ PrepareStringBattle(STRINGID_CANTESCAPE, 0);
+ }
+ gBattleMainFunc = BattleIntroPrintPlayerSendsOut;
+ }
+}