fix unit test breaks
This commit is contained in:
parent
70fc4b67ae
commit
a598c1cb05
|
@ -1038,8 +1038,6 @@ export default class BattleScene extends SceneBase {
|
|||
|
||||
const playerField = this.getPlayerField();
|
||||
|
||||
this.newArena(Biome.VOLCANO);
|
||||
|
||||
if (this.gameMode.isFixedBattle(newWaveIndex) && trainerData === undefined) {
|
||||
battleConfig = this.gameMode.getFixedBattle(newWaveIndex);
|
||||
newDouble = battleConfig.double;
|
||||
|
|
|
@ -34,7 +34,7 @@ export function doTrainerExclamation(scene: BattleScene) {
|
|||
const exclamationSprite = scene.addFieldSprite(0, 0, "exclaim");
|
||||
exclamationSprite.setName("exclamation");
|
||||
scene.field.add(exclamationSprite);
|
||||
scene.field.moveTo(exclamationSprite, scene.field.list.length - 1);
|
||||
scene.field.moveTo(exclamationSprite, scene.field.getAll().length - 1);
|
||||
exclamationSprite.setVisible(true);
|
||||
exclamationSprite.setPosition(110, 68);
|
||||
scene.tweens.add({
|
||||
|
@ -475,7 +475,7 @@ export function setEncounterExp(scene: BattleScene, participantId: integer | int
|
|||
const nonFaintedPartyMembers = party.filter(p => p.hp);
|
||||
const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < scene.getMaxExpLevel());
|
||||
const partyMemberExp = [];
|
||||
let expValue = baseExpValue * (useWaveIndex ? scene.currentBattle.waveIndex : 1) / 5 + 1;
|
||||
let expValue = Math.floor(baseExpValue * (useWaveIndex ? scene.currentBattle.waveIndex : 1) / 5 + 1);
|
||||
|
||||
if (participantIds?.length > 0) {
|
||||
if (scene.currentBattle.mysteryEncounter.encounterVariant === MysteryEncounterVariant.TRAINER_BATTLE) {
|
||||
|
|
|
@ -122,7 +122,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||
|
||||
await runSelectMysteryEncounterOption(game, 2);
|
||||
|
||||
expect(blastoise.exp).toBe(expBefore + laprasSpecies.baseExp * defaultWave);
|
||||
expect(blastoise.exp).toBe(expBefore + Math.floor(laprasSpecies.baseExp * defaultWave / 5 + 1));
|
||||
});
|
||||
|
||||
it("should leave encounter without battle", async () => {
|
||||
|
@ -171,7 +171,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||
|
||||
await runSelectMysteryEncounterOption(game, 2);
|
||||
|
||||
expect(pidgeot.exp).toBe(expBefore + laprasBaseExp * wave);
|
||||
expect(pidgeot.exp).toBe(expBefore + Math.floor(laprasBaseExp * defaultWave / 5 + 1));
|
||||
});
|
||||
|
||||
it("should leave encounter without battle", async () => {
|
||||
|
|
|
@ -154,6 +154,10 @@ export default class MockContainer {
|
|||
// Sends this Game Object to the back of its parent's display list.
|
||||
}
|
||||
|
||||
moveTo(obj) {
|
||||
// Moves this Game Object to the given index in the list.
|
||||
}
|
||||
|
||||
moveAbove(obj) {
|
||||
// Moves this Game Object to be above the given Game Object in the display list.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue