Revert egg additive/multiplicative change and change endless biome rotation for every 5 waves. (#3415)
Co-authored-by: snoozbuster <snoozbuster@outlook.com>
This commit is contained in:
parent
94c1c923e4
commit
8783fd81c7
|
@ -1115,27 +1115,11 @@ export default class BattleScene extends SceneBase {
|
||||||
//this.pushPhase(new TrainerMessageTestPhase(this, TrainerType.RIVAL, TrainerType.RIVAL_2, TrainerType.RIVAL_3, TrainerType.RIVAL_4, TrainerType.RIVAL_5, TrainerType.RIVAL_6));
|
//this.pushPhase(new TrainerMessageTestPhase(this, TrainerType.RIVAL, TrainerType.RIVAL_2, TrainerType.RIVAL_3, TrainerType.RIVAL_4, TrainerType.RIVAL_5, TrainerType.RIVAL_6));
|
||||||
|
|
||||||
if (!waveIndex && lastBattle) {
|
if (!waveIndex && lastBattle) {
|
||||||
let isNewBiome = !(lastBattle.waveIndex % 10) || ((this.gameMode.hasShortBiomes || this.gameMode.isDaily) && (lastBattle.waveIndex % 50) === 49);
|
const isWaveIndexMultipleOfTen = !(lastBattle.waveIndex % 10);
|
||||||
if (!isNewBiome && this.gameMode.hasShortBiomes && (lastBattle.waveIndex % 10) < 9) {
|
const isEndlessOrDaily = this.gameMode.hasShortBiomes || this.gameMode.isDaily;
|
||||||
let w = lastBattle.waveIndex - ((lastBattle.waveIndex % 10) - 1);
|
const isEndlessFifthWave = this.gameMode.hasShortBiomes && (lastBattle.waveIndex % 5) === 0;
|
||||||
let biomeWaves = 1;
|
const isWaveIndexMultipleOfFiftyMinusOne = (lastBattle.waveIndex % 50) === 49;
|
||||||
while (w < lastBattle.waveIndex) {
|
const isNewBiome = isWaveIndexMultipleOfTen || isEndlessFifthWave || (isEndlessOrDaily && isWaveIndexMultipleOfFiftyMinusOne);
|
||||||
let wasNewBiome = false;
|
|
||||||
this.executeWithSeedOffset(() => {
|
|
||||||
wasNewBiome = !Utils.randSeedInt(6 - biomeWaves);
|
|
||||||
}, w << 4);
|
|
||||||
if (wasNewBiome) {
|
|
||||||
biomeWaves = 1;
|
|
||||||
} else {
|
|
||||||
biomeWaves++;
|
|
||||||
}
|
|
||||||
w++;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.executeWithSeedOffset(() => {
|
|
||||||
isNewBiome = !Utils.randSeedInt(6 - biomeWaves);
|
|
||||||
}, lastBattle.waveIndex << 4);
|
|
||||||
}
|
|
||||||
const resetArenaState = isNewBiome || this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS;
|
const resetArenaState = isNewBiome || this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS;
|
||||||
this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy());
|
this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy());
|
||||||
this.trySpreadPokerus();
|
this.trySpreadPokerus();
|
||||||
|
|
|
@ -1818,7 +1818,7 @@ export class PokemonExpBoosterModifier extends PokemonHeldItemModifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(args: any[]): boolean {
|
apply(args: any[]): boolean {
|
||||||
(args[1] as Utils.NumberHolder).value += (this.getStackCount() * this.boostMultiplier);
|
(args[1] as Utils.NumberHolder).value = Math.floor((args[1] as Utils.NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier)));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3988,9 +3988,7 @@ export class VictoryPhase extends PokemonPhase {
|
||||||
expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE;
|
expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE;
|
||||||
}
|
}
|
||||||
const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier);
|
const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier);
|
||||||
const modifierBonusExp = new Utils.NumberHolder(1);
|
this.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, pokemonExp);
|
||||||
this.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, modifierBonusExp);
|
|
||||||
pokemonExp.value *= modifierBonusExp.value;
|
|
||||||
partyMemberExp.push(Math.floor(pokemonExp.value));
|
partyMemberExp.push(Math.floor(pokemonExp.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,14 @@ describe("EXP Modifier Items", () => {
|
||||||
game.override.battleType("single");
|
game.override.battleType("single");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("EXP booster items stack additively", async() => {
|
it("EXP booster items stack multiplicatively", async() => {
|
||||||
game.override.startingHeldItems([{name: "LUCKY_EGG"}, {name: "GOLDEN_EGG"}]);
|
game.override.startingHeldItems([{name: "LUCKY_EGG", count: 3}, {name: "GOLDEN_EGG"}]);
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
|
|
||||||
const partyMember = game.scene.getPlayerPokemon()!;
|
const partyMember = game.scene.getPlayerPokemon()!;
|
||||||
const modifierBonusExp = new Utils.NumberHolder(1);
|
partyMember.exp = 100;
|
||||||
partyMember.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, modifierBonusExp);
|
const expHolder = new Utils.NumberHolder(partyMember.exp);
|
||||||
expect(modifierBonusExp.value).toBe(2.4);
|
partyMember.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, expHolder);
|
||||||
|
expect(expHolder.value).toBe(440);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,7 +20,8 @@ export const defaultConfig = {
|
||||||
}
|
}
|
||||||
warn(warning);
|
warn(warning);
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
appType: "mpa",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue