namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// Fluffy is an ability that halves the damage taken from contact moves but doubles the damage taken from Fire-type moves.
/// This ability is exclusive to Stufful and Bewear.
///
/// Bulbapedia - Fluffy
///
[Script(ScriptCategory.Ability, "fluffy")]
public class Fluffy : Script, IScriptChangeDamageModifier
{
///
public void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
{
if (move.GetHitData(target, hit).Type?.Name == "fire")
{
modifier *= 2f;
}
if (move.GetHitData(target, hit).IsContact)
{
modifier *= 0.5f;
}
}
}