19 lines
673 B
C#
19 lines
673 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Vital Spirit is an ability that prevents the Pokémon from falling asleep.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Vital_Spirit_(Ability)">Bulbapedia - Vital Spirit</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "vital_spirit")]
|
|
public class VitalSpirit : Script, IScriptPreventStatusChange
|
|
{
|
|
/// <inheritdoc />
|
|
public void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus)
|
|
{
|
|
if (status == ScriptUtils.ResolveName<Status.Sleep>() && !selfInflicted)
|
|
{
|
|
preventStatus = true;
|
|
}
|
|
}
|
|
} |