{
    onTryBoost(boost, target, source, effect) {
        if (!source || target === source || !boost || effect.name === "Mirror Armor" || effect.name === "Prism Scale")
            return;
        let b;
        for (b in boost) {
            if (boost[b] < 0) {
                if (target.boosts[b] === -6)
                    continue;
                const negativeBoost = {};
                negativeBoost[b] = boost[b];
                delete boost[b];
                if (source.hp) {
                    this.add("-ability", target, "Mirror Armor");
                    this.boost(negativeBoost, source, target, null, true);
                }
            }
        }
    },
    flags: { breakable: 1 },
    name: "Mirror Armor",
    rating: 2,
    num: 240
}
