Deukhoofd 7c270a6d52
All checks were successful
Build / Build (push) Successful in 1m1s
Finish script interface refactor
2025-07-06 10:27:56 +02:00

19 lines
660 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Sweet Veil is an ability that prevents the Pokémon and its allies from falling asleep.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Sweet_Veil_(Ability)">Bulbapedia - Sweet Veil</see>
/// </summary>
[Script(ScriptCategory.Ability, "sweet_veil")]
public class SweetVeil : Script, IScriptPreventStatusChange
{
/// <inheritdoc />
public void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus)
{
if (status == ScriptUtils.ResolveName<Status.Sleep>())
{
preventStatus = true;
}
}
}