mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 22:03:53 +01:00
IsMoveAffectedByParentalBond supports dynamic move targeting
Update IsMoveAffectedByParentalBond to properly handle Expanding Force.
This commit is contained in:
parent
57003c62fd
commit
3e645b1839
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user