Fix fainted ally targeted attacks redirecting to self
This commit is contained in:
1 parent
48ff8b248b
commit
23a8fb1fc9
2 files changed
+2
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user