diff --git a/src/field/trainer.ts b/src/field/trainer.ts index b2fa9fd3239..5cb0646b259 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -271,6 +271,9 @@ export default class Trainer extends Phaser.GameObjects.Container { } getPartyMemberMatchupScores(trainerSlot: TrainerSlot = TrainerSlot.NONE): [integer, integer][] { + if (trainerSlot && !this.isDouble()) + trainerSlot = TrainerSlot.NONE; + const party = this.scene.getEnemyParty(); const nonFaintedPartyMembers = party.slice(this.scene.currentBattle.getBattlerCount()).filter(p => !p.isFainted()).filter(p => !trainerSlot || p.trainerSlot === trainerSlot); const partyMemberScores = nonFaintedPartyMembers.map(p => { diff --git a/src/system/game-data.ts b/src/system/game-data.ts index b95b09cac08..afad63067c8 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -583,7 +583,7 @@ export class GameData { scene.newArena(sessionData.arena.biome, true); sessionData.enemyParty.forEach((enemyData, e) => { - const enemyPokemon = enemyData.toPokemon(scene, battleType, e) as EnemyPokemon; + const enemyPokemon = enemyData.toPokemon(scene, battleType, e, sessionData.trainer?.variant === TrainerVariant.DOUBLE) as EnemyPokemon; battle.enemyParty[e] = enemyPokemon; if (battleType === BattleType.WILD) battle.seenEnemyPartyMemberIds.add(enemyPokemon.id); diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index f37ae2eabbf..c2dc3ce8635 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -105,10 +105,10 @@ export default class PokemonData { } } - toPokemon(scene: BattleScene, battleType?: BattleType, partyMemberIndex: integer = 0): Pokemon { + toPokemon(scene: BattleScene, battleType?: BattleType, partyMemberIndex: integer = 0, double: boolean = false): Pokemon { const species = getPokemonSpecies(this.species); if (this.player) return scene.addPlayerPokemon(species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.ivs, this.nature, this); - return scene.addEnemyPokemon(species, this.level, battleType === BattleType.TRAINER ? !(partyMemberIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER : TrainerSlot.NONE, this.boss, this); + return scene.addEnemyPokemon(species, this.level, battleType === BattleType.TRAINER ? !double || !(partyMemberIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER : TrainerSlot.NONE, this.boss, this); } } \ No newline at end of file