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

This commit is contained in:
2025-07-05 14:56:25 +02:00
parent 32aaa5150a
commit c795f20e54
30 changed files with 261 additions and 26 deletions

View File

@@ -0,0 +1,21 @@
using PkmnLib.Dynamic.ScriptHandling;
using PkmnLib.Dynamic.ScriptHandling.Registry;
using Assembly = System.Reflection.Assembly;
namespace PkmnLib.Plugin.Gen7.Tests.Scripts;
public class GenericScriptTests
{
[Test]
public async Task EveryScriptHasAttribute()
{
var scripts = typeof(Gen7Plugin).Assembly.GetTypes()
.Where(t => t.IsSubclassOf(typeof(Script)) && !t.IsAbstract);
foreach (var script in scripts)
{
var attributes = script.GetCustomAttributes(typeof(ScriptAttribute), false);
await Assert.That(attributes).IsNotEmpty().Because(
$"Script {script.Name} does not have the Script attribute defined.");
}
}
}