More moves implemented
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "spider_web_effect")]
|
||||
public class SpiderWebEffect : Script
|
||||
{
|
||||
private HashSet<IPokemon> _targets = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventOpponentRunAway(IFleeChoice choice, ref bool prevent)
|
||||
{
|
||||
if (_targets.Contains(choice.User))
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventOpponentSwitch(ISwitchChoice choice, ref bool prevent)
|
||||
{
|
||||
if (_targets.Contains(choice.User))
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
public void AddTarget(IPokemon target)
|
||||
{
|
||||
_targets.Add(target);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user