예제 #1
0
 public Status(
     Operation operation, NumericTarget numericTarget, SmallNumber smallAmount
     )
 {
     this.operation     = operation;
     this.numericTarget = numericTarget;
     this.smallAmount   = smallAmount;
 }
예제 #2
0
        public Status(
            Operation operation, NumericTarget numericTarget, Number anyAmount
            )
        {
            if (
                operation.type != Operation.Type.Add &&
                operation.type != Operation.Type.Subtract
                )
            {
                throw new SkillGrammarException(
                          $"A Status's Operation with anyAmount must be " +
                          $"{Operation.Type.Add} or {Operation.Type.Subtract}."
                          );
            }

            this.operation     = operation;
            this.numericTarget = numericTarget;
            this.anyAmount     = anyAmount;
            this.type          = Type.Custom;
        }