예제 #1
0
        private IEnchantment FireAura()
        {
            IEnchantment     enchantment     = new DamageDealtAfterDefenseEnchantment();
            IEffect          effect          = new Damage();
            IEffectParameter effectParameter = new EffectParameter();

            effectParameter.Message = new TranslationMessage("The fire from the Balrog burns you.");

            enchantment.ActivationPercent = 100;
            enchantment.Effect            = effect;
            enchantment.Parameter         = effectParameter;

            effectParameter.Damage      = new Objects.Damage.Damage();
            effectParameter.Damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(84);
            effectParameter.Damage.Type = DamageType.Fire;

            return(enchantment);
        }
        public void Setup()
        {
            enchantment = new DamageDealtAfterDefenseEnchantment();
            effect      = new Mock <IEffect>();
            parameter   = new Mock <IEffectParameter>();
            random      = new Mock <IRandom>();
            attacker    = new Mock <IMobileObject>();
            defender    = new Mock <IMobileObject>();
            room        = new Mock <IRoom>();

            attacker.Setup(e => e.Room).Returns(room.Object);

            enchantment.ActivationPercent = 100;
            enchantment.Effect            = effect.Object;
            enchantment.Parameter         = parameter.Object;

            GlobalReference.GlobalValues.Random = random.Object;
        }