Exemple #1
0
        private IValue BuffSourceIsAny(Entity target, string buffIdentity, IEnumerable <Entity> sources)
        {
            var statValues = sources
                             .Select(s => _statFactory.BuffSourceIs(s, target, buffIdentity))
                             .Select(s => new StatValue(s))
                             .ToList();
            var count = new CountingValue(statValues);

            return(new ConditionalValue(c => count.Calculate(c) > 0, $"{count} > 0"));
        }