23 lines
808 B
C#
23 lines
808 B
C#
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, IScriptOnBeforeAnyHookInvoked, IScriptPreventHeldItemConsume
|
|
{
|
|
/// <inheritdoc />
|
|
public void OnBeforeAnyHookInvoked(ref List<ScriptCategory>? suppressedCategories)
|
|
{
|
|
suppressedCategories ??= new List<ScriptCategory>();
|
|
suppressedCategories.Add(ScriptCategory.ItemBattleTrigger);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void PreventHeldItemConsume(IPokemon pokemon, IItem heldItem, ref bool prevented)
|
|
{
|
|
prevented = true;
|
|
}
|
|
} |