mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
fix GetBattleAnimMoveTargets for non-player gBattleAnimAttacker
This commit is contained in:
parent
170ff2f422
commit
3bd680cab9
@ -440,22 +440,22 @@ static u8 GetBattleAnimMoveTargets(u8 battlerArgIndex, u8 *targets)
|
||||
case MOVE_TARGET_BOTH:
|
||||
targets[0] = gBattleAnimArgs[battlerArgIndex];
|
||||
numTargets = 1;
|
||||
if (IsBattlerAlive(targets[0] ^ BIT_FLANK)) {
|
||||
targets[1] = targets[0] ^ BIT_FLANK;
|
||||
numTargets++;
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(targets[0])) {
|
||||
targets[1] = BATTLE_PARTNER(targets[0]);
|
||||
numTargets = 2;
|
||||
}
|
||||
break;
|
||||
case MOVE_TARGET_FOES_AND_ALLY:
|
||||
targets[0] = gBattleAnimArgs[battlerArgIndex];
|
||||
numTargets = 1;
|
||||
|
||||
if (IsBattlerAlive(targets[0] ^ BIT_FLANK)) {
|
||||
targets[1] = targets[0] ^ BIT_FLANK;
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(targets[0]))) {
|
||||
targets[1] = BATTLE_PARTNER(targets[0]);
|
||||
numTargets++;
|
||||
}
|
||||
|
||||
if (IsBattlerAlive(gBattleAnimAttacker ^ BIT_FLANK)) {
|
||||
targets[2] = gBattleAnimAttacker ^ BIT_FLANK;
|
||||
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0])))) {
|
||||
targets[2] = BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0]));
|
||||
numTargets++;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user