Fixes wrong Future Sight indexing (#7198)

This commit is contained in:
Alex 2025-06-24 09:04:19 +02:00 committed by GitHub
parent 2e3e0889f9
commit bc95824e8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9582,8 +9582,13 @@ bool32 IsFutureSightAttackerInParty(u32 battlerAtk, u32 battlerDef, u32 move)
return FALSE;
struct Pokemon *party = GetBattlerParty(battlerAtk);
return &party[gWishFutureKnock.futureSightPartyIndex[battlerDef]] != &party[gBattlerPartyIndexes[battlerAtk]]
&& &party[gWishFutureKnock.futureSightPartyIndex[battlerDef]] != &party[BATTLE_PARTNER(gBattlerPartyIndexes[battlerAtk])];
if (IsDoubleBattle())
{
return &party[gWishFutureKnock.futureSightPartyIndex[battlerDef]] != &party[gBattlerPartyIndexes[battlerAtk]]
&& &party[gWishFutureKnock.futureSightPartyIndex[battlerDef]] != &party[gBattlerPartyIndexes[BATTLE_PARTNER(battlerAtk)]];
}
return &party[gWishFutureKnock.futureSightPartyIndex[battlerDef]] != &party[gBattlerPartyIndexes[battlerAtk]];
}
s32 CalculateMoveDamage(struct DamageCalculationData *damageCalcData, u32 fixedBasePower)