Esempio n. 1
0
    /// <summary>
    /// Sums up the stat boosts the character has active at the moment.
    /// </summary>
    private void GenerateBoosts()
    {
        currentBoost = new Boost();

        Boost mergeBoost = new Boost();

        mergeBoost.boostType = BoostType.DECREASE;
        for (int i = 0; i < boosts.Count; i++)
        {
            if (boosts[i].boostType == BoostType.DECREASE)
            {
                mergeBoost.MergeBoost(boosts[i]);
                boosts.RemoveAt(i);
                i--;
                mergeBoost.ActivateBoost();
            }
        }
        if (mergeBoost.IsActive())
        {
            boosts.Add(mergeBoost);
        }

        for (int i = 0; i < boosts.Count; i++)
        {
            currentBoost.AddBoost(boosts[i]);
        }
    }