More tests, more fixes
Build / Build (push) Successful in 1m57s

This commit is contained in:
Deukhoofd committed 2026-07-05 18:26:55 +02:00
1 parent 1ab15110f5
commit 6a82c20cf2
20 files changed
+1682 -12

No files matched your search

@@ -16,7 +16,7 @@ public class Conversion2 : Script, IScriptOnSecondaryEffect
var typeLibrary = move.User.BattleData!.Battle.Library.StaticLibrary.Types;
// Get all types against which the last move would be not very effective
var type = typeLibrary.GetAllEffectivenessFromAttacking(lastMoveByTarget.ChosenMove.MoveData.MoveType)
.Where(x => x.effectiveness < 1)
.Where(x => x.effectiveness < 1 && !move.User.Types.Contains(x.type))
// Shuffle them randomly, but deterministically
.OrderBy(_ => move.User.BattleData.Battle.Random.GetInt()).ThenBy(x => x.type.Value)
// And grab the first one