Many more tests and fixes
Build / Build (push) Successful in 3m12s

This commit is contained in:
Deukhoofd committed 2026-08-27 17:11:12 +02:00
1 parent 32b3ef9c4a
commit d2a82b5fe3
204 files changed
+20255 -242

No files matched your search

@@ -18,13 +18,13 @@ public class Metronome : Script, IScriptChangeMove
var retryCount = 0;
while (true)
{
// Breaker for infinite loop. The odds that we'd accidentally roll a non-copyable move 100 times in a row
// is extremely unlikely, unless the loaded move library only contains non-copyable moves.
// Breaker for infinite loop. The odds that we'd accidentally roll an unselectable move 100 times in a row
// is extremely unlikely, unless the loaded move library only contains unselectable moves.
// This is a failsafe.
if (retryCount > 100)
throw new Exception("Metronome failed to find a valid move after 100 attempts.");
var randomMove = moveLibrary.GetRandom(battleData.Battle.Random);
if (!randomMove.CanCopyMove())
if (!randomMove.CanBeSelectedByMetronome())
{
retryCount++;
continue;