small fixes

This commit is contained in:
DizzyEggg 2023-08-09 09:34:41 +02:00
parent 8d5ba6c6d1
commit a0c34813f1
3 changed files with 5 additions and 4 deletions

View File

@ -2021,7 +2021,7 @@
.macro ai_vs_ai_battle trainer1:req, trainer2:req .macro ai_vs_ai_battle trainer1:req, trainer2:req
setflag B_FLAG_AI_VS_AI_BATTLE setflag B_FLAG_AI_VS_AI_BATTLE
setvar VAR_0x8004, trainer1 setvar VAR_0x8004, \trainer1
callnative CreateTrainerPartyForPlayer callnative CreateTrainerPartyForPlayer
trainerbattle_no_intro trainer2, NULL trainerbattle_no_intro \trainer2, NULL
.endm .endm

View File

@ -2148,7 +2148,8 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
void CreateTrainerPartyForPlayer(void) void CreateTrainerPartyForPlayer(void)
{ {
ZeroPlayerPartyMons(); ZeroPlayerPartyMons();
CreateNPCTrainerPartyFromTrainer(gPlayerParty, &gTrainers[gSpecialVar_0x8004], TRUE, 0); gPartnerTrainerId = gSpecialVar_0x8004;
CreateNPCTrainerPartyFromTrainer(gPlayerParty, &gTrainers[gSpecialVar_0x8004], TRUE, BATTLE_TYPE_TRAINER);
} }
void VBlankCB_Battle(void) void VBlankCB_Battle(void)

View File

@ -7949,7 +7949,7 @@ u8 IsMonDisobedient(void)
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
return 0; return 0;
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT) if (BattlerHasAi(gBattlerAttacker))
return 0; return 0;
if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys