Esempio n. 1
0
        private void ProcessStatModifiers(Statuses.StatModifiers effect, bool remove = false)
        {
            if (effect == null)
            {
                return;
            }

            if (remove)
            {
                Target.Stats.BonusStr              -= effect.Str;
                Target.Stats.BonusInt              -= effect.Int;
                Target.Stats.BonusWis              -= effect.Wis;
                Target.Stats.BonusCon              -= effect.Con;
                Target.Stats.BonusDex              -= effect.Dex;
                Target.Stats.BonusHp               -= effect.Hp;
                Target.Stats.BonusMp               -= effect.Mp;
                Target.Stats.BonusHit              -= effect.Hit;
                Target.Stats.BonusDmg              -= effect.Dmg;
                Target.Stats.BonusAc               -= effect.Ac;
                Target.Stats.BonusRegen            -= effect.Regen;
                Target.Stats.BonusMr               -= effect.Mr;
                Target.Stats.BonusDamageModifier    = effect.DamageModifier;
                Target.Stats.BonusHealModifier      = effect.HealModifier;
                Target.Stats.BonusReflectChance    -= effect.ReflectChance;
                Target.Stats.BonusReflectIntensity -= effect.ReflectIntensity;
                if (effect.OffensiveElement == (Statuses.Element)Target.Stats.OffensiveElementOverride)
                {
                    Target.Stats.OffensiveElementOverride = Enums.Element.None;
                }
                if (effect.DefensiveElement == (Statuses.Element)Target.Stats.DefensiveElementOverride)
                {
                    Target.Stats.DefensiveElementOverride = Enums.Element.None;
                }
                Target.Stats.BonusAc -= effect.Str;
            }
            else
            {
                Target.Stats.BonusStr                += effect.Str;
                Target.Stats.BonusInt                += effect.Int;
                Target.Stats.BonusWis                += effect.Wis;
                Target.Stats.BonusCon                += effect.Con;
                Target.Stats.BonusDex                += effect.Dex;
                Target.Stats.BonusHp                 += effect.Hp;
                Target.Stats.BonusMp                 += effect.Mp;
                Target.Stats.BonusHit                += effect.Hit;
                Target.Stats.BonusDmg                += effect.Dmg;
                Target.Stats.BonusAc                 += effect.Ac;
                Target.Stats.BonusRegen              += effect.Regen;
                Target.Stats.BonusMr                 += effect.Mr;
                Target.Stats.BonusDamageModifier      = effect.DamageModifier;
                Target.Stats.BonusHealModifier        = effect.HealModifier;
                Target.Stats.BonusReflectChance      += effect.ReflectChance;
                Target.Stats.BonusReflectIntensity   += effect.ReflectIntensity;
                Target.Stats.BonusAc                 += effect.Str;
                Target.Stats.OffensiveElementOverride = (Enums.Element)effect.OffensiveElement;
                Target.Stats.DefensiveElementOverride = (Enums.Element)effect.OffensiveElement;
            }
        }
Esempio n. 2
0
 public ModifierEffect()
 {
     this._conditions    = new Conditions();
     this._statModifiers = new StatModifiers();
     this._damage        = new Damage();
     this._heal          = new Heal();
     this._messages      = new Messages();
     this._sound         = new ModifierEffectSound();
     this._animations    = new StatusAnimations();
 }