当前位置: 首页>>代码示例>>C#>>正文


C# Sequence.GroupManaGemEffect方法代码示例

本文整理汇总了C#中Sequence.GroupManaGemEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Sequence.GroupManaGemEffect方法的具体用法?C# Sequence.GroupManaGemEffect怎么用?C# Sequence.GroupManaGemEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sequence的用法示例。


在下文中一共展示了Sequence.GroupManaGemEffect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateRawSequence

        private Sequence GenerateRawSequence(bool ignoreSegments)
        {
            Sequence sequence = new Sequence();

            double totalTime = 0.0;
            double totalGem = 0.0;
            int columnIdleRegen = 0;
            int columnManaOverflow = -1;
            for (int i = 0; i < SolutionVariable.Count; i++)
            {
                if (SolutionVariable[i].Type == VariableType.IdleRegen)
                {
                    columnIdleRegen = i;
                    break;
                }
            }
            for (int i = 0; i < SolutionVariable.Count; i++)
            {
                if (SolutionVariable[i].Type == VariableType.ManaGem)
                {
                    sequence.ColumnManaGem = i;
                    break;
                }
            }
            for (int i = 0; i < SolutionVariable.Count; i++)
            {
                if (SolutionVariable[i].Type == VariableType.ManaPotion)
                {
                    sequence.ColumnManaPotion = i;
                    break;
                }
            }
            for (int i = 0; i < SolutionVariable.Count; i++)
            {
                if (SolutionVariable[i].Type == VariableType.ManaOverflow)
                {
                    columnManaOverflow = i;
                    break;
                }
            }
            for (int i = 0; i < SolutionVariable.Count; i++)
            {
                if (Solution[i] > 0.01 && SolutionVariable[i].Type != VariableType.ManaOverflow)
                {
                    SequenceItem item = new SequenceItem(i, Solution[i]);
                    if (ignoreSegments) item.Segment = 0;
                    sequence.Add(item);
                    if (!item.IsManaPotionOrGem) totalTime += item.Duration;
                    if (item.VariableType == VariableType.ManaGem) totalGem += Solution[i];
                }
            }
            if (CalculationOptions.TargetDamage == 0.0 && totalTime < CalculationOptions.FightDuration - 0.00001)
            {
                sequence.Add(new SequenceItem(columnIdleRegen, CalculationOptions.FightDuration - totalTime));
            }

            // evaluate sequence

            /*unexplained = sequence.Evaluate(timing, Sequence.EvaluationMode.Unexplained);
            if (unexplained < bestUnexplained)
            {
                bestUnexplained = unexplained;
                bestTiming = timing.ToString();
            }*/

            sequence.GroupMoltenFury();
            SequenceGroup heroismGroup = sequence.GroupHeroism();
            if (CalculationOptions.HeroismControl == 3)
            {
                heroismGroup.MinTime = Math.Min(CalculationOptions.FightDuration - CalculationOptions.MoltenFuryPercentage * CalculationOptions.FightDuration, CalculationOptions.FightDuration - 40.0);
            }            
            sequence.GroupCombustion();
            sequence.GroupArcanePower();
            sequence.GroupVolcanicPotion();
            foreach (EffectCooldown cooldown in ItemBasedEffectCooldowns)
            {
                sequence.GroupSpecialEffect(cooldown);
            }
            List<SequenceGroup> list = sequence.GroupManaGemEffect();
            if (list != null && ManaGemEffect && CalculationOptions.DisplaySegmentCooldowns && columnManaOverflow != -1)
            {
                float manaBurn = 0;
                for (int i = 0; i < SolutionVariable.Count; i++)
                {
                    if (Solution[i] > 0.01 && SolutionVariable[i].Segment == 0 && SolutionVariable[i].Type == VariableType.Spell)
                    {
                        CastingState state = SolutionVariable[i].State;
                        if (state != null && !state.EffectsActive((int)StandardEffect.ManaGemEffect))
                        {
                            float burn = (float)SolutionVariable[i].Cycle.ManaPerSecond;
                            if (burn > manaBurn) manaBurn = burn;
                        }
                    }
                }

                double overflow = Solution[columnManaOverflow];
                double tmin = 0;
                if (manaBurn > 0) tmin = (ManaGemValue * (1 + BaseStats.BonusManaGem) - overflow) / manaBurn;

                foreach (SequenceGroup g in list)
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:CharacterCalculationsMage.cs


注:本文中的Sequence.GroupManaGemEffect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。