Exemplo n.º 1
0
 public static EffectProcessor getInstance()
 {
     if (INSTANCE == null)
     {
         INSTANCE = new EffectProcessor();
     }
     return(INSTANCE);
 }
Exemplo n.º 2
0
        /// <summary>
        /// The turns applied and potency of an ability, if it has a status effect.
        /// </summary>
        /// <returns></returns>
        public AbilityBuilder conditionStrength()
        {
            string s = _tooltip;

            foreach (int type in _typeIds)
            {
                if (AbilityUtils.effectTypes.Contains((AbilityTypes)type))
                {
                    _conditionStrength = new ConditionStrength();
                    _conditionStrength.turnsApplied = jsonNode["turns_applied"][_skillLevel].AsInt;
                    _conditionStrength.potency      = jsonNode["potency"][_skillLevel].AsInt;
                    if (_tooltip != null)
                    {
                        _tooltip = _tooltip.Replace("+", _conditionStrength.turnsApplied.ToString());
                        _tooltip = _tooltip.Replace("*", EffectProcessor.getEffectLabel(_statusEffect, _conditionStrength.potency));
                    }
                    break;
                }
            }

            return(this);
        }