This commit is contained in:
frutescens 2024-09-20 15:57:37 -07:00
parent 6939034cfa
commit 8ef191c29d

View File

@ -24,7 +24,7 @@ export class SelectTargetPhase extends PokemonPhase {
const moveObject = allMoves[move!]; const moveObject = allMoves[move!];
const hasTargetRestriction = user.isMoveTargetRestricted(moveObject.id, user, fieldSide[targets[0]]); const hasTargetRestriction = user.isMoveTargetRestricted(moveObject.id, user, fieldSide[targets[0]]);
if (moveObject && hasTargetRestriction) { if (moveObject && hasTargetRestriction) {
const errorMessage = user.getRestrictingTag(move, hasTargetRestriction)!.selectionDeniedText(user, moveObject.id); const errorMessage = user.getRestrictingTag(move!, hasTargetRestriction)!.selectionDeniedText(user, moveObject.id);
user.scene.queueMessage(i18next.t(errorMessage, { moveName: moveObject.name }), 0, true); user.scene.queueMessage(i18next.t(errorMessage, { moveName: moveObject.name }), 0, true);
targets.length = 0; targets.length = 0;
} }