Further work on the script interface rework
This commit is contained in:
@@ -6,17 +6,17 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Magnet_Pull_(Ability)">Bulbapedia - Magnet Pull</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "magnet_pull")]
|
||||
public class MagnetPull : Script
|
||||
public class MagnetPull : Script, IScriptPreventOpponentRunAway, IScriptPreventOpponentSwitch
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventOpponentRunAway(IFleeChoice choice, ref bool prevent)
|
||||
public void PreventOpponentRunAway(IFleeChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.User.Types.Any(x => x.Name == "steel"))
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventOpponentSwitch(ISwitchChoice choice, ref bool prevent)
|
||||
public void PreventOpponentSwitch(ISwitchChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.User.Types.Any(x => x.Name == "steel"))
|
||||
prevent = true;
|
||||
|
||||
Reference in New Issue
Block a user