Fix and Lint Suggestions Pt. 2

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

View File

@ -1,6 +1,6 @@
import { allMoves } from "#data/data-lists";
import { ChallengeType } from "#enums/challenge-type";
import type { MoveId } from "#enums/move-id";
import { MoveId } from "#enums/move-id";
import type { Pokemon } from "#field/pokemon";
import type { Move } from "#moves/move";
import { applyChallenges } from "#utils/challenge-utils";

View File

@ -26,7 +26,7 @@ export class PartyHealPhase extends BattlePhase {
applyChallenges(ChallengeType.PREVENT_REVIVE, preventRevive);
for (const pokemon of globalScene.getPlayerParty()) {
// Prevent reviving fainted pokemon during certain challenges
if (!(pokemon.isFainted() && preventRevive.value)) {
if (pokemon.isFainted() && preventRevive.value) {
continue;
}

View File

@ -34,7 +34,8 @@ describe("Challenges - Permanent Faint", () => {
.battleStyle("single")
.enemySpecies(SpeciesId.VOLTORB)
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH);
.enemyMoveset(MoveId.SPLASH)
.moveset(MoveId.SPLASH);
});
it("should render Revival Blessing unusable by players only", async () => {
@ -43,7 +44,7 @@ describe("Challenges - Permanent Faint", () => {
const player = game.field.getPlayerPokemon();
const revBlessing = player.getMoveset()[0];
expect(revBlessing.isUsable()).toBe(false);
expect(revBlessing.isUsable(player)).toBe(false);
game.move.select(MoveId.REVIVAL_BLESSING);
await game.toEndOfTurn();
@ -57,7 +58,7 @@ describe("Challenges - Permanent Faint", () => {
game.override.startingWave(181).startingLevel(200);
await game.challengeMode.startBattle();
game.move.select(MoveId.RAZOR_LEAF);
game.move.select(MoveId.SPLASH);
await game.doKillOpponents();
await game.phaseInterceptor.to("SelectModifierPhase");
@ -84,7 +85,7 @@ describe("Challenges - Permanent Faint", () => {
faintedPokemon.status = new Status(StatusEffect.FAINT);
expect(faintedPokemon.isFainted()).toBe(true);
game.move.select(MoveId.RAZOR_LEAF);
game.move.select(MoveId.SPLASH);
await game.doKillOpponents();
await game.toNextWave();