Deukhoofd c795f20e54
All checks were successful
Build / Build (push) Successful in 51s
Implement highest damage AI, further work on AI runner, random fixes
2025-07-05 14:56:25 +02:00

13 lines
532 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Utils;
public static class TurnChoiceHelper
{
public static IMoveChoice CreateMoveChoice(IPokemon 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);
}
}