{
    num: 357,
    accuracy: true,
    basePower: 0,
    category: "Status",
    isNonstandard: "Past",
    name: "Miracle Eye",
    pp: 40,
    priority: 0,
    flags: { protect: 1, reflectable: 1, mirror: 1, bypasssub: 1, metronome: 1 },
    volatileStatus: "miracleeye",
    onTryHit(target) {
        if (target.volatiles["foresight"])
            return false;
    },
    condition: {
        noCopy: true,
        onStart(pokemon, source) {
            this.add("-start", pokemon, "Miracle Eye");
            this.effectState.source = source;
        },
        onUpdate(pokemon) {
            const source = this.effectState.source;
            if (!source || !source.isActive || source.fainted) {
                pokemon.removeVolatile('miracleeye');
                this.add('-end', pokemon, 'Miracle Eye');
            }
        },
        onModifyAccuracy(accuracy) {
            return accuracy * 2;
        },
        onNegateImmunity(pokemon, type) {
            if (pokemon.hasType("Dark") && type === "Psychic")
                return false;
        },
    },
    secondary: null,
    target: "normal",
    type: "Psychic",
    zMove: { boost: { spa: 1 } },
    contestType: "Clever"
}
