Add isPartner method to trainer class
This commit is contained in:
parent
eef8367caf
commit
ada0c53482
|
@ -6297,7 +6297,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||
// Find indices of off-field Pokemon that are eligible to be switched into
|
||||
const eligibleNewIndices: number[] = [];
|
||||
globalScene.getEnemyParty().forEach((pokemon, index) => {
|
||||
if (pokemon.isAllowedInBattle() && !pokemon.isOnField()) {
|
||||
if (pokemon.isAllowedInBattle() && !pokemon.isOnField() && (pokemon as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot) {
|
||||
eligibleNewIndices.push(index);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -223,6 +223,13 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
|||
return this.config.doubleOnly || this.variant === TrainerVariant.DOUBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the trainer is a duo, like Tate & Liza
|
||||
*/
|
||||
isPartner(): boolean {
|
||||
return this.variant === TrainerVariant.DOUBLE;
|
||||
}
|
||||
|
||||
getMixedBattleBgm(): string {
|
||||
return this.config.mixedBattleBgm;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue