@@ -23,7 +23,7 @@ static bool8 ShouldSwitchIfPerishSong(void)
23
23
&& gDisableStructs [gActiveBattler ].perishSongTimer == 0 )
24
24
{
25
25
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = PARTY_SIZE ;
26
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
26
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
27
27
return TRUE;
28
28
}
29
29
else
@@ -107,7 +107,7 @@ static bool8 ShouldSwitchIfWonderGuard(void)
107
107
{
108
108
// We found a mon.
109
109
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = i ;
110
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
110
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
111
111
return TRUE;
112
112
}
113
113
}
@@ -207,7 +207,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
207
207
{
208
208
// we found a mon.
209
209
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = i ;
210
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
210
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
211
211
return TRUE;
212
212
}
213
213
}
@@ -229,14 +229,14 @@ static bool8 ShouldSwitchIfNaturalCure(void)
229
229
&& Random () & 1 )
230
230
{
231
231
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = PARTY_SIZE ;
232
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
232
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
233
233
return TRUE;
234
234
}
235
235
else if (gBattleMoves [gLastLandedMoves [gActiveBattler ]].power == 0
236
236
&& Random () & 1 )
237
237
{
238
238
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = PARTY_SIZE ;
239
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
239
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
240
240
return TRUE;
241
241
}
242
242
@@ -248,7 +248,7 @@ static bool8 ShouldSwitchIfNaturalCure(void)
248
248
if (Random () & 1 )
249
249
{
250
250
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = PARTY_SIZE ;
251
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
251
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
252
252
return TRUE;
253
253
}
254
254
@@ -416,7 +416,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
416
416
if (moveFlags & MOVE_RESULT_SUPER_EFFECTIVE && Random () % moduloPercent == 0 )
417
417
{
418
418
* (gBattleStruct -> AI_monToSwitchIntoId + gActiveBattler ) = i ;
419
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_SWITCH , 0 );
419
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_SWITCH , 0 );
420
420
return TRUE;
421
421
}
422
422
}
@@ -599,7 +599,7 @@ void AI_TrySwitchOrUseItem(void)
599
599
}
600
600
}
601
601
602
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_USE_MOVE , BATTLE_OPPOSITE (gActiveBattler ) << 8 );
602
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_USE_MOVE , BATTLE_OPPOSITE (gActiveBattler ) << 8 );
603
603
}
604
604
605
605
static void ModulateByTypeEffectiveness (u8 atkType , u8 defType1 , u8 defType2 , u8 * var )
@@ -933,7 +933,7 @@ static bool8 ShouldUseItem(void)
933
933
934
934
if (shouldUse )
935
935
{
936
- BtlController_EmitTwoReturnValues (BUFFER_B , B_ACTION_USE_ITEM , 0 );
936
+ BtlController_EmitTwoReturnValues (B_COMM_TO_ENGINE , B_ACTION_USE_ITEM , 0 );
937
937
* (gBattleStruct -> chosenItem + (gActiveBattler / 2 ) * 2 ) = item ;
938
938
gBattleResources -> battleHistory -> trainerItems [i ] = ITEM_NONE ;
939
939
return shouldUse ;
0 commit comments