revert changes in trainer.ts to fix an issue induced by #1986 (#2005)

This commit is contained in:
Greenlamp2 2024-06-09 16:54:15 +02:00 committed by GitHub
parent d06e5d2fc6
commit 67cb79a435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
const party = this.scene.getEnemyParty(); const party = this.scene.getEnemyParty();
const nonFaintedPartyMembers = party.slice(this.scene.currentBattle.getBattlerCount()).filter(p => !p.isFainted()).filter(p => !trainerSlot || p.trainerSlot === trainerSlot); const nonFaintedPartyMembers = party.slice(this.scene.currentBattle.getBattlerCount()).filter(p => !p.isFainted()).filter(p => !trainerSlot || p.trainerSlot === trainerSlot);
const partyMemberScores = nonFaintedPartyMembers.map(p => { const partyMemberScores = nonFaintedPartyMembers.map(p => {
const playerField = this.scene.getPlayerField().filter(p => p.isActive(true)); const playerField = this.scene.getPlayerField();
let score = 0; let score = 0;
for (const playerPokemon of playerField) { for (const playerPokemon of playerField) {
score += p.getMatchupScore(playerPokemon); score += p.getMatchupScore(playerPokemon);