Finish script interface refactor
All checks were successful
Build / Build (push) Successful in 1m1s

This commit is contained in:
2025-07-06 10:27:56 +02:00
parent 83f6a183e3
commit 7c270a6d52
117 changed files with 669 additions and 648 deletions

View File

@@ -3,17 +3,16 @@ using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
[Script(ScriptCategory.Side, "safe_guard")]
public class SafeguardEffect : Script
public class SafeguardEffect : Script, IScriptPreventStatusChange, IScriptPreventVolatileAdd
{
/// <inheritdoc />
public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted,
ref bool preventStatus)
public void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus)
{
preventStatus = true;
}
/// <inheritdoc />
public override void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
public void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
{
if (script.Category == ScriptCategory.Pokemon && script.Name == ScriptUtils.ResolveName<Confusion>())
preventVolatileAdd = true;