More abilities
This commit is contained in:
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Klutz.cs
Normal file
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Klutz.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Klutz is an ability that prevents the Pokémon from using its held item in battle.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Klutz_(Ability)">Bulbapedia - Klutz</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "klutz")]
|
||||
public class Klutz : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnBeforeAnyHookInvoked(ref List<ScriptCategory>? suppressedCategories)
|
||||
{
|
||||
suppressedCategories ??= new List<ScriptCategory>();
|
||||
suppressedCategories.Add(ScriptCategory.ItemBattleTrigger);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventHeldItemConsume(IPokemon pokemon, IItem heldItem, ref bool prevented)
|
||||
{
|
||||
prevented = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user