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

public class SkillTargetReanimatedCardFilter : ISkillTargetFilter
{
	public IEnumerable<IReadOnlyBattleCardInfo> Filtering(IEnumerable<IBattlePlayerReadOnlyInfo> battlePlayerInfos, SkillConditionCheckerOption option)
	{
		List<IReadOnlyBattleCardInfo> list = new List<IReadOnlyBattleCardInfo>();
		if (option.ReanimatedCards != null)
		{
			foreach (IBattlePlayerReadOnlyInfo info in battlePlayerInfos)
			{
				list.AddRange(option.ReanimatedCards.Where((IReadOnlyBattleCardInfo c) => c.IsPlayer == info.IsPlayer));
			}
		}
		return list;
	}
}
