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"); }
protected IConditionBuilder With(IKeywordBuilder keyword) => Condition.With(keyword);
public BuffRestrictionsBuilder Without(IKeywordBuilder keyword) => new BuffRestrictionsBuilder(_restrictedToKeywords, _excludedKeywords.Append(keyword));
public SyntaxNodeSubject(SubjectTypeEnum type, CSharpSyntaxNode syntaxNode, string name, IKeywordBuilder keywordBuilder) : base(type, name, keywordBuilder) { this.syntaxNode = syntaxNode; }
public IBuffBuilderCollection Without(IKeywordBuilder keyword) => (IBuffBuilderCollection)Create( Construct, This, keyword, (o1, o2) => $"{o1}.Where(does not have keyword {o2}]");
public IBuffBuilderCollection Without(IKeywordBuilder keyword) => new BuffBuilderCollection(_statFactory, _buffs, _restrictionsBuilder.Without(keyword), _source, _target);
private IConditionBuilder KeywordCondition(IDamageSpecification spec, IKeywordBuilder keyword) => ValueConditionBuilder.Create((ps, k) => BuildKeywordStat(spec, ps, k), keyword);
private IConditionBuilder KeywordCondition(IKeywordBuilder keyword) => ValueConditionBuilder.Create(BuildKeywordStat, keyword);
protected virtual IStat BuildKeywordStat(BuildParameters parameters, IKeywordBuilder keyword) => StatFactory.ActiveSkillPartHasKeyword(parameters.ModifierSourceEntity, keyword.Build());
public virtual IStatBuilder NotWith(IKeywordBuilder keyword) => WithCondition(KeywordCondition(keyword).Not);
protected override IStat BuildKeywordStat(BuildParameters parameters, IKeywordBuilder keyword) => StatFactory.ActiveSkillPartCastSpeedHasKeyword(parameters.ModifierSourceEntity, keyword.Build());
public IConditionBuilder On(IKeywordBuilder withKeyword) => CreateCondition(This, withKeyword, (a, keyword) => $"On {keyword} {a} by {a.Source} against {a.Target}");
protected IConditionBuilder With(IKeywordBuilder keyword, params IKeywordBuilder[] keywords) => And(With(keyword), keywords.Select(With).ToArray());
public IDamageRelatedStatBuilder With(IKeywordBuilder keyword) => With(StatConcretizer.With(spec => KeywordCondition(spec, keyword)));
public override IStatBuilder NotWith(IKeywordBuilder keyword) => With(StatConcretizer.With(spec => KeywordCondition(spec, keyword).Not));
private IConditionBuilder KeywordCondition(IDamageSpecification spec, IKeywordBuilder keyword) => ValueConditionBuilder.Create( (ps, k) => BuildKeywordStat(spec, ps.ModifierSourceEntity, k.Build(ps)), keyword);
private IStat BuildKeywordStat(IDamageSpecification spec, BuildParameters parameters, IKeywordBuilder keyword) { return(StatFactory.ActiveSkillPartDamageHasKeyword(parameters.ModifierSourceEntity, keyword.Build(), spec.DamageSource)); }
public Searchable(string name, IKeywordBuilder keywordBuilder) { Name = name; Keywords = keywordBuilder.Build(); }
protected Subject(SubjectTypeEnum type, string name, IKeywordBuilder keywordBuilder) : base(name, keywordBuilder) { Type = type; Children = ImmutableList <ISubject> .Empty; }
public IConditionBuilder On(IKeywordBuilder withKeyword) => _actionBuilder.On(withKeyword);
public ISkillBuilderCollection this[IKeywordBuilder keyword] => CreateCollection(keyword);
public ISkillEntityBuilder With(IKeywordBuilder keyword) => (ISkillEntityBuilder)Create( Construct, This, keyword, (o1, o2) => $"{o1} with {o2}");