Rename Challenges

This commit is contained in:
xsn34kzx 2025-08-06 23:24:03 -04:00
parent 39de822d7b
commit 3ca944efa6
6 changed files with 24 additions and 24 deletions

@ -1 +1 @@
Subproject commit 7898c0018a70601a6ead76c9dd497ff966cc2e2a
Subproject commit 08299b8b87de17327b7f381afcb5cf1d1469cf20

View File

@ -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(),

View File

@ -7,6 +7,6 @@ export enum Challenges {
INVERSE_BATTLE,
FLIP_STAT,
LIMITED_CATCH,
NO_SUPPORT,
PERMANENT_FAINT,
LIMITED_SUPPORT,
HARDCORE,
}

View File

@ -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(),

View File

@ -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)

View File

@ -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();