Cleanup, move OnBeforeAnyHookInvoked function to an interface

This commit is contained in:
2025-06-28 10:28:23 +02:00
parent 43813c1c1c
commit d719ce03ea
10 changed files with 49 additions and 95 deletions

View File

@@ -6,7 +6,7 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Shadow_Shield_(Ability)">Bulbapedia - Shadow Shield</see>
/// </summary>
[Script(ScriptCategory.Ability, "shadow_shield")]
public class ShadowShield : Script
public class ShadowShield : Script, IScriptOnBeforeAnyHookInvoked
{
/// <inheritdoc />
public override void ChangeIncomingMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
@@ -18,7 +18,7 @@ public class ShadowShield : Script
}
/// <inheritdoc />
public override void OnBeforeAnyHookInvoked(ref List<ScriptCategory>? suppressedCategories)
public void OnBeforeAnyHookInvoked(ref List<ScriptCategory>? suppressedCategories)
{
// Shadow Shield can not be suppressed by any other script, so we remove it from the list of suppressed categories
// if it was added.