Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Utils/TurnChoiceHelper.cs

14 lines
546 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Utils;
public static class TurnChoiceHelper
{
public static IMoveChoice CreateMoveChoice(IBattlePokemon owner, StringKey moveName, byte targetSide,
byte targetPosition)
{
if (!owner.Library.StaticLibrary.Moves.TryGet(moveName, out var moveData))
throw new Exception($"Move '{moveName}' not found in move library.");
var move = new LearnedMoveImpl(moveData, MoveLearnMethod.Unknown);
return new MoveChoice(owner, move, targetSide, targetPosition);
}
}