Further work on the script interface rework

This commit is contained in:
2025-07-05 11:30:18 +02:00
parent 1feb27e826
commit 4499927551
100 changed files with 418 additions and 352 deletions

View File

@@ -7,7 +7,7 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Arena_Trap_(Ability)">Bulbapedia - Arena Trap</see>
/// </summary>
[Script(ScriptCategory.Ability, "arena_trap")]
public class ArenaTrap : Script
public class ArenaTrap : Script, IScriptPreventOpponentRunAway, IScriptPreventOpponentSwitch
{
private IPokemon? _owner;
@@ -20,7 +20,7 @@ public class ArenaTrap : Script
}
/// <inheritdoc />
public override void PreventOpponentRunAway(IFleeChoice choice, ref bool prevent)
public void PreventOpponentRunAway(IFleeChoice choice, ref bool prevent)
{
if (choice.User.IsFloating)
return;
@@ -30,7 +30,7 @@ public class ArenaTrap : Script
}
/// <inheritdoc />
public override void PreventOpponentSwitch(ISwitchChoice choice, ref bool prevent)
public void PreventOpponentSwitch(ISwitchChoice choice, ref bool prevent)
{
if (choice.User.IsFloating)
return;