Fix infinite EXP bug
parent
e5fe0c6e3a
commit
1a9c492a79
|
@ -2157,6 +2157,8 @@ export class VictoryPhase extends PokemonPhase {
|
|||
const multipleParticipantExpBonusModifier = this.scene.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier;
|
||||
const expPartyMembers = party.filter(p => p.hp && p.level < this.scene.getMaxExpLevel());
|
||||
const partyMemberExp = [];
|
||||
|
||||
if (participantIds.size) {
|
||||
let expValue = this.getPokemon().getExpValue();
|
||||
if (this.scene.currentBattle.battleType === BattleType.TRAINER)
|
||||
expValue = Math.floor(expValue * 1.5);
|
||||
|
@ -2214,6 +2216,7 @@ export class VictoryPhase extends PokemonPhase {
|
|||
this.scene.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(this.scene, partyMemberIndex, exp) : new ShowPartyExpBarPhase(this.scene, partyMemberIndex, exp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.scene.getEnemyParty().filter(p => !p?.isFainted(true)).length) {
|
||||
this.scene.pushPhase(new BattleEndPhase(this.scene));
|
||||
|
|
Loading…
Reference in New Issue