コード例 #1
0
        public static void NumDice(MacroContext context)
        {
            long dice = 0;

            foreach (var roll in context.Data.InternalContext.RollExpressions)
            {
                dice += (long)roll.NumDice.Value;
            }

            context.Value     = dice;
            context.ValueType = ResultType.Total;
        }
コード例 #2
0
ファイル: BuiltinMacros.cs プロジェクト: garyray-k/DiceRoller
 public static void NumDice(MacroContext context)
 {
     context.Value     = context.Data.InternalContext.AllRolls.Count;
     context.ValueType = ResultType.Total;
 }