Fix softlock bug with double trainers

pull/16/head
Flashfyre 2024-03-24 22:24:26 -04:00
parent 4f88bd3dab
commit 0e694ebfb6
2 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,6 @@
- Complete move logic
- Abilities
- Complete ability logic
- Natures
- Pokemon summary screen
- Add IV screen
- Capture logic

View File

@ -1691,7 +1691,7 @@ export class EnemyCommandPhase extends FieldPhase {
return this.end();
} else if (!trapTag && !trapped.value) {
const partyMemberScores = trainer.getPartyMemberMatchupScores();
const partyMemberScores = trainer.getPartyMemberMatchupScores(enemyPokemon.trainerSlot);
if (partyMemberScores.length) {
const matchupScores = opponents.map(opp => enemyPokemon.getMatchupScore(opp));
@ -1700,7 +1700,7 @@ export class EnemyCommandPhase extends FieldPhase {
const sortedPartyMemberScores = trainer.getSortedPartyMemberMatchupScores(partyMemberScores);
if (sortedPartyMemberScores[0][1] >= matchupScore * (trainer.config.isBoss ? 2 : 3)) {
const index = trainer.getNextSummonIndex(undefined, partyMemberScores);
const index = trainer.getNextSummonIndex(enemyPokemon.trainerSlot, partyMemberScores);
this.scene.currentBattle.turnCommands[this.fieldIndex + BattlerIndex.ENEMY] =
{ command: Command.POKEMON, cursor: index, args: [ false ] };