Apply Biome to files

This commit is contained in:
NightKev 2025-03-29 01:23:24 -07:00
parent 5f01caffae
commit ef48ee61de
14 changed files with 66 additions and 73 deletions

View File

@ -214,7 +214,7 @@ const commonSplashMessages = [
"bornToBeAWinner", "bornToBeAWinner",
"onARollout", "onARollout",
"itsAlwaysNightDeepInTheAbyss", "itsAlwaysNightDeepInTheAbyss",
"folksThisIsInsane" "folksThisIsInsane",
]; ];
//#region Seasonal Messages //#region Seasonal Messages
@ -224,10 +224,7 @@ const seasonalSplashMessages: Season[] = [
name: "New Year's", name: "New Year's",
start: "01-01", start: "01-01",
end: "01-15", end: "01-15",
messages: [ messages: ["newYears.happyNewYear", "newYears.andAHappyNewYear"],
"newYears.happyNewYear",
"newYears.andAHappyNewYear"
],
}, },
{ {
name: "Valentines", name: "Valentines",
@ -239,7 +236,7 @@ const seasonalSplashMessages: Season[] = [
"valentines.applinForYou", "valentines.applinForYou",
"valentines.thePowerOfLoveIsThreeThirtyBST", "valentines.thePowerOfLoveIsThreeThirtyBST",
"valentines.haveAHeartScale", "valentines.haveAHeartScale",
"valentines.i<3You" "valentines.i<3You",
], ],
}, },
{ {
@ -279,7 +276,7 @@ const seasonalSplashMessages: Season[] = [
"aprilFools.nowWithQuickTimeEncounters", "aprilFools.nowWithQuickTimeEncounters",
"aprilFools.timeYourInputsForHigherCatchrate", "aprilFools.timeYourInputsForHigherCatchrate",
"aprilFools.certifiedButtonSimulator", "aprilFools.certifiedButtonSimulator",
"aprilFools.iHopeYouGetSuckerPunched" "aprilFools.iHopeYouGetSuckerPunched",
], ],
}, },
{ {
@ -293,7 +290,7 @@ const seasonalSplashMessages: Season[] = [
"halloween.mayContainSpiders", "halloween.mayContainSpiders",
"halloween.spookyScarySkeledirge", "halloween.spookyScarySkeledirge",
"halloween.gourgeistUsedTrickOrTreat", "halloween.gourgeistUsedTrickOrTreat",
"halloween.letsSnuggleForever" "halloween.letsSnuggleForever",
], ],
}, },
{ {
@ -316,7 +313,7 @@ const seasonalSplashMessages: Season[] = [
"winterHoliday.tisTheSeasonToBeSpeSpa", "winterHoliday.tisTheSeasonToBeSpeSpa",
"winterHoliday.deckTheHalls", "winterHoliday.deckTheHalls",
"winterHoliday.saveScummingGetsYouOnTheNaughtyList", "winterHoliday.saveScummingGetsYouOnTheNaughtyList",
"winterHoliday.badTrainersGetRolycoly" "winterHoliday.badTrainersGetRolycoly",
], ],
}, },
]; ];

View File

@ -950,7 +950,7 @@ export function setSetting(setting: string, value: number): boolean {
}, },
{ {
label: "Català", label: "Català",
handler: () => changeLocaleHandler("ca-ES") handler: () => changeLocaleHandler("ca-ES"),
}, },
{ {
label: i18next.t("settings:back"), label: i18next.t("settings:back"),

View File

@ -1150,8 +1150,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
}); });
this.blockInput = false; this.blockInput = false;
} else { } else {
ui.revertMode() ui.revertMode().then(() => {
.then(() => {
console.log("exitCallback", this.exitCallback); console.log("exitCallback", this.exitCallback);
if (this.exitCallback instanceof Function) { if (this.exitCallback instanceof Function) {
const exitCallback = this.exitCallback; const exitCallback = this.exitCallback;

View File

@ -135,9 +135,7 @@ describe("Abilities - Desolate Land", () => {
}); });
it("should lift after fleeing from a wild pokemon", async () => { it("should lift after fleeing from a wild pokemon", async () => {
game.override game.override.enemyAbility(Abilities.DESOLATE_LAND).ability(Abilities.BALL_FETCH);
.enemyAbility(Abilities.DESOLATE_LAND)
.ability(Abilities.BALL_FETCH);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([Species.MAGIKARP]);
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.HARSH_SUN); expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.HARSH_SUN);

View File

@ -40,7 +40,13 @@ describe("Abilities - Flower Gift", () => {
* *
* @returns Two numbers, the first being the damage done to the target without flower gift active, the second being the damage done with flower gift active * @returns Two numbers, the first being the damage done to the target without flower gift active, the second being the damage done with flower gift active
*/ */
const testDamageDealt = async (game: GameManager, move: Moves, allyAttacker: boolean, allyAbility = Abilities.BALL_FETCH, enemyAbility = Abilities.BALL_FETCH): Promise<[number, number]> => { const testDamageDealt = async (
game: GameManager,
move: Moves,
allyAttacker: boolean,
allyAbility = Abilities.BALL_FETCH,
enemyAbility = Abilities.BALL_FETCH,
): Promise<[number, number]> => {
game.override.battleType("double"); game.override.battleType("double");
game.override.moveset([Moves.SPLASH, Moves.SUNNY_DAY, move, Moves.HEAL_PULSE]); game.override.moveset([Moves.SPLASH, Moves.SUNNY_DAY, move, Moves.HEAL_PULSE]);
game.override.enemyMoveset([Moves.SPLASH, Moves.HEAL_PULSE]); game.override.enemyMoveset([Moves.SPLASH, Moves.HEAL_PULSE]);
@ -82,7 +88,6 @@ describe("Abilities - Flower Gift", () => {
return [damageWithoutGift, damageWithGift]; return [damageWithoutGift, damageWithGift];
}; };
beforeAll(() => { beforeAll(() => {
phaserGame = new Phaser.Game({ phaserGame = new Phaser.Game({
type: Phaser.HEADLESS, type: Phaser.HEADLESS,
@ -144,7 +149,13 @@ describe("Abilities - Flower Gift", () => {
}); });
it("should not decrease the damage an ally takes from a mold breaker enemy using a special attack", async () => { it("should not decrease the damage an ally takes from a mold breaker enemy using a special attack", async () => {
const [ damageWithoutGift, damageWithGift ] = await testDamageDealt(game, Moves.MUD_SLAP, false, Abilities.BALL_FETCH, Abilities.MOLD_BREAKER); const [damageWithoutGift, damageWithGift] = await testDamageDealt(
game,
Moves.MUD_SLAP,
false,
Abilities.BALL_FETCH,
Abilities.MOLD_BREAKER,
);
expect(damageWithGift).toBe(damageWithoutGift); expect(damageWithGift).toBe(damageWithoutGift);
}); });

View File

@ -160,9 +160,7 @@ describe("Abilities - Neutralizing Gas", () => {
}); });
it("should deactivate after fleeing from a wild pokemon", async () => { it("should deactivate after fleeing from a wild pokemon", async () => {
game.override game.override.enemyAbility(Abilities.NEUTRALIZING_GAS).ability(Abilities.BALL_FETCH);
.enemyAbility(Abilities.NEUTRALIZING_GAS)
.ability(Abilities.BALL_FETCH);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([Species.MAGIKARP]);
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined(); expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined();

View File

@ -9,7 +9,7 @@ describe("Data - Splash Messages", () => {
// Make sure to adjust this test if the weight is changed! // Make sure to adjust this test if the weight is changed!
it("should add contain 15 `battlesWon` splash messages", () => { it("should add contain 15 `battlesWon` splash messages", () => {
const battlesWonMessages = getSplashMessages().filter((message) => message === "splashMessages:battlesWon"); const battlesWonMessages = getSplashMessages().filter(message => message === "splashMessages:battlesWon");
expect(battlesWonMessages).toHaveLength(15); expect(battlesWonMessages).toHaveLength(15);
}); });

View File

@ -47,12 +47,9 @@ describe("Items - Reviver Seed", () => {
{ moveType: "Fixed Damage Move", move: Moves.SEISMIC_TOSS }, { moveType: "Fixed Damage Move", move: Moves.SEISMIC_TOSS },
{ moveType: "Final Gambit", move: Moves.FINAL_GAMBIT }, { moveType: "Final Gambit", move: Moves.FINAL_GAMBIT },
{ moveType: "Counter", move: Moves.COUNTER }, { moveType: "Counter", move: Moves.COUNTER },
{ moveType: "OHKO", move: Moves.SHEER_COLD } { moveType: "OHKO", move: Moves.SHEER_COLD },
])("should activate the holder's reviver seed from a $moveType", async ({ move }) => { ])("should activate the holder's reviver seed from a $moveType", async ({ move }) => {
game.override game.override.enemyLevel(100).startingLevel(1).enemyMoveset(move);
.enemyLevel(100)
.startingLevel(1)
.enemyMoveset(move);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
player.damageAndUpdate(player.hp - 1); player.damageAndUpdate(player.hp - 1);
@ -67,10 +64,7 @@ describe("Items - Reviver Seed", () => {
}); });
it("should activate the holder's reviver seed from confusion self-hit", async () => { it("should activate the holder's reviver seed from confusion self-hit", async () => {
game.override game.override.enemyLevel(1).startingLevel(100).enemyMoveset(Moves.SPLASH);
.enemyLevel(1)
.startingLevel(100)
.enemyMoveset(Moves.SPLASH);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
player.damageAndUpdate(player.hp - 1); player.damageAndUpdate(player.hp - 1);

View File

@ -116,11 +116,7 @@ describe("Moves - Revival Blessing", () => {
}); });
it("should not summon multiple pokemon to the same slot when reviving the enemy ally in doubles", async () => { it("should not summon multiple pokemon to the same slot when reviving the enemy ally in doubles", async () => {
game.override game.override.battleType("double").enemyMoveset([Moves.REVIVAL_BLESSING]).moveset([Moves.SPLASH]).startingWave(25); // 2nd rival battle - must have 3+ pokemon
.battleType("double")
.enemyMoveset([ Moves.REVIVAL_BLESSING ])
.moveset([ Moves.SPLASH ])
.startingWave(25); // 2nd rival battle - must have 3+ pokemon
await game.classicMode.startBattle([Species.ARCEUS, Species.GIRATINA]); await game.classicMode.startBattle([Species.ARCEUS, Species.GIRATINA]);
const enemyFainting = game.scene.getEnemyField()[0]; const enemyFainting = game.scene.getEnemyField()[0];