Usage of BATTLE_OPPOSITE

This commit is contained in:
Eduardo Quezada
2022-08-27 01:44:39 -04:00
parent 15d611ba65
commit 1f0a952546
6 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -601,7 +601,7 @@ void AI_TrySwitchOrUseItem(void)
}
}
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, (gActiveBattler ^ BIT_SIDE) << 8);
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, BATTLE_OPPOSITE(gActiveBattler) << 8);
}
static void ModulateByTypeEffectiveness(u8 atkType, u8 defType1, u8 defType2, u8 *var)
@@ -665,7 +665,7 @@ u8 GetMostSuitableMonToSwitchInto(void)
}
else
{
opposingBattler = GetBattlerAtPosition(GetBattlerPosition(gActiveBattler) ^ BIT_SIDE);
opposingBattler = GetBattlerAtPosition(BATTLE_OPPOSITE(GetBattlerPosition(gActiveBattler)));
battlerIn1 = gActiveBattler;
battlerIn2 = gActiveBattler;
}