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

public class SkillIsWatchFilter : ISkillCardFilter
{
	private bool _isWatchOk;

	public SkillIsWatchFilter(bool flag)
	{
		_isWatchOk = (GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) == flag;
	}

	public IEnumerable<IReadOnlyBattleCardInfo> Filtering(IEnumerable<IReadOnlyBattleCardInfo> cards, SkillOptionValue option)
	{
		if (!_isWatchOk)
		{
			yield break;
		}
		foreach (IReadOnlyBattleCardInfo card in cards)
		{
			yield return card;
		}
	}
}
