{
    num: 237,
    accuracy: 100,
    basePower: 60,
    category: "Special",
    isNonstandard: "Past",
    name: "Hidden Power",
    pp: 15,
    priority: 0,
    flags: { protect: 1, mirror: 1, metronome: 1 },
    onModifyType(move, pokemon, target) {
        if (pokemon.baseSpecies.num === 201 && target) {
            const weaknesses = {};
            for (const type of this.dex.types.names()) {
                weaknesses[type] = this.dex.getEffectiveness(type, target);
            }

            let bestType = 'Normal';
            let maxEffectiveness = -Infinity;
            for (const [type, effectiveness] of Object.entries(weaknesses)) {
                if (effectiveness > maxEffectiveness) {
                    bestType = type;
                    maxEffectiveness = effectiveness;
                }
            }

            move.type = bestType;
        } else {
            move.type = pokemon.hpType || "Dark";
        }
    },
    secondary: null,
    target: "normal",
    type: "Normal",
    contestType: "Clever"
}
