Max Moves cannot target allies

This commit is contained in:
AgustinGDLV 2023-03-24 23:27:34 -07:00
parent 9f306c65ed
commit 1acddfa38a
2 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,7 @@ bool32 CanDynamax(u16 battlerId)
#if B_FLAG_DYNAMAX_BATTLE != 0
if (!FlagGet(B_FLAG_DYNAMAX_BATTLE))
#endif
return FALSE;
// return FALSE;
// Check if Player has a Dynamax Band.
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT))

View File

@ -10917,6 +10917,9 @@ bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move)
&& GetBattlerSide(battlerAtk) == GetBattlerSide(battlerDef)
&& gStatuses3[battlerAtk] & STATUS3_HEAL_BLOCK)
return FALSE; // Pokémon affected by Heal Block cannot target allies with Pollen Puff
if ((IsDynamaxed(battlerAtk) || gBattleStruct->dynamax.playerSelect)
&& GetBattlerSide(battlerAtk) == GetBattlerSide(battlerDef))
return FALSE;
return TRUE;
}