{
    num: 536,
    accuracy: 100,
    basePower: 60,
    category: "Special",
    isNonstandard: "Past",
    name: "Leaf Tornado",
    pp: 10,
    priority: 0,
    flags: { protect: 1, mirror: 1, metronome: 1 },
    onAfterHit(target, pokemon, move) {
        if (!move.hasSheerForce) {
            if (pokemon.hp && pokemon.removeVolatile("leechseed")) {
                this.add("-end", pokemon, "Leech Seed", "[from] move: Rapid Spin", "[of] " + pokemon);
            }
            const sideConditions = ["spikes", "toxicspikes", "stealthrock", "stickyweb", "gmaxsteelsurge"];
            for (const condition of sideConditions) {
                if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
                    this.add("-sideend", pokemon.side, this.dex.conditions.get(condition).name, "[from] move: Leaf Tornado", "[of] " + pokemon);
                }
            }
            for (const condition of sideConditions) {
                if (target.hp && target.side.removeSideCondition(condition)) {
                    this.add("-sideend", target.side, this.dex.conditions.get(condition).name, "[from] move: Leaf Tornado", "[of] " + pokemon);
                }
            }
            if (pokemon.hp && pokemon.volatiles["partiallytrapped"]) {
                pokemon.removeVolatile("partiallytrapped");
            }
        }
    },
    onAfterSubDamage(damage, target, pokemon, move) {
        if (!move.hasSheerForce) {
            if (pokemon.hp && pokemon.removeVolatile("leechseed")) {
                this.add("-end", pokemon, "Leech Seed", "[from] move: Leaf Tornado", "[of] " + pokemon);
            }
            const sideConditions = ["spikes", "toxicspikes", "stealthrock", "stickyweb", "gmaxsteelsurge"];
            for (const condition of sideConditions) {
                if (pokemon.hp && pokemon.side.removeSideCondition(condition)) {
                    this.add("-sideend", pokemon.side, this.dex.conditions.get(condition).name, "[from] move: Leaf Tornado", "[of] " + pokemon);
                }
            }
            for (const condition of sideConditions) {
                if (target.hp && target.side.removeSideCondition(condition)) {
                    this.add("-sideend", target.side, this.dex.conditions.get(condition).name, "[from] move: Leaf Tornado", "[of] " + pokemon);
                }
            }
            if (pokemon.hp && pokemon.volatiles["partiallytrapped"]) {
                pokemon.removeVolatile("partiallytrapped");
            }
        }
    },
    target: "normal",
    type: "Grass",
    contestType: "Cool"
}
