예제 #1
0
 public static void AddDigit(string keyword, string digit)
 {
     if (!Debouncer.IsGood($"{keyword}.{digit}"))
     {
         return;
     }
     CreateIfNeeded(keyword);
     allNumbers[keyword].AddDigit(digit);
     TriggerNumberChanged(keyword);
 }
예제 #2
0
        public static int GetInGameCreatureTargetNumber(string targetNumStr)
        {
            int targetNum;

            if (targetNumStr == "{creature.count}")
            {
                targetNum = (int)DigitManager.GetValue("creature");
            }
            else
            {
                if (!int.TryParse(targetNumStr, out targetNum))
                {
                    return(int.MinValue);
                }
                else if (!Debouncer.IsGood("creature", targetNum))
                {
                    return(int.MinValue);
                }
            }

            return(targetNum);
        }