{
    onFoeTryMove(target, source, move) {
        const targetAllExceptions = ["perishsong", "flowershield", "rototiller"];
        if (move.target === "foeSide" || move.target === "all" && !targetAllExceptions.includes(move.id)) {
            return;
        }
        const armorTailHolder = this.effectState.target;
        if ((source.isAlly(armorTailHolder) || move.target === "all") && move.priority > 0.1) {
            this.attrLastMove("[still]");
            this.add("cant", armorTailHolder, "ability: Armor Tail", move, "[of] " + target);
            return false;
        }
    },
    onTryBoost(boost, target, source, effect) {
        if (source && target === source)
            return;
        if (boost.def && boost.def < 0) {
            delete boost.def;
            if (!effect.secondaries && effect.id !== "octolock") {
                this.add("-fail", target, "unboost", "Defense", "[from] ability: Armor Tail", "[of] " + target);
            }
        }
    },
    flags: { breakable: 1 },
    name: "Armor Tail",
    rating: 2.5,
    num: 296
}
