Usage of BATTLE_PARTNER

This commit is contained in:
Eduardo Quezada
2022-08-27 01:26:13 -04:00
parent 6c457f42af
commit 15d611ba65
19 changed files with 148 additions and 148 deletions
+3 -3
View File
@@ -1060,7 +1060,7 @@ void HandleLowHpMusicChange(struct Pokemon *mon, u8 battlerId)
{
if (!gBattleSpritesDataPtr->battlerData[battlerId].lowHpSong)
{
if (!gBattleSpritesDataPtr->battlerData[battlerId ^ BIT_FLANK].lowHpSong)
if (!gBattleSpritesDataPtr->battlerData[BATTLE_PARTNER(battlerId)].lowHpSong)
PlaySE(SE_LOW_HEALTH);
gBattleSpritesDataPtr->battlerData[battlerId].lowHpSong = 1;
}
@@ -1073,7 +1073,7 @@ void HandleLowHpMusicChange(struct Pokemon *mon, u8 battlerId)
m4aSongNumStop(SE_LOW_HEALTH);
return;
}
if (IsDoubleBattle() && !gBattleSpritesDataPtr->battlerData[battlerId ^ BIT_FLANK].lowHpSong)
if (IsDoubleBattle() && !gBattleSpritesDataPtr->battlerData[BATTLE_PARTNER(battlerId)].lowHpSong)
{
m4aSongNumStop(SE_LOW_HEALTH);
return;
@@ -1087,7 +1087,7 @@ void BattleStopLowHpSound(void)
gBattleSpritesDataPtr->battlerData[playerBattler].lowHpSong = 0;
if (IsDoubleBattle())
gBattleSpritesDataPtr->battlerData[playerBattler ^ BIT_FLANK].lowHpSong = 0;
gBattleSpritesDataPtr->battlerData[BATTLE_PARTNER(playerBattler)].lowHpSong = 0;
m4aSongNumStop(SE_LOW_HEALTH);
}