Further work on the script interface rework
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user