{
    num: 134,
    accuracy: 100,
    basePower: 0,
    category: "Status",
    isNonstandard: "Past",
    name: "Kinesis",
    pp: 15,
    priority: 0,
    flags: {protect: 1, reflectable: 1, mirror: 1, metronome: 1},
    onHit(target, source, move) {

        if (target.side.getSideCondition('stealthrock')) {
            const typeMod = this.dex.getEffectiveness('Rock', target);
            let rockDamage = target.maxhp / 8;
            if (typeMod > 0) {
                rockDamage *= Math.pow(2, typeMod);
            } else if (typeMod < 0) {
                rockDamage /= Math.pow(2, -typeMod);
            }
            this.damage(rockDamage, target, source);
        }


        if (target.side.getSideCondition('gmaxsteelsurge')) {
            const typeMod = this.dex.getEffectiveness('Steel', target);
            let steelDamage = target.maxhp / 8;
            if (typeMod > 0) {
                steelDamage *= Math.pow(2, typeMod);
            } else if (typeMod < 0) {
                steelDamage /= Math.pow(2, -typeMod);
            }
            this.damage(steelDamage, target, source);
        }


        const spikesLayersTarget = target.side.sideConditions['spikes']?.layers || 0;
        if (spikesLayersTarget && !target.hasType('Flying')) {
            const spikesDamage = [0, target.maxhp / 8, target.maxhp / 6, target.maxhp / 4][spikesLayersTarget];
            this.damage(spikesDamage, target, source);
        }


        const toxicSpikesLayersTarget = target.side.sideConditions['toxicspikes']?.layers || 0;
        if (toxicSpikesLayersTarget && !target.hasType('Poison') && !target.hasType('Steel') && !target.hasType('Flying')) {
            if (toxicSpikesLayersTarget === 1) {
                target.trySetStatus('psn', source);
            } else if (toxicSpikesLayersTarget === 2) {
                target.trySetStatus('tox', source);
            }
        }


        if (target.side.getSideCondition('stickyweb') && !target.hasType('Flying') && !target.hasAbility('Levitate')) {
            this.boost({spe: -1}, target, source);
        }

        if (source.side.getSideCondition('stealthrock')) {
            const typeMod = this.dex.getEffectiveness('Rock', target);
            let rockDamage = target.maxhp / 8;
            if (typeMod > 0) {
                rockDamage *= Math.pow(2, typeMod);
            } else if (typeMod < 0) {
                rockDamage /= Math.pow(2, -typeMod);
            }
            this.damage(rockDamage, target, source);
        }

        if (source.side.getSideCondition('gmaxsteelsurge')) {
            const typeMod = this.dex.getEffectiveness('Steel', target);
            let steelDamage = target.maxhp / 8;
            if (typeMod > 0) {
                steelDamage *= Math.pow(2, typeMod);
            } else if (typeMod < 0) {
                steelDamage /= Math.pow(2, -typeMod);
            }
            this.damage(steelDamage, target, source);
        }

        const spikesLayersSource = source.side.sideConditions['spikes']?.layers || 0;
        if (spikesLayersSource && !target.hasType('Flying')) {
            const spikesDamage = [0, target.maxhp / 8, target.maxhp / 6, target.maxhp / 4][spikesLayersSource];
            this.damage(spikesDamage, target, source);
        }


        const toxicSpikesLayersSource = source.side.sideConditions['toxicspikes']?.layers || 0;
        if (toxicSpikesLayersSource && !target.hasType('Poison') && !target.hasType('Steel') && !target.hasType('Flying')) {
            if (toxicSpikesLayersSource === 1) {
                target.trySetStatus('psn', source);
            } else if (toxicSpikesLayersSource === 2) {
                target.trySetStatus('tox', source);
            }
        }


        if (source.side.getSideCondition('stickyweb') && !target.hasType('Flying') && !target.hasAbility('Levitate')) {
            this.boost({spe: -1}, target, source);
        }




        if (source.side.getSideCondition('stealthrock')) {
            target.side.addSideCondition('stealthrock');
            source.side.removeSideCondition('stealthrock');
        }


        if (source.side.getSideCondition('gmaxsteelsurge')) {
            target.side.addSideCondition('gmaxsteelsurge');
            source.side.removeSideCondition('gmaxsteelsurge');
        }


        const spikesLayers = source.side.sideConditions['spikes']?.layers || 0;
        if (spikesLayers) {
            target.side.addSideCondition('spikes');
            target.side.sideConditions['spikes'].layers = spikesLayers;
            source.side.removeSideCondition('spikes');
        }


        const toxicSpikesLayers = source.side.sideConditions['toxicspikes']?.layers || 0;
        if (toxicSpikesLayers) {
            target.side.addSideCondition('toxicspikes');
            target.side.sideConditions['toxicspikes'].layers = toxicSpikesLayers;
            source.side.removeSideCondition('toxicspikes');
        }

        if (source.side.getSideCondition('stickyweb')) {
            target.side.addSideCondition('stickyweb');
            source.side.removeSideCondition('stickyweb');
        }
    },
    secondary: null,
    target: "normal",
    type: "Psychic",
    zMove: {boost: {accuracy: 1}},
    contestType: "Clever",
}
