diff --git a/Allow-Running-From-Trainer-Battles.md b/Allow-Running-From-Trainer-Battles.md index 77f7f7d..0d5880f 100644 --- a/Allow-Running-From-Trainer-Battles.md +++ b/Allow-Running-From-Trainer-Battles.md @@ -186,7 +186,7 @@ EWRAM_DATA u16 gBattle_BG0_X = 0; +static u8 IsTrainerCantRunFrom(void){ + u8 trainerClass; -+ if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL)) ++ if (gBattleTypeFlags & (BATTLE_TYPE_DOUBLE | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL)) + return BATTLE_RUN_FORBIDDEN; + trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass; + switch (trainerClass) @@ -217,7 +217,7 @@ void SwitchPartyOrder(u8 battler) && gBattleBufferB[gActiveBattler][1] == B_ACTION_RUN) { - gBattleCommunication[gActiveBattler]++; -+ if (IsTrainerCantRunFrom() || IsDoubleBattle()) ++ if (IsTrainerCantRunFrom()) + { + BattleScriptExecute(BattleScript_PrintCantRunFromTrainer); + gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN;