示例#1
0
        public void Complete()
        {
            Results = Results.OrderBy(r => r.TotalDamage).ToList();
            Worst   = Results[0];
            Best    = Results[Results.Count - 1];
            Median  = Results[Results.Count / 2];

            foreach (var battle in Results)
            {
                totalDamage += battle.TotalDamage;
                meanDamage   = (int)(totalDamage / Results.Count);
                meanDps      = (double)meanDamage / Median.fightSeconds;
            }
        }
示例#2
0
        SimResult simulate(Scenario scenario)
        {
            //logActions = logEvents = logPet = true;
            this.scenario             = scenario;
            warlock                   = scenario.Warlock;
            talents                   = warlock.Talents;
            timeline                  = new Timeline();
            results                   = new SimResult(scenario.FightDurationSeconds);
            currentTick               = 0;
            finalTick                 = scenario.FightDurationSeconds * 100;
            currentMana               = warlock.Mana;
            playerAbleToAct           = true;
            curseApplied              = false;
            immolateApplied           = false;
            corruptionApplied         = false;
            siphonLifeApplied         = false;
            unstableAfflictionApplied = false;

            if (warlock.Pet == Pet.Imp)
            {
                Schedule(Event.ImpFirebolt, FireboltCastTime());
            }
            if (warlock.Pet == Pet.Felguard)
            {
                Schedule(Event.FelguardCleave, 0);
                Schedule(Event.FelguardMeleeAttack, 200);
            }

            while (currentTick < finalTick)
            {
                ProcessEvents();
                if (playerAbleToAct)
                {
                    DoAction();
                }
                currentTick++;
            }
            results.Tabulate();
            return(results);
        }