public float[] GetFeedeeStatEffectModifiers(FeedeeStat stat)
 {
     if (modifiedStats != null && modifiedStats.ContainsKey(stat))
     {
         return(modifiedStats[stat]);
     }
     return(new float[] { 0, 0 });
 }
Esempio n. 2
0
 private float[] GetStatModifiers(FeedeeStat stat)
 {
     float[] total = new float[] { 0, 0 };
     foreach (IFeedeeStatModifier fxProvider in GetComponents <IFeedeeStatModifier>())
     {
         float[] result = fxProvider.GetFeedeeStatEffectModifiers(stat);
         total[0] += result[0];
         total[1] += result[1];
     }
     return(total);
 }
        public void ModifyStat(FeedeeStat stat, float modValue, bool isAdditive)
        {
            float[] addValue = new float[2];
            int     i        = isAdditive? 1 : 0;

            addValue[i] = modValue;

            if (!modifiedStats.ContainsKey(stat))
            {
                modifiedStats[stat] = addValue;
            }
            else
            {
                modifiedStats[stat][i] += modValue;
            }
        }
        public float GetStat(FeedeeClass feedeeClass, FeedeeStat stat)
        {
            BuildLookup();

            return(lookupTable[feedeeClass][stat]);
        }
Esempio n. 5
0
 private float GetBaseStat(FeedeeStat stat)
 {
     return(FeedeeStatsDB.GetStat(feedeeClass, stat));
 }
Esempio n. 6
0
 public float GetStat(FeedeeStat stat)
 {
     float[] statModifiers = GetStatModifiers(stat);
     return((GetBaseStat(stat) + statModifiers[1]) * (1 + statModifiers[0] / 100));
 }