From 3ca944efa6ea731231466e54c766b2533021edff Mon Sep 17 00:00:00 2001 From: xsn34kzx Date: Wed, 6 Aug 2025 23:24:03 -0400 Subject: [PATCH] Rename Challenges --- public/locales | 2 +- src/data/challenge.ts | 28 +++++++++---------- src/enums/challenges.ts | 4 +-- src/system/achv.ts | 2 +- ...rmanent-faint.test.ts => hardcore.test.ts} | 4 +-- ...upport.test.ts => limited-support.test.ts} | 8 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) rename test/challenges/{permanent-faint.test.ts => hardcore.test.ts} (98%) rename test/challenges/{no-support.test.ts => limited-support.test.ts} (91%) diff --git a/public/locales b/public/locales index 7898c0018a7..08299b8b87d 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 7898c0018a70601a6ead76c9dd497ff966cc2e2a +Subproject commit 08299b8b87de17327b7f381afcb5cf1d1469cf20 diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 117c2597f17..724d1f302da 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -940,9 +940,9 @@ export class LowerStarterPointsChallenge extends Challenge { /** * Implements a No Support challenge */ -export class NoSupportChallenge extends Challenge { +export class LimitedSupportChallenge extends Challenge { constructor() { - super(Challenges.NO_SUPPORT, 3); + super(Challenges.LIMITED_SUPPORT, 3); } override applyPartyHeal(status: BooleanHolder): boolean { @@ -961,8 +961,8 @@ export class NoSupportChallenge extends Challenge { return false; } - static override loadChallenge(source: NoSupportChallenge | any): NoSupportChallenge { - const newChallenge = new NoSupportChallenge(); + static override loadChallenge(source: LimitedSupportChallenge | any): LimitedSupportChallenge { + const newChallenge = new LimitedSupportChallenge(); newChallenge.value = source.value; newChallenge.severity = source.severity; return newChallenge; @@ -996,9 +996,9 @@ export class LimitedCatchChallenge extends Challenge { /** * Implements a Permanent Faint challenge */ -export class PermanentFaintChallenge extends Challenge { +export class HardcoreChallenge extends Challenge { constructor() { - super(Challenges.PERMANENT_FAINT, 1); + super(Challenges.HARDCORE, 1); } override applyPokemonFusion(pokemon: PlayerPokemon, status: BooleanHolder): boolean { @@ -1034,8 +1034,8 @@ export class PermanentFaintChallenge extends Challenge { return false; } - static override loadChallenge(source: PermanentFaintChallenge | any): PermanentFaintChallenge { - const newChallenge = new PermanentFaintChallenge(); + static override loadChallenge(source: HardcoreChallenge | any): HardcoreChallenge { + const newChallenge = new HardcoreChallenge(); newChallenge.value = source.value; newChallenge.severity = source.severity; return newChallenge; @@ -1065,10 +1065,10 @@ export function copyChallenge(source: Challenge | any): Challenge { return FlipStatChallenge.loadChallenge(source); case Challenges.LIMITED_CATCH: return LimitedCatchChallenge.loadChallenge(source); - case Challenges.NO_SUPPORT: - return NoSupportChallenge.loadChallenge(source); - case Challenges.PERMANENT_FAINT: - return PermanentFaintChallenge.loadChallenge(source); + case Challenges.LIMITED_SUPPORT: + return LimitedSupportChallenge.loadChallenge(source); + case Challenges.HARDCORE: + return HardcoreChallenge.loadChallenge(source); } throw new Error("Unknown challenge copied"); } @@ -1078,9 +1078,9 @@ export const allChallenges: Challenge[] = []; export function initChallenges() { allChallenges.push( new FreshStartChallenge(), - new PermanentFaintChallenge(), + new HardcoreChallenge(), new LimitedCatchChallenge(), - new NoSupportChallenge(), + new LimitedSupportChallenge(), new SingleGenerationChallenge(), new SingleTypeChallenge(), new InverseBattleChallenge(), diff --git a/src/enums/challenges.ts b/src/enums/challenges.ts index 951c8707255..8d4f4c7a22a 100644 --- a/src/enums/challenges.ts +++ b/src/enums/challenges.ts @@ -7,6 +7,6 @@ export enum Challenges { INVERSE_BATTLE, FLIP_STAT, LIMITED_CATCH, - NO_SUPPORT, - PERMANENT_FAINT, + LIMITED_SUPPORT, + HARDCORE, } diff --git a/src/system/achv.ts b/src/system/achv.ts index 26c0ebfb0e9..383d07252e6 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -933,7 +933,7 @@ export const achvs = { c => c instanceof LimitedCatchChallenge && c.value > 0 && - globalScene.gameMode.challenges.some(c => c.id === Challenges.PERMANENT_FAINT && c.value > 0) && + globalScene.gameMode.challenges.some(c => c.id === Challenges.HARDCORE && c.value > 0) && globalScene.gameMode.challenges.some(c => c.id === Challenges.FRESH_START && c.value > 0), ), BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(), diff --git a/test/challenges/permanent-faint.test.ts b/test/challenges/hardcore.test.ts similarity index 98% rename from test/challenges/permanent-faint.test.ts rename to test/challenges/hardcore.test.ts index b952ea36a38..0f4ab1b9f02 100644 --- a/test/challenges/permanent-faint.test.ts +++ b/test/challenges/hardcore.test.ts @@ -12,7 +12,7 @@ import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -describe("Challenges - Permanent Faint", () => { +describe("Challenges - Hardcore", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -29,7 +29,7 @@ describe("Challenges - Permanent Faint", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.challengeMode.addChallenge(Challenges.PERMANENT_FAINT, 1, 1); + game.challengeMode.addChallenge(Challenges.HARDCORE, 1, 1); game.override .battleStyle("single") .enemySpecies(SpeciesId.VOLTORB) diff --git a/test/challenges/no-support.test.ts b/test/challenges/limited-support.test.ts similarity index 91% rename from test/challenges/no-support.test.ts rename to test/challenges/limited-support.test.ts index 6f525dd96c2..5c0eb2bd420 100644 --- a/test/challenges/no-support.test.ts +++ b/test/challenges/limited-support.test.ts @@ -8,7 +8,7 @@ import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -describe("Challenges - No Support", () => { +describe("Challenges - Limited Support", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -34,7 +34,7 @@ describe("Challenges - No Support", () => { it('should disable the shop in "No Shop"', async () => { game.override.startingWave(181); - game.challengeMode.addChallenge(Challenges.NO_SUPPORT, 2, 1); + game.challengeMode.addChallenge(Challenges.LIMITED_SUPPORT, 2, 1); await game.challengeMode.startBattle([SpeciesId.NUZLEAF]); game.move.use(MoveId.SPLASH); @@ -50,7 +50,7 @@ describe("Challenges - No Support", () => { it('should disable the automatic party heal in "No Heal"', async () => { game.override.startingWave(10); - game.challengeMode.addChallenge(Challenges.NO_SUPPORT, 1, 1); + game.challengeMode.addChallenge(Challenges.LIMITED_SUPPORT, 1, 1); await game.challengeMode.startBattle([SpeciesId.NUZLEAF]); const playerPokemon = game.field.getPlayerPokemon(); @@ -65,7 +65,7 @@ describe("Challenges - No Support", () => { it('should disable both automatic party healing and shop in "Both"', async () => { game.override.startingWave(10); - game.challengeMode.addChallenge(Challenges.NO_SUPPORT, 3, 1); + game.challengeMode.addChallenge(Challenges.LIMITED_SUPPORT, 3, 1); await game.challengeMode.startBattle([SpeciesId.NUZLEAF]); const playerPokemon = game.field.getPlayerPokemon();