Changes to conditions to restrict master ball use

This commit is contained in:
Wlowscha 2025-08-15 23:16:06 +02:00
parent 8250879324
commit 74f348a25e
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -22,7 +22,7 @@ import type { MoveTargetSet } from "#moves/move";
import { getMoveTargets } from "#moves/move-utils"; import { getMoveTargets } from "#moves/move-utils";
import { FieldPhase } from "#phases/field-phase"; import { FieldPhase } from "#phases/field-phase";
import type { TurnMove } from "#types/turn-move"; import type { TurnMove } from "#types/turn-move";
import { applyChallenges, isNuzlockeChallenge } from "#utils/challenge-utils"; import { applyChallenges } from "#utils/challenge-utils";
import { BooleanHolder } from "#utils/common"; import { BooleanHolder } from "#utils/common";
import i18next from "i18next"; import i18next from "i18next";
@ -429,7 +429,10 @@ export class CommandPhase extends FieldPhase {
return false; return false;
} }
const restrictMasterBall = isNuzlockeChallenge(); // Restricts use of Master Ball against final boss in challenges
const restrictMasterBall =
globalScene.gameMode.isChallenge &&
globalScene.gameMode.isBattleClassicFinalBoss(globalScene.currentBattle.waveIndex);
const numBallTypes = 5; const numBallTypes = 5;
if (cursor < numBallTypes) { if (cursor < numBallTypes) {