public AttackModel(Character character, Base.StatsPaladin stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; CalcOpts = calcOpts; BossOpts = bossOpts; Stats = stats; DefendTable = new DefendTable(character, stats, calcOpts, bossOpts); ParryModel = new ParryModel(character, stats, calcOpts, bossOpts); Abilities.Add(Ability.AvengersShield, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.CensureTick, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.Consecration, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.CrusaderStrike, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HammerOfTheRighteous, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HammerOfTheRighteousProc, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HammerOfWrath, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HolyWrath, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.JudgementOfRighteousness, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.JudgementOfTruth, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.MeleeSwing, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.RetributionAura, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.SealOfRighteousness, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.SealOfTruth, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.ShieldOfTheRighteous, character, stats, calcOpts, bossOpts); Calculate(); }
public DKCombatTable(Character c, StatsDK stats, CharacterCalculationsBase calcs, ICalculationOptionBase calcOpts, BossOptions bossOpts) { m_CState = new CombatState(); if (c != null) { m_CState.m_Char = c; m_CState.m_Talents = c.DeathKnightTalents; m_CState.m_Spec = CalculationsDPSDK.GetSpec(c.DeathKnightTalents); } m_CState.m_Stats = stats; // TODO: Put in check here for null. m_Calcs = calcs as CharacterCalculationsDPSDK; m_Opts = calcOpts as CalculationOptionsDPSDK; m_CState.m_Presence = Presence.Frost; if (calcOpts != null && m_Opts == null) { //throw new Exception("Opts not converted properly."); m_Opts = new CalculationOptionsDPSDK(); } try { m_CState.m_Presence = m_Opts.presence; } catch { } // pass stay w/ default m_BO = bossOpts; if (m_BO == null) { m_BO = new BossOptions(); } // JOTHAY TODO: Kind of an Ugly Hack to do this, but it will give them a value m_CState.m_NumberOfTargets = m_BO.MultiTargs ? m_BO.DynamicCompiler_MultiTargs.GetAverageTargetGroupSize(m_BO.BerserkTimer) : 1f; // m_CState.m_bAttackingFromBehind = m_BO.InBack; m_CState.fBossArmor = m_BO.Armor; SetupExpertise(c); }
public BaseCharacterStatCalculations(Stats stats, CalculationOptionsShadowPriest options, BossOptions boss, PriestTalents talents) { _stats = stats; _target = boss; _talents = talents; _options = options; }
public AbilityModel(Character character, Stats stats, Ability ability, CalculationOptionsProtPaladin calcOpts) { #endif Character = character; Stats = stats; Ability = ability; CalcOpts = calcOpts; #if (RAWR3) BossOpts = bossOpts; #endif Talents = Character.PaladinTalents; #if (RAWR3) AttackTable = new AttackTable(character, stats, ability, CalcOpts, BossOpts); #else AttackTable = new AttackTable(character, stats, ability, CalcOpts); #endif if (!Lookup.IsSpell(Ability)) #if (RAWR3) { ArmorReduction = Lookup.EffectiveTargetArmorReduction(Character, Stats, BossOpts.Armor, BossOpts.Level); } #else { ArmorReduction = Lookup.EffectiveTargetArmorReduction(Character, Stats, CalcOpts.TargetArmor, CalcOpts.TargetLevel); } #endif Name = Lookup.Name(Ability); DamageMultiplier = Lookup.StanceDamageMultipler(Character, Stats); DamageMultiplier *= Lookup.CreatureTypeDamageMultiplier(Character, CalcOpts.TargetType); CalculateDamage(); CalculateThreat(); }
public CombatStats(Character character, Stats stats, CalculationOptionsEnhance calcOpts, BossOptions bossOpts) { _stats = stats; _character = character; _calcOpts = calcOpts; _bossOpts = bossOpts; _talents = _character.ShamanTalents; fightLength = _bossOpts.BerserkTimer; levelDifference = _bossOpts.Level - _character.Level; if (levelDifference > 3) { levelDifference = 3; } else if (levelDifference < 0) { levelDifference = 0; } whiteCritDepression = StatConversion.NPC_LEVEL_CRIT_MOD[levelDifference]; // 0.03f + 0.006f * levelDifference; yellowCritDepression = StatConversion.NPC_LEVEL_CRIT_MOD[levelDifference]; // 0.006f * levelDifference; UpdateCalcs(true); SetManaRegen(); _rotation = new Priorities(this, _calcOpts, _bossOpts, _character, _stats, _talents); _rotation.CalculateAbilities(); UpdateCalcs(false); // second pass to revise calcs based on new ability cooldowns }
public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations) { // First things first, we need to ensure that we aren't using bad data CharacterCalculationsElemental calc = new CharacterCalculationsElemental(); if (character == null) { return(calc); } CalculationOptionsElemental calcOpts = character.CalculationOptions as CalculationOptionsElemental; if (calcOpts == null) { return(calc); } // BossOptions bossOpts = character.BossOptions; Stats stats = GetCharacterStats(character, additionalItem); calc.BasicStats = stats; calc.LocalCharacter = character; Rawr.Elemental.Estimation.solve(calc, calcOpts, bossOpts); return(calc); }
public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations) { CalculationOptionsElemental calcOpts = character.CalculationOptions as CalculationOptionsElemental; if (calcOpts == null) { calcOpts = new CalculationOptionsElemental(); } BossOptions bossOpts = character.BossOptions; if (bossOpts == null) { bossOpts = new BossOptions(); } Stats stats = GetCharacterStats(character, additionalItem); CharacterCalculationsElemental calculatedStats = new CharacterCalculationsElemental(); calculatedStats.BasicStats = stats; calculatedStats.LocalCharacter = character; calcOpts.calculatedStats = calculatedStats; Rawr.Elemental.Estimation.solve(calculatedStats, calcOpts, bossOpts); return(calculatedStats); }
public RogueRotationCalculatorCombat(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats mainGaucheStats, RogueAbilityStats sStrikeStats, RogueAbilityStats rStrikeStats, RogueAbilityStats ruptStats, RogueAbilityStats evisStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) : base(character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm, offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats, offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats) { SStrikeStats = sStrikeStats; RStrikeStats = rStrikeStats; EvisStats = evisStats; MainGaucheStats = mainGaucheStats; ChanceOnMGAttackOnMHAttack = RV.Mastery.MainGauche + RV.Mastery.MainGauchePerMast * StatConversion.GetMasteryFromRating(stats.MasteryRating); EnergyRegenMultiplier = (1f + RV.Mastery.VitalityRegenMult) * (1f + (RV.AR.Duration + (Talents.GlyphOfAdrenalineRush ? RV.Glyph.ARDurationBonus : 0f)) / RV.AR.CD * Talents.AdrenalineRush) * (1f + HasteBonus) - 1f; #region Probability tables float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f); _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c); _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); c = ChanceExtraCPPerHit + ChanceOnCPOnSSCrit * SStrikeStats.CritChance; h = (1f - c); _averageSStrikeCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageSStrikeCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c + nf * h * c); _averageSStrikeCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageSStrikeCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageSStrikeCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); #endregion }
public BaseCombatTable(BossOptions bossOption, Stats stats, Attacktype type) { Stats = stats; Attacktype = type; LevelDif = bossOption.Level - 85; IsBehind = bossOption.InBack; }
public RogueRotationCalculatorCombat(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats mainGaucheStats, RogueAbilityStats sStrikeStats, RogueAbilityStats rStrikeStats, RogueAbilityStats ruptStats, RogueAbilityStats evisStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) : base(character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm, offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats, offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats) { SStrikeStats = sStrikeStats; RStrikeStats = rStrikeStats; EvisStats = evisStats; MainGaucheStats = mainGaucheStats; ChanceOnMGAttackOnMHAttack = RV.Mastery.MainGauche + RV.Mastery.MainGauchePerMast * StatConversion.GetMasteryFromRating(stats.MasteryRating); EnergyRegenMultiplier = (1f + RV.Mastery.VitalityRegenMult) * (1f + (RV.AR.Duration + (Talents.GlyphOfAdrenalineRush ? RV.Glyph.ARDurationBonus : 0f)) / RV.AR.CD * Talents.AdrenalineRush) * (1f + HasteBonus) - 1f; #region Probability tables float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f); _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c); _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); c = ChanceExtraCPPerHit + ChanceOnCPOnSSCrit * SStrikeStats.CritChance; h = (1f - c); _averageSStrikeCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageSStrikeCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c + nf * h * c); _averageSStrikeCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageSStrikeCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageSStrikeCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); #endregion }
public BaseCombatTable(BossOptions bossOption, Stats stats, Attacktype type) { Stats = stats; Attacktype = type; LevelDif = bossOption.Level - 85; IsBehind = bossOption.InBack; }
public static void solve(CharacterCalculationsShadowPriest calculatedStats, CalculationOptionsShadowPriest calcOpts, BossOptions bossOpts) { Stats stats = calculatedStats.BasicStats; Character character = calculatedStats.LocalCharacter; PriestTalents talents = character.PriestTalents; Solver e; Rotation rot; float FightDuration = bossOpts.BerserkTimer; // WITHOUT PROCS e = new Solver(stats, new Stats{}, talents, calcOpts); rot = e.getPriorityRotation(); calculatedStats.DpsPoints = rot.DPS; calculatedStats.SurvivalPoints = stats.Stamina / FightDuration; //TODO: meaningful surv points calculatedStats.CombatStats = stats.Clone(); calculatedStats.DevouringPlauge = rot.DP; calculatedStats.MindBlast = rot.MB; calculatedStats.MindFlay = rot.MF; calculatedStats.MindSpike = rot.Spike; //calculatedStats.PowerWordShield = rot.shield; calculatedStats.ShadowFiend = rot.Fiend; calculatedStats.ShadowWordDeath = rot.SWD; calculatedStats.ShadowWordPain = rot.SWP; calculatedStats.VampiricTouch = rot.VT; calculatedStats.Rotation = rot.ToString(); calculatedStats.RotationDetails = rot.ToDetailedString(); }
private void character_CalculationsInvalidated(object sender, EventArgs e) { if (BossOptions == null) { return; } TB_BossInfo.Text = BossOptions.GenInfoString(Character); }
public void bossOpts_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (isLoading) { return; } isLoading = true; // Basics CB_Level.SelectedItem = BossOptions.Level; CB_Armor.SelectedItem = BossOptions.Armor; NUD_Duration.Value = BossOptions.BerserkTimer; NUD_DurationSpeed.Value = BossOptions.SpeedKillTimer; NUD_TargHP.Value = BossOptions.Health; NUD_Under35Perc.Value = BossOptions.Under35Perc * 100; NUD_Under20Perc.Value = BossOptions.Under20Perc * 100; CB_InBackPerc_Melee.IsEnabled = (bool)(CK_InBack.IsChecked = BossOptions.InBack); CB_InBackPerc_Melee.Value = BossOptions.InBackPerc_Melee * 100d; CB_InBackPerc_Ranged.IsEnabled = (bool)(CK_InBack.IsChecked = BossOptions.InBack); CB_InBackPerc_Ranged.Value = BossOptions.InBackPerc_Ranged * 100d; CB_MaxPlayers.SelectedItem = BossOptions.Max_Players; CB_MinTanks.SelectedItem = BossOptions.Min_Tanks; CB_MinHealers.SelectedItem = BossOptions.Min_Healers; // Offensive BT_MultiTargs.IsEnabled = (bool)(CK_MultiTargs.IsChecked = BossOptions.MultiTargs); BT_MultiTargs.Content = BossOptions.DynamicCompiler_MultiTargs.ToString(); BT_Attacks.IsEnabled = (bool)(CK_Attacks.IsChecked = BossOptions.DamagingTargs); BT_Attacks.Content = BossOptions.DynamicCompiler_Attacks.ToString(); // Defensive NUD_Resist_Physical.Value = BossOptions.Resist_Physical * 100d; NUD_Resist_Frost.Value = BossOptions.Resist_Frost * 100d; NUD_Resist_Fire.Value = BossOptions.Resist_Fire * 100d; NUD_Resist_Nature.Value = BossOptions.Resist_Nature * 100d; NUD_Resist_Arcane.Value = BossOptions.Resist_Arcane * 100d; NUD_Resist_Shadow.Value = BossOptions.Resist_Shadow * 100d; NUD_Resist_Holy.Value = BossOptions.Resist_Holy * 100d; // The Impedance Checks BT_Moves.IsEnabled = (bool)(CK_MovingTargs.IsChecked = BossOptions.MovingTargs); BT_Stuns.IsEnabled = (bool)(CK_StunningTargs.IsChecked = BossOptions.StunningTargs); BT_Fears.IsEnabled = (bool)(CK_FearingTargs.IsChecked = BossOptions.FearingTargs); BT_Roots.IsEnabled = (bool)(CK_RootingTargs.IsChecked = BossOptions.RootingTargs); BT_Disarms.IsEnabled = (bool)(CK_DisarmTargs.IsChecked = BossOptions.DisarmingTargs); // The Impedance Buttons BT_Stuns.Content = BossOptions.DynamicCompiler_Stun.ToString(); BT_Moves.Content = BossOptions.DynamicCompiler_Move.ToString(); BT_Fears.Content = BossOptions.DynamicCompiler_Fear.ToString(); BT_Roots.Content = BossOptions.DynamicCompiler_Root.ToString(); BT_Disarms.Content = BossOptions.DynamicCompiler_Disarm.ToString(); // Summary TB_BossInfo.Text = BossOptions.GenInfoString(Character); // if (CB_BossList.SelectedIndex == -1) { CB_BossList.SelectedIndex = 0; } // Sets it to Custom isLoading = false; // Character.OnCalculationsInvalidated(); }
public Pet(StatsDK dkstats, DeathKnightTalents t, BossOptions bo, Presence p) { m_BO = bo; m_DKStats = dkstats; m_Talents = t; m_Presence = p; AccumulateStats(); }
protected void Initialize(Character character, Stats stats, Ability ability, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; CalcOpts = calcOpts; BossOpts = bossOpts; Stats = stats; Ability = ability; Calculate(); }
public ParryModel(Character character, Stats stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; AttackTable = new AttackTable(character, stats, calcOpts, bossOpts); DefendTable = new DefendTable(character, stats, calcOpts, bossOpts); Calculate(); }
protected void Initialize(Character character, Stats stats, Ability ability, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; CalcOpts = calcOpts; BossOpts = bossOpts; Stats = stats; Ability = ability; Calculate(); }
public RotationTest(Character character, CharacterCalculationsHunter calculatedStats, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { this.character = character; this.CalcOpts = calcOpts; this.BossOpts = bossOpts; this.calculatedStats = calculatedStats; // 091109 Drizz: Added //this.calculatedStats.sequence = "Time :Shot :CastTime:Done :CD Until" + Environment.NewLine; }
public Pet(StatsDK dkstats, DeathKnightTalents t, BossOptions bo, Presence p) { m_BO = bo; m_DKStats = dkstats; m_Talents = t; m_Presence = p; AccumulateStats(); }
public RotationTest(Character character, CharacterCalculationsHunter calculatedStats, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { this.character = character; this.CalcOpts = calcOpts; this.BossOpts = bossOpts; this.calculatedStats = calculatedStats; // 091109 Drizz: Added //this.calculatedStats.sequence = "Time :Shot :CastTime:Done :CD Until" + Environment.NewLine; }
public Player(Character character) { this.Character = character; this.Stats = new Base.StatsWarrior(); this.Talents = this.Character.WarriorTalents; this.CalcOpts = this.Character.CalculationOptions as CalculationOptionsProtWarr; this.BossOpts = this.Character.BossOptions; this.DefendModel = null; this.AttackModel = null; }
public Gargoyle(StatsDK dkstats, DeathKnightTalents t, BossOptions bo, Presence p) { m_BO = bo; m_DKStats = dkstats; m_Talents = t; m_Presence = p; AccumulateStats(); DamageType = ItemDamageType.Physical; }
public ParryModel(Character character, Stats stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; AttackTable = new AttackTable(character, stats, calcOpts, bossOpts); DefendTable = new DefendTable(character, stats, calcOpts, bossOpts); Calculate(); }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) Character.CalculationOptions = new CalculationOptionsEnhance(); calcOpts = Character.CalculationOptions as CalculationOptionsEnhance; bossOpts = Character.BossOptions; // Model Specific Code // _loadingCalculationOptions = false; }
public DefendModel(Character character, Base.StatsPaladin stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; ParryModel = new ParryModel(character, stats, calcOpts, bossOpts); DefendTable = new DefendTable(character, stats, calcOpts, bossOpts); Calculate(); }
private void CB_BossList_SelectedIndexChanged(object sender, SelectionChangedEventArgs e) { string addInfo = "No Additional Info"; try { if (!isLoading) { addInfo = "Not Loading"; if (CB_BossList.SelectedIndex != 0) // "Custom" { addInfo += "\r\nCB_BossList.SelectedIndex != 0"; isLoading = true; // Get Values BossHandler boss = bosslist.GetBossFromBetterName(CB_BossList.SelectedItem.ToString()).Clone(); // "T7 : Naxxramas : 10 man : Patchwerk" BossOptions.CloneThis(boss); addInfo += "\r\nBoss Info Set"; // Set Controls to those Values TB_BossInfo.Text = boss.GenInfoString(Character); // Save the new names if (!firstload) { addInfo += "\r\n!firstlost"; BossOptions.FilterType = (BossList.FilterType)CB_BL_FilterType.SelectedIndex; BossOptions.Filter = CB_BL_Filter.SelectedItem.ToString(); BossOptions.BossName = CB_BossList.SelectedItem.ToString(); } isLoading = false; } else { addInfo += "\r\nCB_BossList.SelectedIndex == 0"; isLoading = true; BossHandler boss = new BossHandler(); // boss.Name = "Custom"; BossOptions.BossName = boss.Name; // TB_BossInfo.Text = boss.GenInfoString(Character); isLoading = false; } bossOpts_PropertyChanged(null, null); } } catch (Exception ex) { new Base.ErrorBox() { Title = "Error in setting BossPicker Character settings from Boss", Function = "CB_BossList_SelectedIndexChanged()", TheException = ex, }.Show(); isLoading = false; } }
public PriestSolver(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) { Name = "Priest Solver base"; this.character = calc.Character; this.stats = calc.BasicStats; this.calc = calc; this.calcOpts = calcOpts; this.bossOptions = character.BossOptions; this.verbose = verbose; }
public DefendModel(Character character, Base.StatsPaladin stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; ParryModel = new ParryModel(character, stats, calcOpts, bossOpts); DefendTable = new DefendTable(character, stats, calcOpts, bossOpts); Calculate(); }
public AttackModel(Character character, Stats stats, AttackModelMode attackModelMode, CalculationOptionsProtPaladin calcOpts) #endif { Character = character; CalcOpts = calcOpts; #if (RAWR3) BossOpts = bossOpts; #endif Stats = stats; #if (RAWR3) DefendTable = new DefendTable(character, stats, calcOpts, bossOpts, true); ParryModel = new ParryModel(character, stats, calcOpts, bossOpts); #else DefendTable = new DefendTable(character, stats, calcOpts, true); ParryModel = new ParryModel(character, stats, calcOpts); #endif _attackModelMode = attackModelMode; #if (RAWR3) Abilities.Add(Ability.None, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.ShieldOfRighteousness, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HammerOfTheRighteous, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.SealOfVengeance, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HolyVengeance, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.JudgementOfVengeance, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.SealOfRighteousness, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.JudgementOfRighteousness, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.Exorcism, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HammerOfWrath, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.AvengersShield, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HolyShield, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.RetributionAura, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.HolyWrath, character, stats, calcOpts, bossOpts); Abilities.Add(Ability.Consecration, character, stats, calcOpts, bossOpts); #else Abilities.Add(Ability.None, character, stats, calcOpts); Abilities.Add(Ability.ShieldOfRighteousness, character, stats, calcOpts); Abilities.Add(Ability.HammerOfTheRighteous, character, stats, calcOpts); Abilities.Add(Ability.SealOfVengeance, character, stats, calcOpts); Abilities.Add(Ability.HolyVengeance, character, stats, calcOpts); Abilities.Add(Ability.JudgementOfVengeance, character, stats, calcOpts); Abilities.Add(Ability.SealOfRighteousness, character, stats, calcOpts); Abilities.Add(Ability.JudgementOfRighteousness, character, stats, calcOpts); Abilities.Add(Ability.Exorcism, character, stats, calcOpts); Abilities.Add(Ability.HammerOfWrath, character, stats, calcOpts); Abilities.Add(Ability.AvengersShield, character, stats, calcOpts); Abilities.Add(Ability.HolyShield, character, stats, calcOpts); Abilities.Add(Ability.RetributionAura, character, stats, calcOpts); Abilities.Add(Ability.HolyWrath, character, stats, calcOpts); Abilities.Add(Ability.Consecration, character, stats, calcOpts); #endif Calculate(); }
protected void Initialize(Character character, Stats stats, Ability ability, CalculationOptionsProtPaladin calcOpts) #endif { Character = character; CalcOpts = calcOpts; #if (RAWR3) BossOpts = bossOpts; #endif Stats = stats; Ability = ability; Calculate(); }
public PetCalculations(Character character, CharacterCalculationsHunter calculatedStats, CalculationOptionsHunter calcopts, BossOptions bossOpts, StatsHunter hunterStats) { this.character = character; this.calculatedStats = calculatedStats; this.CalcOpts = calcopts; this.BossOpts = bossOpts; this.PetTalents = calcopts.PetTalents; this.Talents = character.HunterTalents; this.HunterStats = hunterStats; PetStats = new StatsHunter(); }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsEnhance(); } calcOpts = Character.CalculationOptions as CalculationOptionsEnhance; bossOpts = Character.BossOptions; // Model Specific Code // _loadingCalculationOptions = false; }
public RogueRotationCalculator(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats ruptStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) { Char = character; Talents = character.RogueTalents; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; HasteBonus = hasteBonus; MainHandSpeed = mainHandSpeed; OffHandSpeed = offHandSpeed; MainHandSpeedNorm = mainHandSpeedNorm; OffHandSpeedNorm = offHandSpeedNorm; AvoidedWhiteMHAttacks = avoidedWhiteMHAttacks; AvoidedWhiteOHAttacks = avoidedWhiteOHAttacks; AvoidedMHAttacks = avoidedMHAttacks; AvoidedOHAttacks = avoidedOHAttacks; AvoidedFinisherAttacks = avoidedFinisherAttacks; AvoidedPoisonAttacks = avoidedPoisonAttacks; ChanceExtraCPPerHit = chanceExtraCPPerHit; T411 = stats.Rogue_T11_4P; MainHandStats = mainHandStats; OffHandStats = offHandStats; RuptStats = ruptStats; SnDStats = snDStats; ExposeStats = exposeStats; IPStats = iPStats; DPStats = dPStats; WPStats = wPStats; #region Talent/Mastery bonuses StepVanishResetCD = RV.Talents.PreparationCD * Talents.Preparation; ChanceOnEnergyOnGarrRuptTick = RV.Talents.VenomousWoundsProcChance * Talents.VenomousWounds; ChanceOnNoDPConsumeOnEnvenom = RV.Talents.MasterPoisonerNoDPConsumeChance * Talents.MasterPoisoner; ChanceOnSnDResetOnEvisEnv = RV.Talents.CutToTheChaseMult[Talents.CutToTheChase]; ChanceOnRuptResetonEvisCP = RV.Talents.SerratedBladesChance * Talents.SerratedBlades; ExposeCPCostMult = RV.Talents.ImpExposeArmorCPMult * Talents.ImprovedExposeArmor; EnergyOnBelow35BS = RV.Talents.MurderousIntentEnergyRefund * Talents.MurderousIntent; EnergyRegenTimeOnDamagingCP = (RV.AR.Duration + (Talents.GlyphOfAdrenalineRush ? RV.Glyph.ARDurationBonus : 0f)) / RV.AR.CD * Talents.AdrenalineRush * RV.Talents.RestlessBladesPerCPCDReduc * Talents.RestlessBlades; EnergyOnOHAttack = RV.Talents.CombatPotencyProcChance * RV.Talents.CombatPotencyEnergyBonus * Talents.CombatPotency; EnergyOnRecupTick = RV.Talents.EnergeticRecoveryEnergyBonus * Talents.EnergeticRecovery; ChanceOnEnergyPerCPFinisher = RV.Talents.RelentlessStrikesPerCPChance[Talents.RelentlessStrikes]; CPOnFinisher = RV.Talents.RuthlessnessChance * Talents.Ruthlessness; RSBonus = (RV.RS.FinishMult + (Talents.GlyphOfRevealingStrike ? RV.Glyph.RSFinishMultBonus : 0f)) * Talents.RevealingStrike; ToTTCostReduction = (Talents.GlyphOfTricksOfTheTrade ? RV.Glyph.TotTCostReduc : 0f); VanishCDReduction = RV.Talents.ElusivenessVanishCDReduc * Talents.Elusiveness; #endregion }
public RogueRotationCalculator(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats ruptStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) { Char = character; Talents = character.RogueTalents; Stats = stats; CalcOpts = calcOpts; BossOpts = bossOpts; HasteBonus = hasteBonus; MainHandSpeed = mainHandSpeed; OffHandSpeed = offHandSpeed; MainHandSpeedNorm = mainHandSpeedNorm; OffHandSpeedNorm = offHandSpeedNorm; AvoidedWhiteMHAttacks = avoidedWhiteMHAttacks; AvoidedWhiteOHAttacks = avoidedWhiteOHAttacks; AvoidedMHAttacks = avoidedMHAttacks; AvoidedOHAttacks = avoidedOHAttacks; AvoidedFinisherAttacks = avoidedFinisherAttacks; AvoidedPoisonAttacks = avoidedPoisonAttacks; ChanceExtraCPPerHit = chanceExtraCPPerHit; T411 = stats.Rogue_T11_4P; MainHandStats = mainHandStats; OffHandStats = offHandStats; RuptStats = ruptStats; SnDStats = snDStats; ExposeStats = exposeStats; IPStats = iPStats; DPStats = dPStats; WPStats = wPStats; #region Talent/Mastery bonuses StepVanishResetCD = RV.Talents.PreparationCD * Talents.Preparation; ChanceOnEnergyOnGarrRuptTick = RV.Talents.VenomousWoundsProcChance * Talents.VenomousWounds; ChanceOnNoDPConsumeOnEnvenom = RV.Talents.MasterPoisonerNoDPConsumeChance * Talents.MasterPoisoner; ChanceOnSnDResetOnEvisEnv = RV.Talents.CutToTheChaseMult[Talents.CutToTheChase]; ChanceOnRuptResetonEvisCP = RV.Talents.SerratedBladesChance * Talents.SerratedBlades; ExposeCPCostMult = RV.Talents.ImpExposeArmorCPMult * Talents.ImprovedExposeArmor; EnergyOnBelow35BS = RV.Talents.MurderousIntentEnergyRefund * Talents.MurderousIntent; EnergyRegenTimeOnDamagingCP = (RV.AR.Duration + (Talents.GlyphOfAdrenalineRush ? RV.Glyph.ARDurationBonus : 0f)) / RV.AR.CD * Talents.AdrenalineRush * RV.Talents.RestlessBladesPerCPCDReduc * Talents.RestlessBlades; EnergyOnOHAttack = RV.Talents.CombatPotencyProcChance * RV.Talents.CombatPotencyEnergyBonus * Talents.CombatPotency; EnergyOnRecupTick = RV.Talents.EnergeticRecoveryEnergyBonus * Talents.EnergeticRecovery; ChanceOnEnergyPerCPFinisher = RV.Talents.RelentlessStrikesPerCPChance[Talents.RelentlessStrikes]; CPOnFinisher = RV.Talents.RuthlessnessChance * Talents.Ruthlessness; RSBonus = (RV.RS.FinishMult + (Talents.GlyphOfRevealingStrike ? RV.Glyph.RSFinishMultBonus : 0f)) * Talents.RevealingStrike; ToTTCostReduction = (Talents.GlyphOfTricksOfTheTrade ? RV.Glyph.TotTCostReduc : 0f); VanishCDReduction = RV.Talents.ElusivenessVanishCDReduc * Talents.Elusiveness; #endregion }
protected void Initialize(Character character, Base.StatsWarrior stats, CombatFactors cf, BossOptions bo, Skills.Ability ability, bool ismh, bool usespellhit, bool userangedhit, bool alwaysHit) { Char = character; StatS = stats; bossOpts = bo; combatFactors = cf; Abil = ability; isWhite = (Abil == null); isMH = ismh; useSpellHit = usespellhit; useRangedHit = userangedhit; // Start a calc Reset(alwaysHit); }
protected void Initialize(Character character, Base.StatsWarrior stats, CombatFactors cf, BossOptions bo, Skills.Ability ability, bool ismh, bool usespellhit, bool userangedhit, bool alwaysHit) { Char = character; StatS = stats; bossOpts = bo; combatFactors = cf; Abil = ability; isWhite = (Abil == null); isMH = ismh; useSpellHit = usespellhit; useRangedHit = userangedhit; // Start a calc Reset(alwaysHit); }
public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations) { // First things first, we need to ensure that we aren't using bad data CharacterCalculationsShadowPriest calc = new CharacterCalculationsShadowPriest(); if (character == null) { return(calc); } var stats = GetCharacterStats(character, additionalItem); var results = new Dictionary <string, string>(); BaseCharacterStatCalculations baseCalculations = new BaseCharacterStatCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents); baseCalculations.Calculate(results); stats.SpellPower += _calculationOptions.InnerFire ? 532 : 0; BurstCalculations burstCalculations = new BurstCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents); burstCalculations.Calculate(results); calc.BurstPoints = burstCalculations.Points; foreach (KeyValuePair <string, string> keyValuePair in results) { calc.AddResult(keyValuePair.Key, keyValuePair.Value); } CalculationOptionsShadowPriest calcOpts = character.CalculationOptions as CalculationOptionsShadowPriest; if (calcOpts == null) { return(calc); } BossOptions bossOpts = character.BossOptions; calc.BasicStats = stats; calc.LocalCharacter = character; Solver.solve(calc, calcOpts, bossOpts); return(calc); }
// Constructors public WhiteAttacks(Character character, StatsHunter stats, CombatFactors cf, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { Char = character; StatS = stats; Talents = Char.HunterTalents == null ? new HunterTalents() : Char.HunterTalents; combatFactors = cf; CalcOpts = calcOpts; BossOpts = bossOpts; RWAtkTable = new AttackTable(Char, StatS, combatFactors, calcOpts, false, false); FightDuration = BossOpts.BerserkTimer; Targets = BossOpts.Targets.Count; // Should update to better handle Target objects HSOverridesOverDur = 0f; CLOverridesOverDur = 0f; Steady_Freq = 0f; }
public StatsSpecialEffects(Character character, Stats stats, CalculationOptionsEnhance calcOpts, BossOptions bossOpts) { _character = character; _stats = stats; _cs = new CombatStats(_character, _stats, calcOpts, bossOpts); if (character.MainHandEnchant != null) { Stats.SpecialEffectEnumerator mhEffects = character.MainHandEnchant.Stats.SpecialEffects(); if (mhEffects.MoveNext()) { mainHandEnchant = mhEffects.Current; } } if (character.OffHandEnchant != null) { Stats.SpecialEffectEnumerator ohEffects = character.OffHandEnchant.Stats.SpecialEffects(); if (ohEffects.MoveNext()) { offHandEnchant = ohEffects.Current; } } }
// Constructors public WhiteAttacks(Character character, StatsHunter stats, CombatFactors cf, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { Char = character; StatS = stats; Talents = Char.HunterTalents == null ? new HunterTalents() : Char.HunterTalents; combatFactors = cf; CalcOpts = calcOpts; BossOpts = bossOpts; RWAtkTable = new AttackTable(Char, StatS, combatFactors, calcOpts, false, false); FightDuration = BossOpts.BerserkTimer; Targets = BossOpts.Targets.Count; // Should update to better handle Target objects HSOverridesOverDur = 0f; CLOverridesOverDur = 0f; Steady_Freq = 0f; }
public CombatFactors(Character character, Base.StatsWarrior stats, CalculationOptionsDPSWarr calcOpts, BossOptions bossOpts) { Char = character; MH = Char == null || Char.MainHand == null ? new Knuckles() : Char.MainHand.Item; OH = Char == null || Char.OffHand == null || (Char.WarriorTalents.TitansGrip == 0 && Char.WarriorTalents.SingleMindedFury == 0) ? null : Char.OffHand.Item; Talents = Char == null || Char.WarriorTalents == null ? new WarriorTalents() : Char.WarriorTalents; CalcOpts = (calcOpts == null ? new CalculationOptionsDPSWarr() : calcOpts); BossOpts = (bossOpts == null ? new BossOptions() : bossOpts); StatS = stats; CritProcs = new WeightedStat[] { new WeightedStat() { Chance = 1f, Value = 0f } }; InvalidateCache(); // Optimizations //SetCvalues(); #if DEBUG //ConstructionCounts["CombatFactors"]++; #endif }
public DefendModel(Character character, Stats stats, CalculationOptionsProtPaladin calcOpts, bool useHolyShield) #endif { Character = character; Stats = stats; CalcOpts = calcOpts; #if (RAWR3) BossOpts = bossOpts; #endif #if (RAWR3) ParryModel = new ParryModel(character, stats, calcOpts, bossOpts); DefendTable = new DefendTable(character, stats, calcOpts, bossOpts, useHolyShield); #else ParryModel = new ParryModel(character, stats, calcOpts); DefendTable = new DefendTable(character, stats, calcOpts, useHolyShield); #endif Calculate(); }
// Constructors public WhiteAttacks(Character character, Stats stats, CombatFactors cf, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { Char = character; StatS = stats; Talents = Char.HunterTalents == null ? new HunterTalents() : Char.HunterTalents; combatFactors = cf; CalcOpts = calcOpts; BossOpts = bossOpts; RWAtkTable = new AttackTable(Char, StatS, combatFactors, calcOpts, false, false); #if RAWR3 || SILVERLIGHT FightDuration = BossOpts.BerserkTimer; #else FightDuration = CalcOpts.Duration; #endif // Targets = 1f; HSOverridesOverDur = 0f; CLOverridesOverDur = 0f; Steady_Freq = 0f; }
public RogueRotationCalculatorAss(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, float chanceExtraCPPerMutiHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats backstabStats, RogueAbilityStats mutiStats, RogueAbilityStats ruptStats, RogueAbilityStats envenomStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats, RogueAbilityStats venomousWoundsStats) : base (character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm, offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats, offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats) { BackstabStats = backstabStats; MutiStats = mutiStats; EnvenomStats = envenomStats; VenomousWoundsStats = venomousWoundsStats; ChanceExtraCPPerMutiHit = chanceExtraCPPerMutiHit; BonusMaxEnergy = (Char.MainHand == null || Char.OffHand == null ? false : Char.MainHand.Type == ItemType.Dagger && Char.MainHand.Type == ItemType.Dagger) ? RV.Mastery.AssassinsResolveEnergyBonus : 0f; BonusStealthEnergyRegen = RV.Talents.OverkillRegenMult * Talents.Overkill; DPFrequencyBonus = RV.Mastery.ImprovedPoisonsDPBonus; IPFrequencyMultiplier = RV.Mastery.ImprovedPoisonsIPFreqMult; #region Probability tables float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f); _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c); _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); c = ChanceExtraCPPerMutiHit; h = (1f - c); _averageMutiCP[1] = 1 * (f) + 2 * (nf * h) + 3 * (nf * c); _averageMutiCP[2] = 2 * (nf * h) + 3 * (f * h + nf * c) + 4 * (f * c); _averageMutiCP[3] = 3 * (f * h + nf * c) + 4 * (f * c + nf * h * h) + 5 * (nf * h * c); _averageMutiCP[4] = 4 * (f * c + nf * h * h) + 5 * (f * h * h + 2 * nf * h * c) + 5 * (f * h * c + nf * c * c); _averageMutiCP[5] = 5 * (f * h * h + 2 * nf * h * c) + 6 * (2 * f * h * c + nf * h * h * h + nf * c * c) + 7 * (f * c * c + nf * h * h * c); _avgMutiNeeded[1] = 1 * (nf); _avgMutiNeeded[2] = 1 * (f * h + f * c + nf * h + nf * c); _avgMutiNeeded[3] = 1 * (f * h + f * c + nf * c) + 2 * (nf * h); _avgMutiNeeded[4] = 1 * (f * c) + 2 * (f * h * h + f * h * c + nf * h * h + nf * h * c + nf * c); _avgMutiNeeded[5] = 2 * (f + nf * h * c + nf * c) + 3 * (nf * h * h); #endregion }
public RogueRotationCalculatorAss(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, float chanceExtraCPPerMutiHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats backstabStats, RogueAbilityStats mutiStats, RogueAbilityStats ruptStats, RogueAbilityStats envenomStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats, RogueAbilityStats venomousWoundsStats) : base(character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm, offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats, offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats) { BackstabStats = backstabStats; MutiStats = mutiStats; EnvenomStats = envenomStats; VenomousWoundsStats = venomousWoundsStats; ChanceExtraCPPerMutiHit = chanceExtraCPPerMutiHit; BonusMaxEnergy = (Char.MainHand == null || Char.OffHand == null ? false : Char.MainHand.Type == ItemType.Dagger && Char.MainHand.Type == ItemType.Dagger) ? RV.Mastery.AssassinsResolveEnergyBonus : 0f; BonusStealthEnergyRegen = RV.Talents.OverkillRegenMult * Talents.Overkill; DPFrequencyBonus = RV.Mastery.ImprovedPoisonsDPBonus; IPFrequencyMultiplier = RV.Mastery.ImprovedPoisonsIPFreqMult; #region Probability tables float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f); _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c); _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); c = ChanceExtraCPPerMutiHit; h = (1f - c); _averageMutiCP[1] = 1 * (f) + 2 * (nf * h) + 3 * (nf * c); _averageMutiCP[2] = 2 * (nf * h) + 3 * (f * h + nf * c) + 4 * (f * c); _averageMutiCP[3] = 3 * (f * h + nf * c) + 4 * (f * c + nf * h * h) + 5 * (nf * h * c); _averageMutiCP[4] = 4 * (f * c + nf * h * h) + 5 * (f * h * h + 2 * nf * h * c) + 5 * (f * h * c + nf * c * c); _averageMutiCP[5] = 5 * (f * h * h + 2 * nf * h * c) + 6 * (2 * f * h * c + nf * h * h * h + nf * c * c) + 7 * (f * c * c + nf * h * h * c); _avgMutiNeeded[1] = 1 * (nf); _avgMutiNeeded[2] = 1 * (f * h + f * c + nf * h + nf * c); _avgMutiNeeded[3] = 1 * (f * h + f * c + nf * c) + 2 * (nf * h); _avgMutiNeeded[4] = 1 * (f * c) + 2 * (f * h * h + f * h * c + nf * h * h + nf * h * c + nf * c); _avgMutiNeeded[5] = 2 * (f + nf * h * c + nf * c) + 3 * (nf * h * h); #endregion }
public AbilityModel(Character character, Base.StatsPaladin stats, Ability ability, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Character = character; Stats = stats; Ability = ability; CalcOpts = calcOpts; BossOpts = bossOpts; Talents = Character.PaladinTalents; AttackTable = new AttackTable(character, stats, ability, CalcOpts, BossOpts); if (!Lookup.IsSpell(Ability)) { ArmorReduction = Lookup.EffectiveTargetArmorReduction(Stats.ArmorPenetration, BossOpts.Armor, BossOpts.Level); } Name = Lookup.Name(Ability); CalculateDamage(); CalculateThreat(); }
public RogueRotationCalculatorSubt(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm, float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks, float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats backstabStats, RogueAbilityStats hemoStats, RogueAbilityStats ruptStats, RogueAbilityStats evisStats, RogueAbilityStats snDStats, RogueAbilityStats recupStats, RogueAbilityStats exposeStats, RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) : base(character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm, offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats, offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats) { BackstabStats = backstabStats; HemoStats = hemoStats; EvisStats = evisStats; RecupStats = recupStats; #region Probability tables float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f); _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c); _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c); _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c); _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c); _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c); #endregion }
public CombatFactors(Character character, StatsHunter stats, CalculationOptionsHunter calcOpts, BossOptions bossOpts) { Char = character; if (Char != null) { if (Char.Ranged != null) RW = Char.Ranged.Item; else RW = new Knuckles(); if (Char.HunterTalents != null) Talents = Char.HunterTalents; else Talents = new HunterTalents(); } CalcOpts = (calcOpts == null ? new CalculationOptionsHunter() : calcOpts); BossOpts = (bossOpts == null ? new BossOptions() : bossOpts); StatS = stats; InvalidateCache(); // Optimizations //Set_c_values(); }
private void GetSpecialEffectsStats_Child(Dictionary<Trigger, float> triggerIntervals, Dictionary<Trigger, float> triggerChances, float weaponSpeed, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts, StatsPaladin stats, ref StatsPaladin statsSpecialEffects) { StatsPaladin effectsToAdd = new StatsPaladin(); float uptime = 0f; foreach (SpecialEffect effect in stats.SpecialEffects()) { switch (effect.Trigger) { case Trigger.Use: { if (calcOpts.TrinketOnUseHandling != "Ignore") { if (calcOpts.TrinketOnUseHandling == "Active") { statsSpecialEffects.Accumulate(effect.Stats); } else { effectsToAdd.Clear(); effectsToAdd.Accumulate(effect.GetAverageStats(0f, 1f, weaponSpeed, bossOpts.BerserkTimer)); // Health on Use Effects are never averaged. effectsToAdd.BattlemasterHealthProc = 0.0f; effectsToAdd.Health = 0.0f; statsSpecialEffects.Accumulate(effectsToAdd); } // Recursive Effects foreach (SpecialEffect childEffect in effect.Stats.SpecialEffects()) { effectsToAdd.Clear(); GetSpecialEffectsStats_Child(triggerIntervals, triggerChances, weaponSpeed, calcOpts, bossOpts, stats, ref effectsToAdd); statsSpecialEffects.Accumulate(effectsToAdd, effect.GetAverageUptime(0.0f, 1.0f)); } } break; } case Trigger.MeleeAttack: case Trigger.PhysicalAttack: case Trigger.MeleeHit: case Trigger.PhysicalHit: case Trigger.MeleeCrit: case Trigger.PhysicalCrit: case Trigger.DamageSpellCrit: case Trigger.DamageSpellHit: case Trigger.DoTTick: case Trigger.DamageOrHealingDone: // Need to add Self-Heals case Trigger.DamageDone: case Trigger.JudgementHit: case Trigger.SpellCast: case Trigger.DamageSpellCast: case Trigger.DamageTaken: case Trigger.DamageTakenPhysical: case Trigger.DamageTakenPutsMeBelow35PercHealth: case Trigger.DivineProtection: if (effect.MaxStack != 1) { uptime = effect.GetAverageStackSize(triggerIntervals[effect.Trigger], triggerChances[effect.Trigger], weaponSpeed, bossOpts.BerserkTimer); } else { uptime = effect.GetAverageUptime(triggerIntervals[effect.Trigger], triggerChances[effect.Trigger], weaponSpeed, bossOpts.BerserkTimer); } statsSpecialEffects.Accumulate(effect.Stats, uptime); break; } } }
private Stats GetSpecialEffectStats(Character character, StatsPaladin stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { StatsPaladin statsSpecialEffects = new StatsPaladin(); float weaponSpeed = 1.0f; if (character.MainHand != null) weaponSpeed = character.MainHand.Speed; AttackModel am = new AttackModel(character, stats, calcOpts, bossOpts); Dictionary<Trigger, float> triggerIntervals; Dictionary<Trigger, float> triggerChances; CreateTriggers(am, character, stats, calcOpts, bossOpts, out triggerIntervals, out triggerChances); GetSpecialEffectsStats_Child(triggerIntervals, triggerChances, weaponSpeed, calcOpts, bossOpts, stats, ref statsSpecialEffects); // Darkmoon card greatness & Paragon procs // These should always increase strength, which is going to be the Paladin's top stat outside of stamina statsSpecialEffects.Strength += statsSpecialEffects.HighestStat + statsSpecialEffects.Paragon; statsSpecialEffects.HighestStat = 0; statsSpecialEffects.Paragon = 0; if (statsSpecialEffects.HighestSecondaryStat > 0) { float paragon = statsSpecialEffects.HighestSecondaryStat; statsSpecialEffects.HighestSecondaryStat = 0; if ((statsSpecialEffects.CritRating > statsSpecialEffects.HasteRating) && (statsSpecialEffects.CritRating > statsSpecialEffects.MasteryRating)) statsSpecialEffects.CritRating += paragon; else if ((statsSpecialEffects.HasteRating > statsSpecialEffects.CritRating) && (statsSpecialEffects.HasteRating > statsSpecialEffects.MasteryRating)) statsSpecialEffects.HasteRating += paragon; else statsSpecialEffects.MasteryRating += paragon; } // Base Stats statsSpecialEffects.Stamina = (float)Math.Floor(statsSpecialEffects.Stamina * (1.0f + stats.BonusStaminaMultiplier)); statsSpecialEffects.Strength = (float)Math.Floor(statsSpecialEffects.Strength * (1.0f + stats.BonusStrengthMultiplier)); statsSpecialEffects.Agility = (float)Math.Floor(statsSpecialEffects.Agility * (1.0f + stats.BonusAgilityMultiplier)); statsSpecialEffects.Health += (float)Math.Floor(statsSpecialEffects.Stamina * 10.0f) + (float)Math.Floor(statsSpecialEffects.BattlemasterHealthProc); // Defensive Stats statsSpecialEffects.Armor = (float)Math.Floor(statsSpecialEffects.Armor * (1f + stats.BaseArmorMultiplier + statsSpecialEffects.BaseArmorMultiplier)); statsSpecialEffects.BonusArmor = (float)Math.Floor(statsSpecialEffects.BonusArmor * (1.0f + stats.BonusArmorMultiplier + statsSpecialEffects.BonusArmorMultiplier)); statsSpecialEffects.Armor += statsSpecialEffects.BonusArmor; // Offensive Stats statsSpecialEffects.AttackPower += statsSpecialEffects.Strength * 2.0f; statsSpecialEffects.AttackPower = (float)Math.Floor(statsSpecialEffects.AttackPower * (1.0f + stats.BonusAttackPowerMultiplier + statsSpecialEffects.BonusAttackPowerMultiplier)); return statsSpecialEffects; }
private void CreateTriggers(AttackModel am, Character character, Stats stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts, out Dictionary<Trigger, float> triggerIntervals, out Dictionary<Trigger, float> triggerChances) { triggerIntervals = new Dictionary<Trigger, float>(); triggerChances = new Dictionary<Trigger, float>(); float intervalRotation = 9.0f; triggerIntervals[Trigger.MeleeAttack] = triggerIntervals[Trigger.PhysicalAttack] = triggerIntervals[Trigger.MeleeHit] = triggerIntervals[Trigger.PhysicalHit] = triggerIntervals[Trigger.MeleeCrit] = triggerIntervals[Trigger.PhysicalCrit] = Lookup.WeaponSpeed(character, stats); // + calcOptsTargetsHotR / intervalHotR; // 939 has 1 direct damage spell cast in 9 seconds. triggerIntervals[Trigger.DamageSpellCast] = triggerIntervals[Trigger.DamageSpellHit] = triggerIntervals[Trigger.DamageSpellCrit] = 1f / intervalRotation; triggerIntervals[Trigger.DoTTick] = 1f; triggerIntervals[Trigger.SpellCast] = 1.5f; // 939 assumes casting a spell every gcd. Changing auras, and casting a blessing is disregarded. triggerIntervals[Trigger.DamageOrHealingDone] = triggerIntervals[Trigger.DamageDone] = 1f / (1f / triggerIntervals[Trigger.MeleeHit] + 1f / triggerIntervals[Trigger.SpellCast]); triggerIntervals[Trigger.JudgementHit] = 9.0f; triggerIntervals[Trigger.DamageTakenPhysical] = triggerIntervals[Trigger.DamageTakenPutsMeBelow35PercHealth] = triggerIntervals[Trigger.DamageTaken] = (1.0f / am.AttackerHitsPerSecond); triggerIntervals[Trigger.DivineProtection] = 60f; // temporary combat table, used for the implementation of special effects. float hitBonusPhysical = StatConversion.GetPhysicalHitFromRating(stats.HitRating, CharacterClass.Paladin) + stats.PhysicalHit; float hitBonusSpell = StatConversion.GetSpellHitFromRating(stats.HitRating, CharacterClass.Paladin) + stats.SpellHit; float expertiseBonus = StatConversion.GetDodgeParryReducFromExpertise(StatConversion.GetExpertiseFromRating(stats.ExpertiseRating, CharacterClass.Paladin) + stats.Expertise, CharacterClass.Paladin); float chanceMissSpell = Math.Max(0f, StatConversion.GetSpellMiss(character.Level - bossOpts.Level, false) - hitBonusSpell); float chanceMissPhysical = Math.Max(0f, StatConversion.WHITE_MISS_CHANCE_CAP[bossOpts.Level - character.Level] - hitBonusPhysical); float chanceMissDodge = Math.Max(0f, StatConversion.WHITE_DODGE_CHANCE_CAP[bossOpts.Level - character.Level] - expertiseBonus); float chanceMissParry = Math.Max(0f, StatConversion.WHITE_PARRY_CHANCE_CAP[bossOpts.Level - character.Level] - expertiseBonus); float chanceMissPhysicalAny = chanceMissPhysical + chanceMissDodge + chanceMissParry; triggerChances[Trigger.MeleeAttack] = triggerChances[Trigger.PhysicalAttack] = 1.0f; triggerChances[Trigger.MeleeHit] = triggerChances[Trigger.PhysicalHit] = 1.0f - chanceMissPhysicalAny; triggerChances[Trigger.MeleeCrit] = triggerChances[Trigger.PhysicalCrit] = Math.Min(1f, Math.Max(0, StatConversion.GetPhysicalCritFromRating(stats.CritRating, CharacterClass.Paladin) + StatConversion.GetPhysicalCritFromAgility(stats.Agility, CharacterClass.Paladin) + stats.PhysicalCrit + StatConversion.NPC_LEVEL_CRIT_MOD[bossOpts.Level - character.Level])); triggerChances[Trigger.DamageSpellCrit] = StatConversion.GetSpellCritFromRating(stats.CritRating, CharacterClass.Paladin) + StatConversion.GetSpellCritFromIntellect(stats.Intellect, CharacterClass.Paladin) + stats.SpellCrit + stats.SpellCritOnTarget - (0.006f * (bossOpts.Level - character.Level) + (bossOpts.Level == 88 ? 0.03f : 0.0f)); triggerChances[Trigger.DamageSpellHit] = 1.0f - chanceMissSpell; triggerChances[Trigger.DoTTick] = triggerChances[Trigger.DamageSpellHit] * (character.PaladinTalents.GlyphOfConsecration ? 1.0f : 16.0f / 18.0f); // 16 ticks in 18 seconds of 9696 rotation. cba with cons. glyph atm. triggerChances[Trigger.DamageOrHealingDone] = triggerChances[Trigger.DamageDone] = (triggerIntervals[Trigger.MeleeHit] * triggerChances[Trigger.PhysicalHit] + triggerIntervals[Trigger.SpellCast] * triggerChances[Trigger.DamageSpellHit]) / (triggerIntervals[Trigger.MeleeHit] + triggerIntervals[Trigger.SpellCast]); triggerChances[Trigger.JudgementHit] = triggerChances[Trigger.SpellCast] = triggerChances[Trigger.DamageSpellCast] = triggerChances[Trigger.DamageTaken] = triggerChances[Trigger.DamageTakenPhysical] = 1f; triggerChances[Trigger.DamageTakenPutsMeBelow35PercHealth] = 0.35f; triggerChances[Trigger.DivineProtection] = 1f; }
public StatsPaladin GetCharacterStats(Character character, Item additionalItem, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { PaladinTalents talents = character.PaladinTalents; Stats statsBase = BaseStats.GetBaseStats(character.Level, CharacterClass.Paladin, character.Race); statsBase.Expertise += BaseStats.GetRacialExpertise(character, ItemSlot.MainHand); Stats statsBuffs = GetBuffsStats(character, calcOpts); Stats statsItems = GetItemStats(character, additionalItem, calcOpts); Stats statsTalents = new Stats() { BaseArmorMultiplier = talents.Toughness * 0.1f / 3f, BonusStaminaMultiplier = 0.15f // Touched by the Light }; Stats statsGearEnchantsBuffs = new Stats(); statsGearEnchantsBuffs.Accumulate(statsItems); statsGearEnchantsBuffs.Accumulate(statsBuffs); StatsPaladin statsTotal = new StatsPaladin(); statsTotal.Accumulate(statsBase); statsTotal.Accumulate(statsItems); statsTotal.Accumulate(statsBuffs); statsTotal.Accumulate(statsTalents); int T11count; character.SetBonusCount.TryGetValue("Reinforced Sapphirium Battlearmor", out T11count); if (T11count >= 2) { statsTotal.BonusDamageMultiplierCrusaderStrike = 0.05f; } if (T11count >= 4) { statsTotal.BonusDurationMultiplierGuardianOfAncientKings = 0.50f; } int T12count; character.SetBonusCount.TryGetValue("Battlearmor of Immolation", out T12count); if (T12count >= 2) { statsTotal.BonusDamageShieldofRighteous = 0.20f; } if (T12count >= 4) { statsBuffs.AddSpecialEffect(new SpecialEffect(Trigger.DivineProtection, new Stats() { Parry = 0.12f, }, 10f, 60f)); } statsTotal.Intellect = (float)Math.Floor(statsBase.Intellect * (1.0f + statsTalents.BonusIntellectMultiplier)); statsTotal.Intellect += (float)Math.Floor((statsItems.Intellect + statsBuffs.Intellect) * (1.0f + statsTalents.BonusIntellectMultiplier)); statsTotal.BaseAgility = statsBase.Agility + statsTalents.Agility; statsTotal.Stamina = (float)Math.Floor(statsBase.Stamina + statsItems.Stamina + statsBuffs.Stamina); statsTotal.Stamina = (float)Math.Floor(statsTotal.Stamina * (1.0f + statsTotal.BonusStaminaMultiplier) * (Character.ValidateArmorSpecialization(character, ItemType.Plate) ? 1.05f : 1f)); // Plate specialization statsTotal.Strength = (float)Math.Floor((statsBase.Strength + statsTalents.Strength) * (1.0f + statsTotal.BonusStrengthMultiplier)); statsTotal.Strength += (float)Math.Floor((statsItems.Strength + statsBuffs.Strength) * (1.0f + statsTotal.BonusStrengthMultiplier)); statsTotal.ParryRating += (float)Math.Floor((statsTotal.Strength - statsBase.Strength) * 0.27f); statsTotal.SpellPower = statsTotal.Strength * 0.60f; // Touched by the Light statsTotal.SpellPower += statsTotal.Intellect - 10f; if (talents.GlyphOfSealOfTruth && calcOpts.SealChoice == "Seal of Truth") { statsTotal.Expertise += 10.0f; } statsTotal.Agility = (float)Math.Floor((statsBase.Agility + statsTalents.Agility) * (1.0f + statsTotal.BonusAgilityMultiplier)); statsTotal.Agility += (float)Math.Floor((statsItems.Agility + statsBuffs.Agility) * (1.0f + statsTotal.BonusAgilityMultiplier)); statsTotal.Health += StatConversion.GetHealthFromStamina(statsTotal.Stamina, CharacterClass.Paladin); statsTotal.Health *= 1f + statsTotal.BonusHealthMultiplier; statsTotal.Mana += StatConversion.GetManaFromIntellect(statsTotal.Intellect, CharacterClass.Paladin) * (1f + statsTotal.BonusManaMultiplier); // Armor statsTotal.Armor = (float)Math.Floor(statsTotal.Armor * (1f + statsTotal.BaseArmorMultiplier)); statsTotal.Armor += (float)Math.Floor(statsTotal.BonusArmor * (1f + statsTotal.BonusArmorMultiplier)); statsTotal.AttackPower += ((statsTotal.Strength - 10f) * 2f); statsTotal.AttackPower = (float)Math.Floor(statsTotal.AttackPower * (1f + statsTotal.BonusAttackPowerMultiplier)); statsTotal.NatureResistance += statsTotal.NatureResistanceBuff; statsTotal.FireResistance += statsTotal.FireResistanceBuff; statsTotal.FrostResistance += statsTotal.FrostResistanceBuff; statsTotal.ShadowResistance += statsTotal.ShadowResistanceBuff; statsTotal.ArcaneResistance += statsTotal.ArcaneResistanceBuff; //statsTotal.BonusCritDamageMultiplier = statsBase.BonusCritDamageMultiplier + statsGearEnchantsBuffs.BonusCritDamageMultiplier; statsTotal.CritRating = statsBase.CritRating + statsGearEnchantsBuffs.CritRating; statsTotal.ExpertiseRating = statsBase.ExpertiseRating + statsGearEnchantsBuffs.ExpertiseRating; statsTotal.HasteRating = statsBase.HasteRating + statsGearEnchantsBuffs.HasteRating; statsTotal.HitRating = statsBase.HitRating + statsGearEnchantsBuffs.HitRating; statsTotal.MasteryRating = statsBase.MasteryRating + statsGearEnchantsBuffs.MasteryRating; statsTotal.BlockRating = statsBase.BlockRating + statsGearEnchantsBuffs.BlockRating; statsTotal.WeaponDamage += Lookup.WeaponDamage(character, statsTotal.AttackPower, false); //statsTotal.ExposeWeakness = statsBase.ExposeWeakness + statsGearEnchantsBuffs.ExposeWeakness; // Nerfed in 3.1 // Calculate Procs and Special Effects statsTotal.Accumulate(GetSpecialEffectStats(character, statsTotal, calcOpts, bossOpts)); return statsTotal; }
public override Stats GetCharacterStats(Character character, Item additionalItem) { CalculationOptionsProtPaladin calcOpts = character.CalculationOptions as CalculationOptionsProtPaladin; if (calcOpts == null) calcOpts = new CalculationOptionsProtPaladin(); BossOptions bossOpts = character.BossOptions; if (bossOpts == null) bossOpts = new BossOptions(); // Make sure there is at least one attack in the list. // If there's not, add a Default Melee Attack for processing if (bossOpts.Attacks.Count < 1) { character.IsLoading = true; bossOpts.DamagingTargs = true; bossOpts.Attacks.Add(BossHandler.ADefaultMeleeAttack); character.IsLoading = false; } // Make sure there is a default melee attack // If the above processed, there will be one so this won't have to process // If the above didn't process and there isn't one, add one now if (bossOpts.DefaultMeleeAttack == null) { character.IsLoading = true; bossOpts.DamagingTargs = true; bossOpts.Attacks.Add(BossHandler.ADefaultMeleeAttack); character.IsLoading = false; } return GetCharacterStats(character, additionalItem, calcOpts, bossOpts); }
// Original code from CalculationsBear, thanks Astrylian! private float CapSurvival(float survivalScore, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { double survivalCap = (double)(bossOpts.DefaultMeleeAttack.DamagePerHit * calcOpts.HitsToSurvive) / 1000d; double survivalRaw = (double)survivalScore / 1000d; //Implement Survival Soft Cap if (survivalRaw <= survivalCap) { return survivalScore; } else { double x = survivalRaw; double cap = survivalCap; double fourToTheNegativeFourThirds = Math.Pow(4d, -4d / 3d); double topLeft = Math.Pow(((x - cap) / cap) + fourToTheNegativeFourThirds, 1d / 4d); double topRight = Math.Pow(fourToTheNegativeFourThirds, 1d / 4d); double fracTop = topLeft - topRight; double fraction = fracTop / 2d; double y = (cap * fraction + cap); return 1000f * (float)y; } }
public AttackTable(Character character, Stats stats, Ability ability, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Initialize(character, stats, ability, calcOpts, bossOpts); }
// The following are special contructors used by optimizer, they assume the cached items/enchant are always used, and the underlying gemmedid/enchantid are never used public Character(string name, string realm, CharacterRegion region, CharacterRace race, BossOptions boss, ItemInstance head, ItemInstance neck, ItemInstance shoulders, ItemInstance back, ItemInstance chest, ItemInstance shirt, ItemInstance tabard, ItemInstance wrist, ItemInstance hands, ItemInstance waist, ItemInstance legs, ItemInstance feet, ItemInstance finger1, ItemInstance finger2, ItemInstance trinket1, ItemInstance trinket2, ItemInstance mainHand, ItemInstance offHand, ItemInstance ranged, ItemInstance projectile, ItemInstance projectileBag, List<Buff> activeBuffs, string model) { Initialize(); IsLoading = true; _name = name; _realm = realm; _region = region; _race = race; _item[(int)CharacterSlot.Head] = head; _item[(int)CharacterSlot.Neck] = neck; _item[(int)CharacterSlot.Shoulders] = shoulders; _item[(int)CharacterSlot.Back] = back; _item[(int)CharacterSlot.Chest] = chest; _item[(int)CharacterSlot.Shirt] = shirt; _item[(int)CharacterSlot.Tabard] = tabard; _item[(int)CharacterSlot.Wrist] = wrist; _item[(int)CharacterSlot.Hands] = hands; _item[(int)CharacterSlot.Waist] = waist; _item[(int)CharacterSlot.Legs] = legs; _item[(int)CharacterSlot.Feet] = feet; _item[(int)CharacterSlot.Finger1] = finger1; _item[(int)CharacterSlot.Finger2] = finger2; _item[(int)CharacterSlot.Trinket1] = trinket1; _item[(int)CharacterSlot.Trinket2] = trinket2; _item[(int)CharacterSlot.MainHand] = mainHand; _item[(int)CharacterSlot.OffHand] = offHand; _item[(int)CharacterSlot.Ranged] = ranged; _item[(int)CharacterSlot.Projectile] = projectile; _item[(int)CharacterSlot.ProjectileBag] = projectileBag; IsLoading = false; ActiveBuffs = new List<Buff>(activeBuffs); SetFaction(); CurrentModel = model; RecalculateSetBonuses(); BossOptions = boss.Clone(); }
/// <summary>This overload is used from optimizer and is optimized for performance, do not modify</summary> public Character(Character baseCharacter, object[] items, int count) { IsLoading = true; _name = baseCharacter._name; _realm = baseCharacter._realm; _region = baseCharacter._region; _race = baseCharacter._race; _currentModel = baseCharacter._currentModel; _calculationOptions = baseCharacter._calculationOptions; _primaryProfession = baseCharacter._primaryProfession; _secondaryProfession = baseCharacter._secondaryProfession; _class = baseCharacter._class; AssignAllTalentsFromCharacter(baseCharacter, false); CalculationToOptimize = baseCharacter.CalculationToOptimize; OptimizationRequirements = baseCharacter.OptimizationRequirements; _bossOptions = baseCharacter._bossOptions; _faction = baseCharacter._faction; _item = new ItemInstance[SlotCount]; Array.Copy(items, _item, count); IsLoading = false; ActiveBuffs = new List<Buff>(baseCharacter.ActiveBuffs); RecalculateSetBonuses(); }
public DefendTable(Character character, Stats stats, CalculationOptionsProtPaladin calcOpts, BossOptions bossOpts) { Initialize(character, stats, Ability.MeleeSwing, calcOpts, bossOpts); }
public Character(string name, string realm, CharacterRegion region, CharacterRace race, BossOptions boss, ItemInstance[] items, List<Buff> activeBuffs, string model) { Initialize(); IsLoading = true; _name = name; _realm = realm; _region = region; _race = race; Array.Copy(items, _item, items.Length); IsLoading = false; ActiveBuffs = new List<Buff>(activeBuffs); SetFaction(); CurrentModel = model; RecalculateSetBonuses(); BossOptions = boss.Clone(); }