Fix EXP based on your own side

This commit is contained in:
Flashfyre 2023-05-29 12:24:38 -04:00
parent 683c1f660e
commit 516c8c6d13
1 changed files with 4 additions and 4 deletions

View File

@ -1729,7 +1729,7 @@ export class FaintPhase extends PokemonPhase {
else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount()) else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount())
this.scene.unshiftPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false)); this.scene.unshiftPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false));
} else } else
this.scene.unshiftPhase(new VictoryPhase(this.scene, this.fieldIndex)); this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));
const pokemon = this.getPokemon(); const pokemon = this.getPokemon();
@ -1759,8 +1759,8 @@ export class FaintPhase extends PokemonPhase {
} }
export class VictoryPhase extends PokemonPhase { export class VictoryPhase extends PokemonPhase {
constructor(scene: BattleScene, targetIndex: integer) { constructor(scene: BattleScene, battlerIndex: BattlerIndex) {
super(scene, targetIndex); super(scene, battlerIndex);
} }
start() { start() {
@ -2284,7 +2284,7 @@ export class AttemptCapturePhase extends PokemonPhase {
catch() { catch() {
const pokemon = this.getPokemon() as EnemyPokemon; const pokemon = this.getPokemon() as EnemyPokemon;
this.scene.unshiftPhase(new VictoryPhase(this.scene, this.fieldIndex)); this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));
this.scene.ui.showText(`${pokemon.name} was caught!`, null, () => { this.scene.ui.showText(`${pokemon.name} was caught!`, null, () => {
const end = () => { const end = () => {
this.removePb(); this.removePb();