{
    onStart(pokemon) {
        for (const target of pokemon.foes()) {
            for (const moveSlot of target.moveSlots) {
                const move = this.dex.moves.get(moveSlot.move);
                if (move.category === "Status") continue;
                const moveType = move.id === "hiddenpower" ? target.hpType : move.type;
                if (this.dex.getImmunity(moveType, pokemon) && this.dex.getEffectiveness(moveType, pokemon) > 0 || move.ohko) {
                    this.add('-ability', pokemon, 'Anticipation');
                    pokemon.addVolatile('anticipation');
                    return;
                }
            }
        }
    },
    condition: {
        duration: 1,
        onSourceModifyDamage(damage, source, target, move) {
            if (move.type && this.dex.getEffectiveness(move.type, target) > 0) {
                this.debug('Anticipation reduce damage');
                return this.chainModify(0.75);
            }
        },
    },
    flags: {},
    name: "Anticipation",
    rating: 0.5,
    num: 107
}
