21 lines
676 B
C#
21 lines
676 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "pursuit")]
|
|
public class Pursuit : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnBeforeTurnStart(ITurnChoice choice)
|
|
{
|
|
if (choice is IMoveChoice moveChoice)
|
|
choice.User.Volatile.Add(new PursuitEffect(moveChoice));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit) =>
|
|
move.User.Volatile.Remove<PursuitEffect>();
|
|
|
|
/// <inheritdoc />
|
|
public override void OnAfterMove(IExecutingMove move) => move.User.Volatile.Remove<PursuitEffect>();
|
|
} |