mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-30 16:11:06 +01:00
Fix moves hitting all 3 pokemon
This commit is contained in:
parent
470df386c9
commit
35d0ea5ff5
@ -5605,6 +5605,16 @@ static void HandleAction_UseMove(void)
|
|||||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (gBattleMoves[gChosenMove].target & MOVE_TARGET_FOES_AND_ALLY)
|
||||||
|
{
|
||||||
|
for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
||||||
|
{
|
||||||
|
if (gBattlerTarget == gBattlerAttacker)
|
||||||
|
continue;
|
||||||
|
if (!(gAbsentBattlerFlags & gBitTable[gBattlerTarget]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker);
|
gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker);
|
||||||
@ -5666,6 +5676,17 @@ static void HandleAction_UseMove(void)
|
|||||||
else
|
else
|
||||||
gBattlerTarget = gBattlerAttacker;
|
gBattlerTarget = gBattlerAttacker;
|
||||||
}
|
}
|
||||||
|
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||||
|
&& gBattleMoves[gChosenMove].target == MOVE_TARGET_FOES_AND_ALLY)
|
||||||
|
{
|
||||||
|
for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
||||||
|
{
|
||||||
|
if (gBattlerTarget == gBattlerAttacker)
|
||||||
|
continue;
|
||||||
|
if (!(gAbsentBattlerFlags & gBitTable[gBattlerTarget]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker);
|
gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user