Merge branch 'master' of https://github.com/pret/pokeemerald into ui-standardize
This commit is contained in:
@@ -254,7 +254,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
||||
else if (moveTarget == MOVE_TARGET_SELECTED)
|
||||
chosenMoveId |= GetBattlePalaceTarget();
|
||||
else
|
||||
chosenMoveId |= (GetBattlerAtPosition((GetBattlerPosition(gActiveBattler) & BIT_SIDE) ^ BIT_SIDE) << 8);
|
||||
chosenMoveId |= (GetBattlerAtPosition(BATTLE_OPPOSITE(GET_BATTLER_SIDE(gActiveBattler))) << 8);
|
||||
|
||||
return chosenMoveId;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ static u16 GetBattlePalaceTarget(void)
|
||||
}
|
||||
|
||||
if (gBattleMons[opposing1].hp == gBattleMons[opposing2].hp)
|
||||
return (((gActiveBattler & BIT_SIDE) ^ BIT_SIDE) + (Random() & 2)) << 8;
|
||||
return (BATTLE_OPPOSITE(gActiveBattler & BIT_SIDE) + (Random() & 2)) << 8;
|
||||
|
||||
switch (gBattlePalaceNatureToMoveTarget[GetNatureFromPersonality(gBattleMons[gActiveBattler].personality)])
|
||||
{
|
||||
@@ -325,11 +325,11 @@ static u16 GetBattlePalaceTarget(void)
|
||||
else
|
||||
return opposing2 << 8;
|
||||
case PALACE_TARGET_RANDOM:
|
||||
return (((gActiveBattler & BIT_SIDE) ^ BIT_SIDE) + (Random() & 2)) << 8;
|
||||
return (BATTLE_OPPOSITE(gActiveBattler & BIT_SIDE) + (Random() & 2)) << 8;
|
||||
}
|
||||
}
|
||||
|
||||
return (gActiveBattler ^ BIT_SIDE) << 8;
|
||||
return BATTLE_OPPOSITE(gActiveBattler) << 8;
|
||||
}
|
||||
|
||||
// Wait for the pokemon to finish appearing out from the pokeball on send out
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user