Ejemplo n.º 1
0
        private void ChangeStat(Statistic stat, int val)
        {
            int value = Math.Min(val, FocusLeft);

            switch (stat)
            {
            case Statistic.Speed:
                _speed += value;
                _sneak -= value;
                break;

            case Statistic.Sneak:
                _speed -= value;
                _sneak += value;
                break;

            case Statistic.Fight:
                _fight += value;
                _will  -= value;
                break;

            case Statistic.Will:
                _fight -= value;
                _will  += value;
                break;

            case Statistic.Lore:
                _lore += value;
                _luck -= value;
                break;

            case Statistic.Luck:
                _lore -= value;
                _luck += value;
                break;
            }
            _speed      = NumericUtils.Clamp(_speed, _speedSneakMin, _speedSneakMax);
            _sneak      = NumericUtils.Clamp(_speed, _speedSneakMin, _speedSneakMax);
            _fight      = NumericUtils.Clamp(_speed, _fightWillMin, _fightWillMax);
            _will       = NumericUtils.Clamp(_speed, _fightWillMin, _fightWillMax);
            _lore       = NumericUtils.Clamp(_speed, _loreLuckMin, _loreLuckMax);
            _luck       = NumericUtils.Clamp(_speed, _loreLuckMin, _loreLuckMax);
            _focusLeft -= value;
        }