More abilities, refactor IPokemon.SetStatus to pass pokemon that caused the status change
All checks were successful
Build / Build (push) Successful in 50s
All checks were successful
Build / Build (push) Successful in 50s
This commit is contained in:
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SweetVeil.cs
Normal file
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SweetVeil.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted,
|
||||
ref bool preventStatus)
|
||||
{
|
||||
if (status == ScriptUtils.ResolveName<Status.Sleep>())
|
||||
{
|
||||
preventStatus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user