Usage of BATTLE_OPPOSITE
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(GetBattlerPosition(gActiveBattler) & BIT_SIDE)) << 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
|
||||
|
||||
Reference in New Issue
Block a user