Пример #1
0
        protected override List <Lifetime> CreateLifetimes(ModifierInfo modifierInfo)
        {
            RagdollInfo ri = (RagdollInfo)modifierInfo;

            lifetime = new UnpredictableDurationLifetime();
            return(new List <Lifetime>(new[] { lifetime }));
        }
Пример #2
0
        protected override List <Lifetime> CreateLifetimes(ModifierInfo modifierInfo)
        {
            List <Lifetime> lifetimes = base.CreateLifetimes(modifierInfo);

            gaugeLifetime = new UnpredictableDurationLifetime();
            lifetimes.Add(gaugeLifetime);
            return(lifetimes);
        }
Пример #3
0
            public IncreaseLyingDuration(UnpredictableDurationLifetime subLifetime, float duration, Entity targetEntity)
            {
                this.subLifetime = subLifetime;
                this.duration    = duration;
                StatsComponent sc = targetEntity.GetComponent <StatsComponent>();
                bool           found;

                extraLying = sc.CharacterStats.FindStats(StatsType.ExtraLyingDuration, out found);
                if (found)
                {
                    vm = extraLying.AddModifier(StatsModifierOperator.Addition, duration);
                }
            }
        protected override List <Lifetime> CreateLifetimes(ModifierInfo modifierInfo)
        {
            DamageOverTimeInfo doti = (DamageOverTimeInfo)modifierInfo;
            StatsComponent     casterStatsComponent = casterEntity.GetComponent <StatsComponent>();
            Stats casterBurnDurationUpScaleStats    =
                casterStatsComponent.CharacterStats.FindStats(StatsType.BurnDurationUpScale);
            StatsComponent targetStatsComponent             = targetEntity.GetComponent <StatsComponent>();
            Stats          targetBurnDurationDownScaleStats =
                targetStatsComponent.CharacterStats.FindStats(StatsType.BurnDurationDownScale);

            float duration = doti.DotModifierConfig.ShowDurationInSeconds();

            _1HpLifetime = new UnpredictableDurationLifetime();
            return(new List <Lifetime>(new Lifetime[] {
                new DurationBasedLifetime(
                    duration
                    * (1 + targetBurnDurationDownScaleStats.BakedFloatValue)
                    * (1 + casterBurnDurationUpScaleStats.BakedFloatValue)
                    ),
                _1HpLifetime
            }));
        }