{
    onSourceModifyAtkPriority: 6,
    onSourceModifyAtk(atk, attacker, defender, move) {
        if (move.type === "Fire") {
            this.debug("Heatproof Atk weaken");
            return this.chainModify(0.5);
        }
    },
    onSourceModifySpAPriority: 5,
    onSourceModifySpA(atk, attacker, defender, move) {
        if (move.type === "Fire") {
            this.debug("Heatproof SpA weaken");
            return this.chainModify(0.5);
        }
    },
    onUpdate(pokemon) {
        if (pokemon.status === "brn") {
            this.add("-activate", pokemon, "ability: Heatproof");
            pokemon.cureStatus();
        }
    },
    onSetStatus(status, target, source, effect) {
        if (status.id !== "brn")
            return;
        if (effect?.status) {
            this.add("-immune", target, "[from] ability: Heatproof");
        }
        return false;
    },
    flags: { breakable: 1 },
    name: "Heatproof",
    rating: 2,
    num: 85
}
