This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user