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; }
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)); }