More tests, more fixes
All checks were successful
Build / Build (push) Successful in 1m57s

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

View File

@@ -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