Fix fainted ally targeted attacks redirecting to self

This commit is contained in:
Flashfyre committed 2024-04-04 14:42:20 -04:00
1 parent 48ff8b248b
commit 23a8fb1fc9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -623,7 +623,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm {
getFormSpriteKey(formIndex?: integer) {
if (this.forms.length && formIndex >= this.forms.length) {
console.warn(`Attempted accessing form with index ${formIndex} of species ${this.getName()} with only ${this.forms?.length || 0} forms`);
console.warn(`Attempted accessing form with index ${formIndex} of species ${this.getName()} with only ${this.forms.length || 0} forms`);
formIndex = Math.min(formIndex, this.forms.length - 1);
}
return this.forms?.length