Ejemplo n.º 1
0
 public Mage(int NumberOfMages, int CritChance, int HitChance, int SpellPower, TargetDummy Target)
 {
     numberOfMages = NumberOfMages;
     critChance    = CritChance;
     hitChance     = HitChance;
     spellPower    = SpellPower;
     target        = Target;
     rand          = new Random();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Stopwatch stopWatch = new Stopwatch();

            stopWatch.Start();

            Console.WriteLine("Starting Ignite Simulation");
            TargetDummy target   = new TargetDummy();
            Mage        mages    = new Mage(4, 35, 95, 0, target);
            int         tickSize = mages.TimeBetweenFireballs();

            Console.WriteLine("Time Between Fireballs: " + tickSize);
            long numberOfFireballsVolleys = 30000000;
            long maxTicks = numberOfFireballsVolleys * 300;

            for (long tick = 0; tick < maxTicks; tick += tickSize)
            {
                mages.CastFireBall(tick);
            }

            Random   temp     = new Random();
            FireBall fireball = new FireBall(temp, 35, 95, 0, 0);

            fireball.critStatus = false;
            Console.WriteLine("Single Fireball Dmg (non crit):  " + fireball.damage);
            List <double> report = target.ReportDamage();

            Console.WriteLine("Reports:");
            //Console.WriteLine("Number of spells non-crit: " + report[3]);
            //Console.WriteLine("Number of spells resisted: " + report[4]);
            //Console.WriteLine("Number of spells crit: " + report[5]);
            //Console.WriteLine("Number of total fireballs: " + report[6]);
            Console.WriteLine("Fireball damage taken / 500: " + report[0] / 500);
            Console.WriteLine("Ignite damage taken / 500: " + report[1] / 500);
            Console.WriteLine("Total damage taken / 500: " + report[2] / 500);

            stopWatch.Stop();
            Console.WriteLine("Total Program Timer:       " + stopWatch.ElapsedMilliseconds + " ms");
        }