public FuryGenerator(Character c, Stats s, CombatFactors cf, Skills.WhiteAttacks wa, CalculationOptionsDPSWarr co, BossOptions bo) { WarriorTalents Talents = c.WarriorTalents; //WarriorTalentsCata TalentsCata = c.WarriorTalentsCata; // Rot = new FuryRotation(c, s, cf, wa, co, bo); Rot.Initialize(); LatentGCD = Math.Round(1.5 + co.FullLatency, NUM_DEC); HastedGCD = Math.Round(1.0 + co.FullLatency, NUM_DEC); HSPerc = .8; BS1Proc = c.WarriorTalents.Bloodsurge / 15f; // 7/13/20% BS2Proc = 0f; if (s.BonusWarrior_T10_4P_BSSDProcChange > 0) { BS2Proc = 0.2; } BT = Rot.GetWrapper <Skills.BloodThirst>().ability; WW = Rot.GetWrapper <Skills.WhirlWind>().ability; BS = Rot.GetWrapper <Skills.BloodSurge>().ability; HS = Rot.GetWrapper <Skills.HeroicStrike>().ability; WhiteInterval = wa.MhEffectiveSpeed; SetChances(); }
public ArmsGenerator(Character c, Stats s, CombatFactors cf, Skills.WhiteAttacks wa, CalculationOptionsDPSWarr co, BossOptions bo) { Char = c; Talents = c.WarriorTalents; StatS = s; combatFactors = cf; WhiteAtks = wa; CalcOpts = co; BossOpts = bo;// TalentsCata = c.WarriorTalentsCata; // Rot = new ArmsRotation(c, s, cf, wa, co, bo); Rot.Initialize(); LatentGCD = 1.5 + co.FullLatency; }
public void StateSpaceGeneratorFuryTest1(Character c, Stats s, CombatFactors cf, Skills.WhiteAttacks wa, CalculationOptionsDPSWarr co, BossOptions bo, bool showOutput) { FuryGenerator gen = new FuryGenerator(c, s, cf, wa, co, bo); #if !SILVERLIGHT System.Diagnostics.Stopwatch sw = System.Diagnostics.Stopwatch.StartNew(); #endif List <State <Skills.Ability> > stateSpace = gen.GenerateStateSpace(); #if !SILVERLIGHT sw.Stop(); Console.WriteLine("GenStateSpace: " + sw.ElapsedTicks); #endif if (showOutput) { try { int numIterations = 0; gen.HSPerc = 1; double oldDPS = 0; while (numIterations < 2) { double averageDamage = 0; double rageNeededNoHS = 0f; #if !SILVERLIGHT sw = System.Diagnostics.Stopwatch.StartNew(); #endif MarkovProcess <Skills.Ability> mp2 = new MarkovProcess <Rawr.DPSWarr.Skills.Ability>(stateSpace); #if !SILVERLIGHT sw.Stop(); Console.WriteLine("MarkovProcess._ctor: " + sw.ElapsedTicks); #endif foreach (KeyValuePair <Skills.Ability, double> kvp in mp2.AbilityWeight) { #if RAWR3 || SILVERLIGHT rageNeededNoHS += kvp.Key.RageCost * (kvp.Value * bo.BerserkTimer / mp2.AverageTransitionDuration); #else rageNeededNoHS += kvp.Key.RageCost * (kvp.Value * co.Duration / mp2.AverageTransitionDuration); #endif averageDamage += kvp.Key.DamageOnUse * kvp.Value; } double hsdps = gen.Rot.GetWrapper <Skills.HeroicStrike>().ability.DamageOnUse / wa.MhEffectiveSpeed * gen.HSPerc; double mhdps = wa.MhDamageOnUse / wa.MhEffectiveSpeed * (1 - gen.HSPerc); double ohdps = gen.Rot.WhiteAtks.OhDPS; double dps = averageDamage / mp2.AverageTransitionDuration; dps += hsdps + mhdps + ohdps; System.Console.WriteLine(String.Format("DPS: {0} || HSPerc: {1}", dps, gen.HSPerc)); double rageNeeded = rageNeededNoHS; Skills.HeroicStrike HS = gen.Rot.GetWrapper <Skills.HeroicStrike>().ability as Skills.HeroicStrike; #if RAWR3 || SILVERLIGHT rageNeeded += HS.FullRageCost * (bo.BerserkTimer / wa.MhEffectiveSpeed * gen.HSPerc); double rageGenerated = wa.MHSwingRage * (bo.BerserkTimer / wa.MhEffectiveSpeed) + wa.OHSwingRage * (bo.BerserkTimer / wa.OhEffectiveSpeed); #else rageNeeded += HS.FullRageCost * (co.Duration / wa.MhEffectiveSpeed * gen.HSPerc); double rageGenerated = wa.MHSwingRage * (co.Duration / wa.MhEffectiveSpeed) + wa.OHSwingRage * (co.Duration / wa.OhEffectiveSpeed); #endif double HsRage = rageNeeded - rageNeededNoHS; double hsRageNeeded = rageGenerated - rageNeededNoHS; gen.HSPerc = Math.Min((hsRageNeeded / HS.FullRageCost) / #if RAWR3 || SILVERLIGHT (bo.BerserkTimer / wa.MhEffectiveSpeed), 1); // Needed HS Activates / White activates #else (co.Duration / wa.MhEffectiveSpeed), 1); // Needed HS Activates / White activates #endif oldDPS = dps; numIterations++; } /*MarkovProcess<Skills.Ability> mp = new MarkovProcess<Skills.Ability>(stateSpace); * * double averageDamage2 = 0.0; * foreach (KeyValuePair<Skills.Ability, double> kvp in mp.AbilityWeight) * { * if (showOutput) System.Console.WriteLine("{0} - {1}", kvp.Key.Name, kvp.Key.DamageOnUse * kvp.Value / mp.AverageTransitionDuration); * averageDamage2 += kvp.Key.DamageOnUse * kvp.Value; * } * double hsdps2 = gen.Rot.GetWrapper<Skills.HeroicStrike>().ability.DamageOnUse / wa.MhEffectiveSpeed * gen.HSPerc; * double mhdps2 = wa.MhDamageOnUse / wa.MhEffectiveSpeed * (1 - gen.HSPerc); * double ohdps2 = gen.Rot.WhiteAtks.OhDPS; * if (showOutput) * { * System.Console.WriteLine("HS - {0}", hsdps2); * System.Console.WriteLine("MH - {0}", mhdps2); * System.Console.WriteLine("OH - {0}", ohdps2); * } * double dps2 = averageDamage2 / mp.AverageTransitionDuration; * dps2 += hsdps2 + mhdps2 + ohdps2;*/ } catch (Exception ex) { new ErrorBox("Error in creating Arms Markov Calculations", ex.Message, "StateSpaceGeneratorArmsTest1()", "StateSpace Count: " + stateSpace.Count.ToString(), ex.StackTrace); } } }
public void StateSpaceGeneratorArmsTest1(Character c, Stats s, CombatFactors cf, Skills.WhiteAttacks wa, CalculationOptionsDPSWarr co, BossOptions bo) { ArmsGenerator gen = new ArmsGenerator(c, s, cf, wa, co, bo); var stateSpace = gen.GenerateStateSpace(); string output = ""; foreach (State <Rawr.DPSWarr.Skills.Ability> a in stateSpace) { output += a.ToString() + "\n"; } output += "\ndone"; try { MarkovProcess <Skills.Ability> mp = new MarkovProcess <Skills.Ability>(stateSpace); double averageDamage = 0.0; foreach (KeyValuePair <Skills.Ability, double> kvp in mp.AbilityWeight) { averageDamage += kvp.Key.DamageOnUse * kvp.Value; } double dps = averageDamage / mp.AverageTransitionDuration; dps += gen.Rot.WhiteAtks.MhDPS; } catch (Exception ex) { new ErrorBox("Error in creating Arms Markov Calculations", ex.Message, "StateSpaceGeneratorArmsTest1()", "StateSpace Count: " + stateSpace.Count.ToString(), ex.StackTrace); } }