namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// Heatproof is an ability that halves the damage taken from Fire-type moves and burn.
///
/// Bulbapedia - Heatproof
///
[Script(ScriptCategory.Ability, "heatproof")]
public class Heatproof : Script, IScriptChangeBasePower
{
///
public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
if (move.GetHitData(target, hit).Type?.Name == "fire")
{
basePower = (ushort)(basePower / 2);
}
}
}