{
    num: 587,
    accuracy: true,
    basePower: 0,
    category: "Status",
    name: "Fairy Lock",
    pp: 10,
    priority: 0,
    flags: {mirror: 1, bypasssub: 1, metronome: 1},
    pseudoWeather: 'fairylock',
    condition: {
        duration: 2,
        onFieldStart(target, source) {
            this.add('-fieldactivate', 'move: Fairy Lock');
            this.field.fairyLockUser = source.side;
        },
        onTrapPokemon(pokemon) {
            pokemon.tryTrap();
        },
        onDragOut(pokemon) {
            this.add('-activate', pokemon, 'move: Fairy Lock');
            return null;
        },
        onDisableMove(pokemon) {
            if (this.field.fairyLockUser !== pokemon.side) {
                for (const moveSlot of pokemon.moveSlots) {
                    const move = this.dex.moves.get(moveSlot.id);
                    if (move.category === 'Status' && move.id !== 'mefirst') {
                        pokemon.disableMove(moveSlot.id);
                    }
                }
            }
        },
        onBeforeMovePriority: 5,
        onBeforeMove(attacker, defender, move) {
            if (this.field.fairyLockUser !== attacker.side) {
                if (!move.isZ && !move.isMax && move.category === 'Status' && move.id !== 'mefirst') {
                    this.add('cant', attacker, 'move: Fairy Lock', move);
                    return false;
                }
            }
        },
    },
    secondary: null,
    target: "all",
    type: "Fairy",
    zMove: {boost: {def: 1}},
    contestType: "Clever",
}
