using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class CannotReduceCostClass : ICardEffect, ICannotReduceCostEffect { public void SetUpCannotReduceCostClass(Func playerCondition, Func, bool> targetPermanentsCondition, Func cardCondition) { _playerCondition = playerCondition; _targetPermanentsCondition = targetPermanentsCondition; _cardCondition = cardCondition; } Func _playerCondition = null; Func, bool> _targetPermanentsCondition = null; Func _cardCondition = null; public bool CannotReduceCost(Player player, List targetPermanents, CardSource cardSource) { if (_playerCondition != null) { if (player != null) { if (_playerCondition(player)) { if (_targetPermanentsCondition != null) { if (_targetPermanentsCondition(targetPermanents)) { if (cardSource != null) { if (_cardCondition != null) { if (_cardCondition(cardSource)) { return true; } } } } } } } } return false; } }