Fix softlock bug with double trainers
parent
4f88bd3dab
commit
0e694ebfb6
|
@ -7,7 +7,6 @@
|
||||||
- Complete move logic
|
- Complete move logic
|
||||||
- Abilities
|
- Abilities
|
||||||
- Complete ability logic
|
- Complete ability logic
|
||||||
- Natures
|
|
||||||
- Pokemon summary screen
|
- Pokemon summary screen
|
||||||
- Add IV screen
|
- Add IV screen
|
||||||
- Capture logic
|
- Capture logic
|
||||||
|
|
|
@ -1691,7 +1691,7 @@ export class EnemyCommandPhase extends FieldPhase {
|
||||||
|
|
||||||
return this.end();
|
return this.end();
|
||||||
} else if (!trapTag && !trapped.value) {
|
} else if (!trapTag && !trapped.value) {
|
||||||
const partyMemberScores = trainer.getPartyMemberMatchupScores();
|
const partyMemberScores = trainer.getPartyMemberMatchupScores(enemyPokemon.trainerSlot);
|
||||||
|
|
||||||
if (partyMemberScores.length) {
|
if (partyMemberScores.length) {
|
||||||
const matchupScores = opponents.map(opp => enemyPokemon.getMatchupScore(opp));
|
const matchupScores = opponents.map(opp => enemyPokemon.getMatchupScore(opp));
|
||||||
|
@ -1700,7 +1700,7 @@ export class EnemyCommandPhase extends FieldPhase {
|
||||||
const sortedPartyMemberScores = trainer.getSortedPartyMemberMatchupScores(partyMemberScores);
|
const sortedPartyMemberScores = trainer.getSortedPartyMemberMatchupScores(partyMemberScores);
|
||||||
|
|
||||||
if (sortedPartyMemberScores[0][1] >= matchupScore * (trainer.config.isBoss ? 2 : 3)) {
|
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] =
|
this.scene.currentBattle.turnCommands[this.fieldIndex + BattlerIndex.ENEMY] =
|
||||||
{ command: Command.POKEMON, cursor: index, args: [ false ] };
|
{ command: Command.POKEMON, cursor: index, args: [ false ] };
|
||||||
|
|
Loading…
Reference in New Issue