Attempt fixing crash when getting EXP value
parent
6ab6360ec9
commit
59767c7607
|
@ -2007,9 +2007,11 @@ export class VictoryPhase extends PokemonPhase {
|
|||
const expShareModifier = this.scene.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier;
|
||||
const expBalanceModifier = this.scene.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier;
|
||||
const multipleParticipantExpBonusModifier = this.scene.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier;
|
||||
const expValue = this.getPokemon().getExpValue();
|
||||
const expPartyMembers = party.filter(p => p.hp && p.level < this.scene.getMaxExpLevel());
|
||||
const partyMemberExp = [];
|
||||
let expValue = this.getPokemon().getExpValue();
|
||||
if (this.scene.currentBattle.battleType === BattleType.TRAINER)
|
||||
expValue = Math.floor(expValue * 1.5);
|
||||
for (let partyMember of expPartyMembers) {
|
||||
const pId = partyMember.id;
|
||||
const participated = participantIds.has(pId);
|
||||
|
|
|
@ -990,10 +990,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
|
||||
getExpValue(): integer {
|
||||
// Logic to factor in victor level has been removed for balancing purposes, so the player doesn't have to focus on EXP maxxing
|
||||
let ret = ((this.getSpeciesForm().baseExp * this.level) / 5 + 1);
|
||||
if (this.scene.currentBattle.battleType === BattleType.TRAINER)
|
||||
ret = Math.floor(ret * 1.5);
|
||||
return ret;
|
||||
return ((this.getSpeciesForm().baseExp * this.level) / 5 + 1);
|
||||
}
|
||||
|
||||
setFrameRate(frameRate: integer) {
|
||||
|
|
Loading…
Reference in New Issue