using System.Collections.Generic;
using System.Linq;
using Wizard.Battle;

public class SkillTargetTurnSummonCardsFilter : ISkillTargetFilter
{
	public IEnumerable<IReadOnlyBattleCardInfo> Filtering(IEnumerable<IBattlePlayerReadOnlyInfo> battlePlayerInfos, SkillConditionCheckerOption option)
	{
		List<IReadOnlyBattleCardInfo> list = new List<IReadOnlyBattleCardInfo>();
		BattleManagerBase ins = BattleManagerBase.GetIns();
		int turn = ins.CurrentTurn;
		bool isSelfTurn = ins.BattlePlayer.IsSelfTurn;
		foreach (IBattlePlayerReadOnlyInfo battlePlayerInfo in battlePlayerInfos)
		{
			list.AddRange(from c in battlePlayerInfo.SkillInfoGameSummonCards
				where c.Turn == turn && c.IsSelfTurn == isSelfTurn
				select c.Card);
		}
		return list;
	}
}
