Implement highest damage AI, further work on AI runner, random fixes
Build / Build (push) Successful in 51s

This commit is contained in:
Deukhoofd committed 2025-07-05 14:56:25 +02:00
1 parent 32aaa5150a
commit c795f20e54
30 files changed
+261 -26

No files matched your search

@@ -4,14 +4,10 @@ public static class TurnChoiceHelper
{
public static IMoveChoice CreateMoveChoice(IPokemon owner, StringKey moveName, byte targetSide, byte targetPosition)
{
var move = owner.Moves.FirstOrDefault(x => x?.MoveData.Name == moveName);
if (move == null)
{
if (!owner.Library.StaticLibrary.Moves.TryGet(moveName, out var moveData))
throw new Exception($"Move '{moveName}' not found in move library.");
if (!owner.Library.StaticLibrary.Moves.TryGet(moveName, out var moveData))
throw new Exception($"Move '{moveName}' not found in move library.");
move = new LearnedMoveImpl(moveData, MoveLearnMethod.Unknown);
}
var move = new LearnedMoveImpl(moveData, MoveLearnMethod.Unknown);
return new MoveChoice(owner, move, targetSide, targetPosition);
}
}