protected override long EvaluateInternal(RollData data, DiceAST root, int depth) { if (Success == null) { throw new DiceException(DiceErrorCode.InvalidSuccess); } long rolls = Expression.Evaluate(data, root, depth + 1); rolls += Success.Evaluate(data, root, depth + 1); rolls += Failure?.Evaluate(data, root, depth + 1) ?? 0; CountSuccesses(); return(rolls); }