{
    num: 477,
    accuracy: true,
    basePower: 0,
    category: "Status",
    isNonstandard: "Past",
    name: "Telekinesis",
    pp: 15,
    priority: 0,
    flags: {protect: 1, reflectable: 1, mirror: 1, gravity: 1, allyanim: 1, metronome: 1},
    volatileStatus: 'telekinesis',
    onTry(source, target, move) {
        if (this.field.getPseudoWeather('Gravity')) {
            this.attrLastMove('[still]');
            this.add('cant', source, 'move: Gravity', move);
            return null;
        }
    },
    condition: {
        duration: 3,
        onStart(target) {
            if (['Diglett', 'Dugtrio', 'Palossand', 'Sandygast', 'Wiglett', 'Wugtrio'].includes(target.baseSpecies.baseSpecies) ||
                target.baseSpecies.name === 'Gengar-Mega') {
                this.add('-immune', target);
            return null;
                }
                if (target.volatiles['smackdown'] || target.volatiles['ingrain']) return false;
                this.add('-start', target, 'Telekinesis');
        },
        onAccuracyPriority: -1,
        onAccuracy(accuracy, target, source, move) {
            if (move && !move.ohko) return true;
        },
        onImmunity(type) {
            if (type === 'Ground') return false;
        },
        onDisableMove(pokemon) {
            for (const moveSlot of pokemon.moveSlots) {
                const move = this.dex.moves.get(moveSlot.id);
                if (move.type === 'Ground') {
                    pokemon.disableMove(move.id);
                }
            }
        },
        onBeforeMove(pokemon, target, move) {
            if (move.type === 'Ground') {
                this.add('cant', pokemon, 'move: Telekinesis', move);
                return false;
            }
        },
        onUpdate(pokemon) {
            if (pokemon.baseSpecies.name === 'Gengar-Mega') {
                delete pokemon.volatiles['telekinesis'];
                this.add('-end', pokemon, 'Telekinesis', '[silent]');
            }
        },
        onResidualOrder: 19,
        onEnd(target) {
            this.add('-end', target, 'Telekinesis');
        },
    },
    secondary: null,
    target: "normal",
    type: "Psychic",
    zMove: {boost: {spa: 1}},
    contestType: "Clever",
}
