[Bug] Fix Lock-On and Mind Reader not working on the first turn (#3001)

This commit is contained in:
schmidtc1 2024-07-14 00:26:13 -04:00 committed by GitHub
parent a4f3829710
commit 1be11d2b3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3058,7 +3058,7 @@ export class MoveEffectPhase extends PokemonPhase {
}
// If the user should ignore accuracy on a target, check who the user targeted last turn and see if they match
if (user.getTag(BattlerTagType.IGNORE_ACCURACY) && (user.getLastXMoves().slice(1).find(() => true)?.targets || []).indexOf(target.getBattlerIndex()) !== -1) {
if (user.getTag(BattlerTagType.IGNORE_ACCURACY) && (user.getLastXMoves().find(() => true)?.targets || []).indexOf(target.getBattlerIndex()) !== -1) {
return true;
}