Example #1
0
            public IEnumerable <PathDefinition> GetPaths(IStat stat)
            {
                if (!_barSkillConversion.Equals(stat))
                {
                    return(_originalContext.GetPaths(stat));
                }

                return(_originalContext.GetPaths(stat)
                       .Where(p => p.ModifierSource is ModifierSource.Local.Skill));
            }
        private IEnumerable <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            if (!_skillConversion.Equals(stat))
            {
                return(context.GetPaths(stat));
            }

            return(context.GetPaths(stat)
                   .Where(p => p.ModifierSource is ModifierSource.Local.Skill));
        }
        private IEnumerable <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            var originalPaths = context.GetPaths(stat);

            if (_ailmentDamage.Equals(stat))
            {
                return(originalPaths.Union(context.GetPaths(_skillDamage)));
            }
            return(originalPaths);
        }
            public IEnumerable <PathDefinition> GetPaths(IStat stat)
            {
                if (!_value._regens(_value._pool).Equals(stat))
                {
                    return(_originalContext.GetPaths(stat));
                }

                return(_applyingPools
                       .SelectMany(p => _originalContext.GetPaths(_value._regens(p)))
                       .Distinct());
            }
        private IReadOnlyCollection <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            if (!_skillConversion.Equals(stat))
            {
                return(context.GetPaths(stat));
            }

            return(context.GetPaths(stat)
                   .Where(p => p.ModifierSource is ModifierSource.Local.Skill)
                   .ToList());
        }
Example #6
0
            public IEnumerable <PathDefinition> GetPaths(IStat stat)
            {
                if (!_foo.Equals(stat))
                {
                    return(_originalContext.GetPaths(stat));
                }

                var originalPaths   = _originalContext.GetPaths(_foo);
                var conversionPaths = _originalContext.GetPaths(_bar)
                                      .Select(p => new PathDefinition(p.ModifierSource, _bar.Concat(p.ConversionStats).ToList()));

                return(originalPaths.Concat(conversionPaths).Distinct());
            }
        private IEnumerable <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            if (!_target.Equals(stat))
            {
                return(context.GetPaths(stat));
            }

            var originalPaths   = context.GetPaths(_target);
            var conversionPaths = context.GetPaths(_source)
                                  .Select(p => new PathDefinition(p.ModifierSource, _source.Concat(p.ConversionStats).ToList()));

            return(originalPaths.Concat(conversionPaths).Distinct());
        }
        private IReadOnlyCollection <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            if (!_target.Equals(stat))
            {
                return(context.GetPaths(stat));
            }

            var originalPaths   = context.GetPaths(_target);
            var conversionPaths = context.GetPaths(_source)
                                  .Select(p => new PathDefinition(p.ModifierSource, p.ConversionStats.Prepend(_source).ToArray()));
            var paths = new HashSet <PathDefinition>(originalPaths);

            paths.UnionWith(conversionPaths);
            return(paths);
        }
        private IReadOnlyCollection <PathDefinition> GetPaths(IValueCalculationContext context, IStat stat)
        {
            var originalPaths = context.GetPaths(stat);

            if (!_ailmentDamage.Equals(stat))
            {
                return(originalPaths);
            }

            var skillPaths = context.GetPaths(_skillDamage)
                             .Select(p => new PathDefinition(p.ModifierSource));
            var paths = new HashSet <PathDefinition>(originalPaths);

            paths.UnionWith(skillPaths);
            return(paths);
        }
        /// <summary>
        /// Returns the values of the nodes of all paths of the given type in the given stat's subgraph.
        /// </summary>
        public static List <NodeValue?> GetValues(
            this IValueCalculationContext context, IStat stat, NodeType nodeType)
        {
            var paths  = context.GetPaths(stat);
            var values = new List <NodeValue?>(paths.Count);

            foreach (var path in paths)
            {
                values.Add(context.GetValue(stat, nodeType, path));
            }
            return(values);
        }
Example #11
0
 public IEnumerable <PathDefinition> GetPaths(IStat stat) =>
 _originalContext.GetPaths(stat);
Example #12
0
 /// <summary>
 /// Returns the values of the nodes of all paths of the given type in the given stat's subgraph.
 /// </summary>
 public static IEnumerable <NodeValue?> GetValues(
     this IValueCalculationContext context, IStat stat, NodeType nodeType) =>
 context.GetPaths(stat).Select(p => context.GetValue(stat, nodeType, p));