Add move text

This commit is contained in:
Dean 2024-12-27 16:57:22 -08:00
parent f4ad6381d2
commit 50bd949a40
1 changed files with 2 additions and 0 deletions

View File

@ -7667,6 +7667,8 @@ export class ForceLastAttr extends MoveEffectAttr {
* @returns true * @returns true
*/ */
override apply(user: Pokemon, target: Pokemon, _move: Move, _args: any[]): boolean { override apply(user: Pokemon, target: Pokemon, _move: Move, _args: any[]): boolean {
user.scene.queueMessage(i18next.t("moveTriggers:forceLast", { targetPokemonName: getPokemonNameWithAffix(target) }));
const targetMovePhase = target.scene.findPhase<MovePhase>((phase) => phase.pokemon === target); const targetMovePhase = target.scene.findPhase<MovePhase>((phase) => phase.pokemon === target);
if (targetMovePhase && !targetMovePhase.isForcedLast() && target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) { if (targetMovePhase && !targetMovePhase.isForcedLast() && target.scene.tryRemovePhase((phase: MovePhase) => phase.pokemon === target)) {
// Finding the phase to insert the move in front of - // Finding the phase to insert the move in front of -