{
    num: 852,
    accuracy: true,
    basePower: 0,
    category: "Status",
    name: "Silk Trap",
    pp: 10,
    priority: 4,
    flags: {},
    stallingMove: true,
    volatileStatus: "silktrap",
    onPrepareHit(pokemon) {
        return !!this.queue.willAct() && this.runEvent("StallMove", pokemon);
    },
    onHit(pokemon) {
        pokemon.addVolatile("stall");
    },
    condition: {
        duration: 1,
        onStart(target) {
            this.add("-singleturn", target, "Protect");
        },
        onTryHitPriority: 3,
        onTryHit(target, source, move) {
            if (!move.flags["protect"] || move.category === "Status") {
                if (move.isZ || move.isMax)
                    target.getMoveHitData(move).zBrokeProtect = true;
                return;
            }
            if (move.smartTarget) {
                move.smartTarget = false;
            } else {
                this.add("-activate", target, "move: Protect");
            }
            const lockedmove = source.getVolatile("lockedmove");
            if (lockedmove) {
                if (source.volatiles["lockedmove"].duration === 2) {
                    delete source.volatiles["lockedmove"];
                }
            }
            if (this.checkMoveMakesContact(move, source, target)) {
                this.boost({ spe: -1 }, source, target, this.dex.getActiveMove("Silk Trap"));
            }
            return this.NOT_FAIL;
        },
        onHit(target, source, move) {
            if (move.isZOrMaxPowered && this.checkMoveMakesContact(move, source, target)) {
                this.boost({ spe: -2 }, source, target, this.dex.getActiveMove("Silk Trap"));
            }
        }
    },
    target: "self",
    type: "Bug"
}
