fixing the exp bug

This commit is contained in:
PrabbyDD 2024-10-18 13:41:15 -07:00
parent a9affe29c7
commit 141bffe4c3

View File

@ -3038,7 +3038,6 @@ export default class BattleScene extends SceneBase {
const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.getMaxExpLevel()); const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.getMaxExpLevel());
const partyMemberExp: number[] = []; const partyMemberExp: number[] = [];
// EXP value calculation is based off Pokemon.getExpValue // EXP value calculation is based off Pokemon.getExpValue
console.log("PARTIPADOS", this.currentBattle.playerParticipantIds);
if (useWaveIndexMultiplier) { if (useWaveIndexMultiplier) {
expValue = Math.floor(expValue * this.currentBattle.waveIndex / 5 + 1); expValue = Math.floor(expValue * this.currentBattle.waveIndex / 5 + 1);
} }
@ -3117,14 +3116,6 @@ export default class BattleScene extends SceneBase {
if (exp) { if (exp) {
const partyMemberIndex = party.indexOf(expPartyMembers[pm]); const partyMemberIndex = party.indexOf(expPartyMembers[pm]);
// Maybe here?
/*
I think that this hyper specific bug is because initally, the pokemon being switched in right before opposing pokemons death is not counted as participant,
and not in the expPartyMembers maybe?
in the other cause where I switched both in but swapped last second before toxic death, then both had already been involved in fight
*/
this.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(this, partyMemberIndex, exp) : new ShowPartyExpBarPhase(this, partyMemberIndex, exp)); this.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(this, partyMemberIndex, exp) : new ShowPartyExpBarPhase(this, partyMemberIndex, exp));
} }
} }