public IStatBuilder DamageHasKeyword(DamageSource damageSource, IKeywordBuilder keyword)
        {
            var coreBuilder = new CoreStatBuilderFromCoreBuilder <Keyword>(
                CoreBuilder.Proxy(keyword, (ps, b) => b.Build(ps)),
                (e, k) => StatFactory.MainSkillPartDamageHasKeyword(e, k, damageSource));

            return(new StatBuilder(StatFactory, coreBuilder));
        }
        private static string BuildHitWithIdentity(BuildParameters parameters, IKeywordBuilder builder)
        {
            var damageTypes = ((IDamageTypeBuilder)builder).BuildDamageTypes(parameters);

            if (damageTypes.Count != 1)
            {
                throw new ParseException(
                          $"IDamageTypeBuilders passed to {nameof(HitWith)} must build to exactly one damage type." +
                          $" {string.Join(",", damageTypes)} given");
            }
            return(damageTypes.Single() + "Hit");
        }
Esempio n. 3
0
 protected IConditionBuilder With(IKeywordBuilder keyword) => Condition.With(keyword);
 public BuffRestrictionsBuilder Without(IKeywordBuilder keyword) =>
 new BuffRestrictionsBuilder(_restrictedToKeywords, _excludedKeywords.Append(keyword));
Esempio n. 5
0
 public SyntaxNodeSubject(SubjectTypeEnum type, CSharpSyntaxNode syntaxNode, string name, IKeywordBuilder keywordBuilder)
     : base(type, name, keywordBuilder)
 {
     this.syntaxNode = syntaxNode;
 }
Esempio n. 6
0
 public IBuffBuilderCollection Without(IKeywordBuilder keyword) =>
 (IBuffBuilderCollection)Create(
     Construct, This, keyword,
     (o1, o2) => $"{o1}.Where(does not have keyword {o2}]");
Esempio n. 7
0
 public IBuffBuilderCollection Without(IKeywordBuilder keyword) =>
 new BuffBuilderCollection(_statFactory, _buffs, _restrictionsBuilder.Without(keyword), _source, _target);
Esempio n. 8
0
 private IConditionBuilder KeywordCondition(IDamageSpecification spec, IKeywordBuilder keyword) =>
 ValueConditionBuilder.Create((ps, k) => BuildKeywordStat(spec, ps, k), keyword);
Esempio n. 9
0
 private IConditionBuilder KeywordCondition(IKeywordBuilder keyword) =>
 ValueConditionBuilder.Create(BuildKeywordStat, keyword);
Esempio n. 10
0
 protected virtual IStat BuildKeywordStat(BuildParameters parameters, IKeywordBuilder keyword) =>
 StatFactory.ActiveSkillPartHasKeyword(parameters.ModifierSourceEntity, keyword.Build());
Esempio n. 11
0
 public virtual IStatBuilder NotWith(IKeywordBuilder keyword) => WithCondition(KeywordCondition(keyword).Not);
 protected override IStat BuildKeywordStat(BuildParameters parameters, IKeywordBuilder keyword) =>
 StatFactory.ActiveSkillPartCastSpeedHasKeyword(parameters.ModifierSourceEntity, keyword.Build());
Esempio n. 13
0
 public IConditionBuilder On(IKeywordBuilder withKeyword) =>
 CreateCondition(This, withKeyword,
                 (a, keyword) => $"On {keyword} {a} by {a.Source} against {a.Target}");
Esempio n. 14
0
 protected IConditionBuilder With(IKeywordBuilder keyword, params IKeywordBuilder[] keywords) =>
 And(With(keyword), keywords.Select(With).ToArray());
Esempio n. 15
0
 public IDamageRelatedStatBuilder With(IKeywordBuilder keyword)
 => With(StatConcretizer.With(spec => KeywordCondition(spec, keyword)));
Esempio n. 16
0
 public override IStatBuilder NotWith(IKeywordBuilder keyword) =>
 With(StatConcretizer.With(spec => KeywordCondition(spec, keyword).Not));
Esempio n. 17
0
 private IConditionBuilder KeywordCondition(IDamageSpecification spec, IKeywordBuilder keyword)
 => ValueConditionBuilder.Create(
     (ps, k) => BuildKeywordStat(spec, ps.ModifierSourceEntity, k.Build(ps)), keyword);
Esempio n. 18
0
 private IStat BuildKeywordStat(IDamageSpecification spec, BuildParameters parameters, IKeywordBuilder keyword)
 {
     return(StatFactory.ActiveSkillPartDamageHasKeyword(parameters.ModifierSourceEntity, keyword.Build(),
                                                        spec.DamageSource));
 }
Esempio n. 19
0
 public Searchable(string name, IKeywordBuilder keywordBuilder)
 {
     Name     = name;
     Keywords = keywordBuilder.Build();
 }
Esempio n. 20
0
 protected Subject(SubjectTypeEnum type, string name, IKeywordBuilder keywordBuilder)
     : base(name, keywordBuilder)
 {
     Type     = type;
     Children = ImmutableList <ISubject> .Empty;
 }
Esempio n. 21
0
 public IConditionBuilder On(IKeywordBuilder withKeyword) => _actionBuilder.On(withKeyword);
Esempio n. 22
0
 public ISkillBuilderCollection this[IKeywordBuilder keyword] => CreateCollection(keyword);
Esempio n. 23
0
 public ISkillEntityBuilder With(IKeywordBuilder keyword) =>
 (ISkillEntityBuilder)Create(
     Construct, This, keyword,
     (o1, o2) => $"{o1} with {o2}");