示例#1
0
 public FightValueProvider([NotNull] IDefinitionWithPrecomputedData definition, int level)
 {
     this.level       = level;
     m_damageModifier = 0;
     m_healModifier   = 0;
     m_range          = CreateRange(definition, level);
     m_dynamicValues  = definition.precomputedData.dynamicValueReferences;
 }
示例#2
0
        private static Tuple <int, int> CreateRange(IDefinitionWithPrecomputedData definition, int level)
        {
            CharacterDefinition characterDefinition = definition as CharacterDefinition;

            if (characterDefinition == null || characterDefinition.actionRange == null)
            {
                return(null);
            }
            int valueWithLevel  = characterDefinition.actionRange.min.GetValueWithLevel(level);
            int valueWithLevel2 = characterDefinition.actionRange.max.GetValueWithLevel(level);

            return(new Tuple <int, int>(valueWithLevel, valueWithLevel2));
        }