Ejemplo n.º 1
0
        public static float CalculateImpactTotal(StatsContainer stats, string statName, float percent)
        {
            var range = stats.Get <RangeStat>(statName);

            if (range != null)
            {
                return(CalculateTotal(range, percent));
            }
            var stat = stats.Get <BaseStat>(statName);

            if (stat != null)
            {
                return(CalculateTotal(stat, percent));
            }
            return(0);
        }
Ejemplo n.º 2
0
        public static void GetCharacterStatValues(this StatsContainer statsContainer, ref StringBuilder sb)
        {
            for (int i = 0; i < GameData.Attributes.Count; i++)
            {
                sb.AppendNewLine(statsContainer.Get(GameData.Attributes.GetID(i)).ToString());
            }
            var atkStats = GameData.Enums[Stats.AttackStats];

            if (atkStats != null)
            {
                for (int i = 0; i < atkStats.Length; i++)
                {
                    sb.AppendNewLine(statsContainer.Get(atkStats.IDs[i]).ToString());
                }
            }
            for (int i = 0; i < GameData.DamageTypes.Count; i++)
            {
                sb.AppendNewLine(statsContainer.Get(GameData.DamageTypes.GetID(i)).ToString());
            }
        }