IsMoveAffectedByParentalBond supports dynamic move targeting

Update IsMoveAffectedByParentalBond to properly handle Expanding Force.
This commit is contained in:
BuffelSaft 2022-05-07 14:37:02 +12:00
parent 57003c62fd
commit 3e645b1839

View File

@ -14477,7 +14477,7 @@ bool8 IsMoveAffectedByParentalBond(u16 move, u8 battlerId)
{
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
switch (gBattleMoves[move].target)
switch (GetBattlerMoveTargetType(battlerId, move))
{
case MOVE_TARGET_BOTH:
if (CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) >= 2) // Check for single target
@ -14487,12 +14487,12 @@ bool8 IsMoveAffectedByParentalBond(u16 move, u8 battlerId)
if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) >= 2) // Count mons on both sides; ignore attacker
return FALSE;
break;
default:
break;
}
}
return TRUE;
}
return FALSE;
}