mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Fix getBattlerIndex for enemyPokemon
This commit is contained in:
parent
f7cb01011c
commit
bbd6eb9579
@ -6941,7 +6941,11 @@ export class EnemyPokemon extends Pokemon {
|
||||
return globalScene.getEnemyField().indexOf(this);
|
||||
}
|
||||
|
||||
public getBattlerIndex(): Exclude<BattlerIndex, BattlerIndex.ATTACKER> {
|
||||
public getBattlerIndex(): BattlerIndex {
|
||||
const fieldIndex = this.getFieldIndex();
|
||||
if (fieldIndex === -1) {
|
||||
return BattlerIndex.ATTACKER;
|
||||
}
|
||||
return BattlerIndex.ENEMY + this.getFieldIndex();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user