{
    num: 193,
    accuracy: true,
    basePower: 0,
    category: "Status",
    isNonstandard: "Past",
    name: "Foresight",
    pp: 40,
    priority: 0,
    flags: { protect: 1, reflectable: 1, mirror: 1, bypasssub: 1, metronome: 1 },
    volatileStatus: "foresight",
    onTryHit(target) {
        if (target.volatiles["miracleeye"]) return false;
    },
    condition: {
        noCopy: true,
        onStart(pokemon, source) {
            this.add("-start", pokemon, "Foresight");
            this.effectState.source = source;
        },
        onUpdate(pokemon) {

            const source = this.effectState.source;
            if (!source || !source.isActive || source.fainted) {
                pokemon.removeVolatile('foresight');
                this.add('-end', pokemon, 'Foresight');
            }
        },

        onModifyAccuracy(accuracy) {
            return accuracy * 2;
        },
        onNegateImmunity(pokemon, type) {
            if (pokemon.hasType("Ghost") && ["Normal", "Fighting"].includes(type))
                return false;
        },
    },
    secondary: null,
    target: "normal",
    type: "Normal",
    zMove: { effect: "crit2" },
    contestType: "Clever"
}
