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

public class SkillTargetLeftThisTurnCardListFilter : 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;
		list.AddRange(battlePlayerInfos.SelectMany((IBattlePlayerReadOnlyInfo p) => from t in p.SkillInfoGameTurnLeftCards
			where t.Turn == turn && t.IsSelfTurn == isSelfTurn
			select t.Card));
		return list;
	}
}
