Ejemplo n.º 1
0
        /// <summary>
        /// Calculates the price of upgrading the luck.
        /// </summary>
        /// <param name="oldStat">Old stat value, e.g. to calculate the price of increasing the luck from 6 to 7, oldStat == 6.</param>
        /// <returns>Tuple consisting of price. Values can be zero.</returns>
        public static SGD LuckUpgradePrice(int oldStat)
        {
            SGD ret = new SGD(0, 0, 0);

            ret.Silver   = (int)(10 + Math.Pow(oldStat - 5, 2.2));
            ret.Gold     = oldStat < 30 ? 0 : (int)(5 + Math.Pow(oldStat, 1.6));
            ret.Diamonds = oldStat < 75 ? 0 : (int)(5 + Math.Pow(oldStat - 50, 1.11));

            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Calculates the price of upgrading the defense.
        /// </summary>
        /// <param name="oldStat">Old stat value, e.g. to calculate the price of increasing the defense from 6 to 7, oldStat == 6.</param>
        /// <returns>Tuple consisting of price. Values can be zero.</returns>
        public static SGD DefenseUpgradePrice(int oldStat)
        {
            SGD ret = new SGD(0, 0, 0);

            ret.Silver   = (int)(20 + Math.Pow(oldStat - 5, 2.3));
            ret.Gold     = oldStat < 25 ? 0 : (int)(5 + Math.Pow(oldStat, 1.7));
            ret.Diamonds = oldStat < 60 ? 0 : (int)(5 + Math.Pow(oldStat - 50, 1.17));

            return(ret);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Calculates the price of upgrading the agility.
        /// </summary>
        /// <param name="oldStat">Old stat value, e.g. to calculate the price of increasing the agility from 6 to 7, oldStat == 6.</param>
        /// <returns>Tuple consisting of price. Values can be zero.</returns>
        public static SGD AgilityUpgradePrice(int oldStat)
        {
            SGD ret = new SGD(0, 0, 0);

            ret.Silver   = (int)(15 + Math.Pow(oldStat - 5, 2.25));
            ret.Gold     = oldStat < 30 ? 0 : (int)(5 + Math.Pow(oldStat, 1.65));
            ret.Diamonds = oldStat < 75 ? 0 : (int)(5 + Math.Pow(oldStat - 50, 1.15));

            return(ret);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Calculates the price of upgrading the strength.
        /// </summary>
        /// <param name="oldStat">Old stat value, e.g. to calculate the price of increasing the strength from 6 to 7, oldStat == 6.</param>
        /// <returns>Tuple consisting of price. Values can be zero.</returns>
        public static SGD StrengthUpgradePrice(int oldStat)
        {
            SGD ret = new SGD(0, 0, 0);

            ret.Silver   = (int)(30 + Math.Pow(oldStat - 5, 2.35));
            ret.Gold     = oldStat < 20 ? 0 : (int)(5 + Math.Pow(oldStat, 1.75));
            ret.Diamonds = oldStat < 50 ? 0 : (int)(5 + Math.Pow(oldStat - 40, 1.2));

            return(ret);
        }