Beispiel #1
0
 public ICombatStat GetCombatStatByType(CombatStatType typeToCheck)
 {
     if (CombatStats.ContainsKey(typeToCheck))
     {
         return(CombatStats[typeToCheck]);
     }
     Logger.Say("CombatStatsHandler tried to access a NULL ICombatStat");
     return(null);
 }
        public void ChangeCombatStat(CombatStatType type, int amount)
        {
            switch (type)
            {
            case CombatStatType.HealthPoint:
                InternalCurrentHealth = currentHealth + amount;
                break;

            case CombatStatType.CombatPoint:
                InternalCurrentAttack  = currentAttack + amount;
                InternalCurrentDefense = currentDefense + amount;
                break;
            }
        }
Beispiel #3
0
        private static void AddStatToDict(Dictionary <CombatStatType, float> bonusDict,
                                          CombatStatType targetStatType,
                                          PersonRuleLevel level,
                                          PersonRuleDirection direction)
        {
            bonusDict.TryGetValue(targetStatType, out float value);

            float q;

            switch (level)
            {
            case PersonRuleLevel.Lesser:
                q = 0.1f;
                break;

            case PersonRuleLevel.Normal:
                q = 0.3f;
                break;

            case PersonRuleLevel.Grand:
                q = 0.5f;
                break;

            default:
                throw new NotSupportedException($"Неизветный уровень угрозы выживания {level}.");
            }

            switch (direction)
            {
            case PersonRuleDirection.Positive:
                // Бонус изначально расчитывается, как положительный. Ничего не делаем.
                break;

            case PersonRuleDirection.Negative:
                q *= -1;
                break;

            default:
                throw new NotSupportedException($"Неизветный уровень угрозы выживания {direction}.");
            }

            value += q;

            bonusDict[targetStatType] = value;
        }
 public CombatStat(float baseValue, CombatStatType StatType) : base(baseValue)
 {
     type = StatType;
 }
 public void CalculateStat(CombatStatType whichStat)
 {
 }
Beispiel #6
0
 public RogueStat(CombatStatType type, ICharacterAttribute primaryAttribute, ICharacterAttribute secondaryAttribute)
     : base(type, primaryAttribute, secondaryAttribute)
 {
 }
Beispiel #7
0
 public TacticalActDependencySubScheme(CombatStatType stat, float value)
 {
     Stat  = stat;
     Value = value;
 }