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

public class SkillIsOwnerFilter : ISkillCardFilter
{
	private bool _isOwner;

	public SkillIsOwnerFilter(bool flag)
	{
		_isOwner = flag;
	}

	public IEnumerable<IReadOnlyBattleCardInfo> Filtering(IEnumerable<IReadOnlyBattleCardInfo> cards, SkillOptionValue option)
	{
		List<IReadOnlyBattleCardInfo> list = new List<IReadOnlyBattleCardInfo>();
		bool isAdminWatch = GameMgr.GetIns().IsAdminWatch;
		foreach (IReadOnlyBattleCardInfo card in cards)
		{
			if (card.IsPlayer == _isOwner || isAdminWatch)
			{
				list.Add(card);
			}
		}
		return list;
	}
}
