public object Execute(SkillContext c)
 {
     if (left.fighterReferance == SkillType.C)
     {
         c.Caster.Stats[left.Stat] = Convert.ToInt32(right.Execute(c));
     }
     else
     {
         c.Target.Stats[left.Stat] = Convert.ToInt32(right.Execute(c));
     }
     return(null);
 }
Beispiel #2
0
        public object Execute(SkillContext c)
        {
            double val = 0;
            double l   = Convert.ToDouble(left.Execute(c));
            double r   = Convert.ToDouble(right.Execute(c));

            switch (Operation)
            {
            case SkillType.PLUS:
                val = l + r;
                break;

            case SkillType.MINUS:
                val = l - r;
                break;

            case SkillType.MULTI:
                val = l * r;
                break;

            case SkillType.DIVIDE:
                val = l / r;
                break;

            case SkillType.POWER:
                val = Math.Pow(l, r);
                break;
            }
            return(val);
        }