Esempio n. 1
0
        public HealingEffect(EffectOverTimeSettings effectOverTimeSettings)
        {
            effectOverTimeSettings.ValidateSettings();

            EffectHolder       = effectOverTimeSettings.EffectHolder;
            Name               = effectOverTimeSettings.Name;
            MaxRound           = (int)effectOverTimeSettings.MaxRound;
            HealOverTimeAmount = (int)effectOverTimeSettings.AmountOverTime;
        }
Esempio n. 2
0
        public BleedingEffect(EffectOverTimeSettings effectSettings)
        {
            effectSettings.ValidateSettings();

            BleedDamageOverTime = (int)effectSettings.AmountOverTime;
            EffectHolder        = effectSettings.EffectHolder;
            MaxRound            = (int)effectSettings.MaxRound;
            Name = effectSettings.Name;
        }
Esempio n. 3
0
        public BurningEffect(EffectOverTimeSettings effectOverTimeSettings)
        {
            effectOverTimeSettings.ValidateSettings();

            EffectHolder       = effectOverTimeSettings.EffectHolder;
            FireDamageOverTime = (int)effectOverTimeSettings.AmountOverTime;
            MaxRound           = (int)effectOverTimeSettings.MaxRound;
            Name = effectOverTimeSettings.Name;
        }
Esempio n. 4
0
        public void EffectOverTimeSettingsWithAllSettingsDoesNotThrowException()
        {
            Player player = new Player("test", PlayerClassType.Mage);
            EffectOverTimeSettings effectOverTimeSettings = new EffectOverTimeSettings {
                AmountOverTime = 5,
                EffectHolder   = player,
                MaxRound       = 3,
                Name           = "test"
            };

            Assert.DoesNotThrow(() => effectOverTimeSettings.ValidateSettings());
        }
Esempio n. 5
0
        public void EffectOverTimeSettingsMissingEffectHolderThrowsException()
        {
            EffectOverTimeSettings effectOverTimeSettings = new EffectOverTimeSettings {
                AmountOverTime = 5,
                MaxRound       = 3,
                Name           = "test"
            };
            const string expectedErrorMessage = "EffectOverTimeSettings: EffectHolder has not been set.";

            Exception exception = Assert.Throws <Exception>(() => effectOverTimeSettings.ValidateSettings());

            Assert.AreEqual(expectedErrorMessage, exception.Message);
        }
Esempio n. 6
0
        public void EffectOverTimeSettingsMissingAmountOverTimeThrowsException()
        {
            Player player = new Player("test", PlayerClassType.Mage);
            EffectOverTimeSettings effectOverTimeSettings = new EffectOverTimeSettings {
                EffectHolder = player,
                MaxRound     = 3,
                Name         = "test"
            };
            const string expectedErrorMessage = "EffectOverTimeSettings: AmountOverTime has not been set.";

            Exception exception = Assert.Throws <Exception>(() => effectOverTimeSettings.ValidateSettings());

            Assert.AreEqual(expectedErrorMessage, exception.Message);
        }