29 lines
870 B
C#
29 lines
870 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
[Script(ScriptCategory.Pokemon, "mean_look_user")]
|
|
public class MeanLookEffectUser : Script
|
|
{
|
|
private readonly ScriptContainer _targetScriptEffect;
|
|
|
|
public MeanLookEffectUser(ScriptContainer targetScriptEffect)
|
|
{
|
|
_targetScriptEffect = targetScriptEffect;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnRemove()
|
|
{
|
|
// Remove the effect from the target
|
|
_targetScriptEffect.Clear();
|
|
}
|
|
}
|
|
|
|
[Script(ScriptCategory.Pokemon, "mean_look_target")]
|
|
public class MeanLookEffectTarget : Script, IScriptPreventSelfSwitch, IScriptPreventSelfRunAway
|
|
{
|
|
/// <inheritdoc />
|
|
public void PreventSelfSwitch(ISwitchChoice choice, ref bool prevent) => prevent = true;
|
|
|
|
/// <inheritdoc />
|
|
public void PreventSelfRunAway(IFleeChoice choice, ref bool prevent) => prevent = true;
|
|
} |