Ejemplo n.º 1
0
        public HeroAbilityProvider(IEffectIdProvider effectIdProvider, IIntervalFromLastTickService intervalFromLastTickService)
        {
            Contract.Assert(intervalFromLastTickService != null, "intervalFromLastTickService != null");
            Contract.Assert(effectIdProvider != null, "effectIdProvider != null");

            _intervalFromLastTickService = intervalFromLastTickService;
            _effectIdProvider            = effectIdProvider;
        }
Ejemplo n.º 2
0
        public CriticalDamageBuffBuilder(IEffectIdProvider effectIdProvider, int sourseHeroId, double damageMultiplier)
        {
            Contract.Assert(effectIdProvider != null, "effectIdProvider !=null");
            Contract.Assert(damageMultiplier >= 1, "damageMultiplier >= 1");
            Contract.Assert(sourseHeroId >= 0, "sourseHeroId >= 0");

            EffectId = effectIdProvider.GetId(_name, sourseHeroId);

            _damageMultiplier = damageMultiplier;
        }
        public SlowingAttackSpeedDebuffBuilder(IEffectIdProvider effectIdProvider, IIntervalFromLastTickProvider intervalFromLastTickProvider, double slowingRate, TimeSpan duration)
        {
            Contract.Assert(effectIdProvider != null, "effectIdProvider !=null");
            Contract.Assert(slowingRate >= 1, "slowingRate >= 1");
            Contract.Assert(duration >= TimeSpan.Zero, "duration >= TimeSpan.Zero");
            Contract.Assert(intervalFromLastTickProvider != null, "intervalFromLastTickProvider !=null");

            EffectId = effectIdProvider.GetId(_name, 0);

            _intervalFromLastTickProvider = intervalFromLastTickProvider;
            _slowingRate = slowingRate;
            _duration    = duration;
        }
Ejemplo n.º 4
0
        public SlowingMovementDebuffBuilder(IEffectIdProvider effectIdProvider, IIntervalFromLastTickProvider intervalFromLastTickProvider, int sourseHeroId, double slowingRate, TimeSpan duration)
        {
            Contract.Assert(slowingRate >= 1, "slowingRate >= 1");
            Contract.Assert(duration >= TimeSpan.Zero, "duration >= TimeSpan.Zero");
            Contract.Assert(intervalFromLastTickProvider != null, "intervalFromLastTickProvider !=null");
            Contract.Assert(sourseHeroId >= 0, "sourseHeroId >= 0");
            Contract.Assert(effectIdProvider != null, "effectIdProvider !=null");

            EffectId = effectIdProvider.GetId(_name, sourseHeroId);

            _intervalFromLastTickProvider = intervalFromLastTickProvider;
            _slowingRate = slowingRate;
            _duration    = duration;
        }