예제 #1
0
 public ModifierCollection(
     IBuilderFactories builderFactories, ModifierSource.Local localModifierSource,
     Entity modifierSourceEntity)
 {
     (_builderFactories, _localModifierSource, _modifierSourceEntity) =
         (builderFactories, localModifierSource, modifierSourceEntity);
     _globalModifierSource = new ModifierSource.Global(_localModifierSource);
 }
예제 #2
0
 private ParseResult ParseLocalModifier(Tags itemTags, ModifierSource.Local source, Entity entity, string modifier)
 {
     if (itemTags.HasFlag(Tags.Weapon))
     {
         modifier = "Attacks with this Weapon have " + modifier;
     }
     return(_coreParser.Parse(modifier, source, entity));
 }
예제 #3
0
        private ParseResult ParseBuffStats(
            Entity entity, Tags itemTags, ModifierSource.Local source, IReadOnlyList <UntranslatedStat> buffStats)
        {
            if (buffStats.IsEmpty())
            {
                return(ParseResult.Empty);
            }
            if (!itemTags.HasFlag(Tags.Flask))
            {
                throw new NotSupportedException("Buff stats are only supported for flasks");
            }

            var result = _untranslatedStatParser.Parse(source, entity, buffStats);

            return(MultiplyValuesByFlaskEffect(result, entity));
        }
예제 #4
0
 private ParseResult ParsePropertyModifier(ModifierSource.Local source, Entity entity, string modifier)
 => _coreParser.Parse(modifier + " (AsItemProperty)", source, entity);
예제 #5
0
 private ParseResult ParsePropertyModifier(ModifierSource.Local source, string modifier)
 => Parse(modifier + " (AsItemProperty)", source);
예제 #6
0
 public SkillModifierCollection(
     IBuilderFactories builderFactories, IConditionBuilder isMainSkill, ModifierSource.Local localModifierSource,
     Entity modifierSourceEntity)
     : base(builderFactories, localModifierSource, modifierSourceEntity)
     => _isMainSkill = isMainSkill;
예제 #7
0
 public PartialItemParserParameter(
     Item item, ItemSlot itemSlot, BaseItemDefinition baseItemDefinition,
     ModifierSource.Local localSource, ModifierSource.Global globalSource)
 => (Item, ItemSlot, BaseItemDefinition, LocalSource, GlobalSource) =