{
    onUpdate(pokemon) {
        if (pokemon.status === "frz") {
            this.add("-activate", pokemon, "ability: Magma Armor");
            pokemon.cureStatus();
        }
    },
    onImmunity(type, pokemon) {
        if (type === "frz")
            return false;
    },
    onSourceModifyDamage(damage, source, target, move) {
        if (move.type === 'Water' || move.type === 'Ice') {
            return this.chainModify(0.5);
        }
    },
    onHit(target, source, move) {
        if (move.type === 'Water' || move.type === 'Ice') {
            this.boost({ def: 1, spd: 1, spe: -2 }, target);
        }
    },
    flags: { breakable: 1 },
    name: "Magma Armor",
    rating: 0.5,
    num: 40
}
