namespace PkmnLib.Plugin.Gen7.Scripts.Moves; [Script(ScriptCategory.Move, "synchronoise")] public class Synchronoise : Script { /// public override void ChangeTargets(IMoveChoice moveChoice, ref IReadOnlyList targets) { var battleData = moveChoice.User.BattleData; if (battleData == null) throw new InvalidOperationException("Battle data is null."); targets = battleData.Battle.Sides.SelectMany(x => x.Pokemon).WhereNotNull() .Where(x => x.Types.Any(y => moveChoice.User.Types.Contains(y))).ToList(); } }