{
    num: 880,
    accuracy: true,
    basePower: 0,
    category: "Status",
    name: "Shed Tail",
    pp: 10,
    priority: 0,
    flags: {},
    volatileStatus: "substitute",
    onTryHit(source) {
        if (!this.canSwitch(source.side) || source.volatiles["commanded"]) {
            this.add("-fail", source);
            return this.NOT_FAIL;
        }
        if (source.volatiles["substitute"]) {
            this.add("-fail", source, "move: Shed Tail");
            return this.NOT_FAIL;
        }
        if (source.hp <= Math.ceil(source.maxhp * 0.6)) {
            this.add("-fail", source, "move: Shed Tail", "[weak]");
            return this.NOT_FAIL;
        }
    },
    onHit(target) {
        this.directDamage(Math.ceil(target.maxhp * 0.6));
    },
    self: {
        onHit(source) {
            source.skipBeforeSwitchOutEventFlag = true;
        }
    },
    selfSwitch: "shedtail",
    secondary: null,
    target: "self",
    type: "Normal",
    zMove: { effect: "clearnegativeboost" }
}
