Deukhoofd 97868ab4c6
All checks were successful
Build / Build (push) Successful in 48s
More abilities
2025-06-09 13:44:26 +02:00

24 lines
789 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// 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.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Fluffy_(Ability)">Bulbapedia - Fluffy</see>
/// </summary>
[Script(ScriptCategory.Ability, "fluffy")]
public class Fluffy : Script
{
/// <inheritdoc />
public override void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
{
if (move.GetHitData(target, hit).Type?.Name == "fire")
{
modifier *= 2f;
}
if (move.UseMove.HasFlag("contact"))
{
modifier *= 0.5f;
}
}
}