Merge branch 'pr-illusion' of https://github.com/PyGaVS/pokerogue into pr-illusion

This commit is contained in:
Lylian 2024-08-05 02:13:14 +02:00
commit b552ced042
2 changed files with 1 additions and 3 deletions

View File

@ -128,7 +128,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const randAbilityIndex = Utils.randSeedInt(2); const randAbilityIndex = Utils.randSeedInt(2);
this.species = species; this.species = species;
this.illusion = {active: false, available: true}; this.illusion = { active: false, available: true };
this.pokeball = dataSource?.pokeball || PokeballType.POKEBALL; this.pokeball = dataSource?.pokeball || PokeballType.POKEBALL;
this.level = level; this.level = level;

View File

@ -1592,8 +1592,6 @@ export class SwitchSummonPhase extends SummonPhase {
} }
const pokemon: Pokemon = this.getPokemon(); 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.doReturn || (this.slotIndex !== -1 && !(this.player ? this.scene.getParty() : this.scene.getEnemyParty())[this.slotIndex])) {
if (this.player) { if (this.player) {
return this.switchAndSummon(); return this.switchAndSummon();