nit update src/phases.ts

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
This commit is contained in:
Lylian BALL 2024-08-05 01:20:55 +02:00 committed by GitHub
parent 909d166dd7
commit 205ee8367b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1592,8 +1592,6 @@ export class SwitchSummonPhase extends SummonPhase {
}
const pokemon: Pokemon = this.getPokemon();
// if doReturn === False OR slotIndex !== -1 (slotIndex is valid) and the pokemon doesn't exist/is false
// then switchAndSummon(), manually pick pokemon to switch into
if (!this.doReturn || (this.slotIndex !== -1 && !(this.player ? this.scene.getParty() : this.scene.getEnemyParty())[this.slotIndex])) {
if (this.player) {
return this.switchAndSummon();