public override int GetBaseValue(AttrValueType attrValueType)
    {
        if (attrValueType == AttrValueType.Current)
        {
            return(_currentValue);
        }

        return(_baseValue);
    }
    protected override void IncrementValue(int increment, AttrValueType attrValueType)
    {
        if (attrValueType == AttrValueType.Current)
        {
            _currentValue += increment;
            return;
        }

        base.IncrementValue(increment, attrValueType);
    }
    public override int GetValue(AttrValueType attrValueType)
    {
        var totalValue = base.GetValue();

        if (attrValueType == AttrValueType.Current)
        {
            var modifiedValue = ApplyModifiers(_currentValue, _currentValModifiers);
            return(modifiedValue > totalValue ? totalValue : modifiedValue);
        }

        return(totalValue);
    }
Exemple #4
0
    public int GetAttributeValue(AttributeNameType attributeName, AttrValueType attrValueType)
    {
        int index = (int)attributeName;

        return((_attributes?[index] != null) ? _attributes[index].GetValue(attrValueType) : 0);
    }
Exemple #5
0
 protected virtual void IncrementValue(int increment, AttrValueType attrValueType)
 {
     _baseValue += increment;
 }
Exemple #6
0
 public virtual int GetBaseValue(AttrValueType attrValueType = AttrValueType.Maximum)
 {
     return(_baseValue);
 }
Exemple #7
0
 public virtual int GetValue(AttrValueType attrValueType = AttrValueType.Maximum)
 {
     return(ApplyModifiers(_baseValue, _totalValModifiers));
 }