diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 7ca1c3d96..d2d8f8ca6 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -2021,7 +2021,7 @@ .macro ai_vs_ai_battle trainer1:req, trainer2:req setflag B_FLAG_AI_VS_AI_BATTLE - setvar VAR_0x8004, trainer1 + setvar VAR_0x8004, \trainer1 callnative CreateTrainerPartyForPlayer - trainerbattle_no_intro trainer2, NULL + trainerbattle_no_intro \trainer2, NULL .endm diff --git a/src/battle_main.c b/src/battle_main.c index 17d741ee2..452277bc0 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2148,7 +2148,8 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir void CreateTrainerPartyForPlayer(void) { ZeroPlayerPartyMons(); - CreateNPCTrainerPartyFromTrainer(gPlayerParty, &gTrainers[gSpecialVar_0x8004], TRUE, 0); + gPartnerTrainerId = gSpecialVar_0x8004; + CreateNPCTrainerPartyFromTrainer(gPlayerParty, &gTrainers[gSpecialVar_0x8004], TRUE, BATTLE_TYPE_TRAINER); } void VBlankCB_Battle(void) diff --git a/src/battle_util.c b/src/battle_util.c index 2f200026b..b8e9697e2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7949,7 +7949,7 @@ u8 IsMonDisobedient(void) if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) return 0; - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT) + if (BattlerHasAi(gBattlerAttacker)) return 0; if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys