public int statSetParse(StatSet statSet, string formula)
    {
        string parsable = "";

        string[] form = formula.Split(' ');
        foreach (string element in form)
        {
            if (element.StartsWith("caster."))
            {
                //Debug.Log(element.Substring(7, element.Length-7));
                parsable += statSet.getStat(element.Substring(7, element.Length - 7));
            }
            else
            {
                parsable += element;
            }
        }
        return((int)(Parse(parsable, false)));
    }
Пример #2
0
 public int getStat(StatType type)
 {
     return(stats.getStat(type).getValue() + itemManager.getStatBonus(type));
 }
Пример #3
0
 public int getStat(string _stat)
 {
     return(stats.getStat(_stat));
 }