mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
Fix infinite EXP bug
This commit is contained in:
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
Block a user