24 lines
789 B
C#
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;
|
|
}
|
|
}
|
|
} |