namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Defeatist is an ability that halves the Pokémon's Attack and Special Attack when its HP drops below 50%. /// This reduction applies to all moves used by the Pokémon, making it significantly weaker when damaged. /// /// Bulbapedia - Defeatist /// [Script(ScriptCategory.Ability, "defeatist")] public class Defeatist : Script, IScriptChangeDamageModifier { /// public void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier) { if (move.User.CurrentHealth < move.User.MaxHealth / 2) { modifier *= 0.5f; } } }