diff --git a/public/locales b/public/locales index 87615556d8a..71390cba88f 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 87615556d8a2bd7eef7abac818f84423a8a13b03 +Subproject commit 71390cba88f4103d0d2273d59a6dd8340a4fa54f diff --git a/src/data/move.ts b/src/data/move.ts index 6ed31c45bdd..6ec9fa8fa83 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -9044,11 +9044,7 @@ export function initMoves() { .ignoresSubstitute() .ignoresProtect() .target(MoveTarget.BOTH_SIDES) - .attr(AddArenaTagAttr, ArenaTagType.FAIRY_LOCK, 2, true) - .condition((user, target, move) => { - const turnMove = user.getLastXMoves(1); - return !turnMove.length || turnMove[0].move !== move.id || turnMove[0].result !== MoveResult.SUCCESS; - }), + .attr(AddArenaTagAttr, ArenaTagType.FAIRY_LOCK, 2, true), new SelfStatusMove(Moves.KINGS_SHIELD, Type.STEEL, -1, 10, -1, 4, 6) .attr(ProtectAttr, BattlerTagType.KINGS_SHIELD) .condition(failIfLastCondition), diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index 6d4d46c51c9..c870be6813f 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -17,6 +17,8 @@ import { FieldPhase } from "./field-phase"; import { SelectTargetPhase } from "./select-target-phase"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { isNullOrUndefined } from "#app/utils"; +import { ArenaTagSide } from "#app/data/arena-tag"; +import { ArenaTagType } from "#app/enums/arena-tag-type"; export class CommandPhase extends FieldPhase { protected fieldIndex: integer; @@ -228,23 +230,27 @@ export class CommandPhase extends FieldPhase { }, null, true); } else { const trapTag = playerPokemon.getTag(TrappedTag); + const fairyLockTag = playerPokemon.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER); // trapTag should be defined at this point, but just in case... - if (!trapTag) { + if (!trapTag && !fairyLockTag) { currentBattle.turnCommands[this.fieldIndex] = isSwitch ? { command: Command.POKEMON, cursor: cursor, args: args } : { command: Command.RUN }; break; } - if (!isSwitch) { this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex); this.scene.ui.setMode(Mode.MESSAGE); } this.scene.ui.showText( i18next.t("battle:noEscapePokemon", { - pokemonName: trapTag.sourceId && this.scene.getPokemonById(trapTag.sourceId) ? getPokemonNameWithAffix(this.scene.getPokemonById(trapTag.sourceId)!) : "", - moveName: trapTag.getMoveName(), + pokemonName: trapTag && trapTag.sourceId && this.scene.getPokemonById(trapTag.sourceId) + ? getPokemonNameWithAffix(this.scene.getPokemonById(trapTag.sourceId)!) + : fairyLockTag && fairyLockTag.sourceId && this.scene.getPokemonById(fairyLockTag.sourceId) + ? getPokemonNameWithAffix(this.scene.getPokemonById(fairyLockTag.sourceId)!) + : "", + moveName: trapTag ? trapTag.getMoveName() : fairyLockTag ? fairyLockTag.getMoveName() : "", escapeVerb: isSwitch ? i18next.t("battle:escapeVerbSwitch") : i18next.t("battle:escapeVerbFlee") }), null,