예제 #1
0
        public bool TestAndGrant(StatusConditionTest test, Tick duration)
        {
            if (!test.Percentage.Test())
                return false;

            StatusCondition statusCondition;
            if (StatusConditions.TryGetValue(test.Type, out statusCondition))
            {
                statusCondition.Reserve(duration);
                return true;
            }

            statusCondition = StatusConditionFactory.Create(this, test.Type, duration);
            StatusConditions.Add(test.Type, statusCondition);
            return true;
        }
예제 #2
0
 public bool TestAndGrant(StatusConditionTest test)
 {
     var statusConditionData = BattleBalance._.Data.GetStatusCondition(StatusConditionGroup, test.Type);
     return TestAndGrant(test, statusConditionData.DefaultDuration);
 }