Deukhoofd a17cb92c5a
Some checks failed
continuous-integration/drone/push Build is failing
Implements a bunch more moves
2025-05-17 17:44:15 +02:00

25 lines
686 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "torment")]
public class TormentEffect(IMoveChoice? moveChoice) : Script
{
private IMoveChoice? _moveChoice = moveChoice;
/// <inheritdoc />
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
{
if (_moveChoice == null)
return;
if (choice.ChosenMove.MoveData == _moveChoice.ChosenMove.MoveData)
{
prevent = true;
}
}
/// <inheritdoc />
public override void OnBeforeTurnStart(ITurnChoice choice)
{
if (choice is IMoveChoice moveChoice)
_moveChoice = moveChoice;
}
}