예제 #1
0
파일: Skill.cs 프로젝트: rakot/rawr
 public Exorcism(Character character, StatsRetri stats, float chanceToProc) : base("Exorcism", character, stats, AbilityType.Spell, DamageType.Holy)
 {
     CT = new BaseSpellCombatTable(Character.BossOptions, _stats, Attacktype.Spell);
     CT.AbilityCritCorr = (Character.BossOptions.MobType == (int)MOB_TYPES.DEMON || Character.BossOptions.MobType == (int)MOB_TYPES.UNDEAD) ? 1f : 0;
     AbilityDamageMulitplier[Multiplier.Talents] = (1f + (Talents.TheArtOfWar > 0 ? PaladinConstants.THE_ART_OF_WAR : 0f) +
                                                    PaladinConstants.BLAZING_LIGHT * Talents.BlazingLight);
     AbilityDamageMulitplier[Multiplier.Glyphs] = (1f + (Talents.GlyphOfExorcism ? PaladinConstants.GLYPH_OF_EXORCISM : 0f));
     Cooldown      = AbilityHelper.WeaponSpeed(_character, _stats.PhysicalHaste) * (1f / (Talents.TheArtOfWar * PaladinConstants.EXO_PROC_CHANCE)) / chanceToProc;
     AbilityDamage = PaladinConstants.EXO_AVG_DMG +
                     PaladinConstants.EXO_COEFF * Math.Max(_stats.SpellPower, _stats.AttackPower);
 }
예제 #2
0
        public void CalcRotation()
        {
            float normGCD  = (1.5f + .1f);
            float lostTime = Impedance.GetTotalImpedancePercs(Character.BossOptions, PLAYER_ROLES.MeleeDPS, Stats.MovementSpeed, Stats.FearDurReduc, Stats.StunDurReduc,
                                                              Stats.SnareRootDurReduc, Stats.SilenceDurReduc);
            float fightlength          = Character.BossOptions.BerserkTimer;
            float fightLengthAttacking = fightlength * (1f - lostTime);
            float timeZeal             = (fightlength / PaladinConstants.ZEAL_COOLDOWN) * (PaladinConstants.ZEAL_DURATION + (Stats.T12_4P ? 15f : 0f));

            PartRotationInfo[] infos = new PartRotationInfo[] { new PartRotationInfo((fightLengthAttacking - timeZeal) * (1d - Character.BossOptions.Under20Perc), normGCD, false, false), //Above 20, no Zeal
                                                                new PartRotationInfo(timeZeal * (1d - Character.BossOptions.Under20Perc), normGCD, false, true),                           //Above 20, Zeal
                                                                new PartRotationInfo((fightLengthAttacking - timeZeal) * Character.BossOptions.Under20Perc, normGCD, true, false),         //Under 20, no Zeal
                                                                new PartRotationInfo(timeZeal * Character.BossOptions.Under20Perc, normGCD, true, true) };                                 //Under 20, Zeal

            Dictionary <DamageAbility, float> tmpCasts = new Dictionary <DamageAbility, float>();

            foreach (DamageAbility abil in allAb)
            {
                tmpCasts.Add(abil, 0f);
            }
            foreach (PartRotationInfo info in infos)
            {
                DoRotation(info.Time, info.NormGCD, info.Below20, info.Zeal, tmpCasts);
                foreach (DamageAbility abil in allAb)
                {
                    casts[abil]   += tmpCasts[abil];
                    tmpCasts[abil] = 0f;
                }
            }

            casts[DamageAbility.White]   = fightLengthAttacking / AbilityHelper.WeaponSpeed(Character, Stats.PhysicalHaste);
            casts[DamageAbility.GoaK]    = fightlength / PaladinConstants.GOAK_COOLDOWN;
            casts[DamageAbility.SoC]     = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            casts[DamageAbility.SealDot] = (float)(fightlength * SealDotProcPerSec(Seal));

            float inquptime = Math.Min((casts[DamageAbility.Inquisition] * skills[DamageAbility.Inquisition].Cooldown) / fightLengthAttacking, 1f);

            //UsagePerSecCalc
            foreach (KeyValuePair <DamageAbility, Skill> kvp in skills)
            {
                kvp.Value.UsagePerSec = casts[kvp.Key] / (double)fightlength;
                kvp.Value.InqUptime   = inquptime;
            }
            //Seals
            casts[DamageAbility.SoC] = casts[DamageAbility.Seal] = (float)(fightlength * SealProcsPerSec(Seal));
            skills[DamageAbility.SoC].UsagePerSec = skills[DamageAbility.Seal].UsagePerSec = casts[DamageAbility.Seal] / (double)fightlength;
        }
        // Add calculated values to the values dictionary.
        // These values are then available for display via the CharacterDisplayCalculationLabels
        // member defined in CalculationsRetribution.cs
        // While possible, there's little reason to add values to the dictionary that are not being
        // used by the CharacterDisplayCalculationLabels.
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            // Basic stats
            dictValues["Health"]          = string.Format("{0:N0}*Base Health: {1:N0}", CombatStats.Health, BasicStats.Health);
            dictValues["Mana"]            = string.Format("{0:N0}*Base Mana: {1:N0}", CombatStats.Mana, BasicStats.Mana);
            dictValues["Strength"]        = string.Format("{0:N0}*Base Strength: {1:N0}", CombatStats.Strength, BasicStats.Strength);
            dictValues["Agility"]         = string.Format("{0:N0}*Base Agility: {1:N0}", CombatStats.Agility, BasicStats.Agility);
            dictValues["Attack Power"]    = string.Format("{0:N0}*Base Attack Power: {1:N0}", CombatStats.AttackPower, BasicStats.AttackPower);
            dictValues["Melee Crit"]      = string.Format("{0:P}*{1:0} Crit Rating ({2:P})", CombatStats.PhysicalCrit, BasicStats.CritRating, StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Paladin));
            dictValues["Melee Haste"]     = string.Format("{0:P}*{1:0} Haste Rating ({2:P})", CombatStats.PhysicalHaste, BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Paladin));
            dictValues["Chance to Dodge"] = string.Format("{0:P}*{1:0} Expertise Rating ({2:F1})", ((BasePhysicalWhiteCombatTable)WhiteSkill.CT).ChanceToDodge, BasicStats.ExpertiseRating, BasicStats.Expertise);
            dictValues["Mastery"]         = string.Format("{0:F2}*{1:0} Mastery Rating ({2:F1})\n{3:P} Hand of Light", (8f + StatConversion.GetMasteryFromRating(CombatStats.MasteryRating, CharacterClass.Paladin)),
                                                          BasicStats.MasteryRating, StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Paladin),
                                                          (8f + StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Paladin)) * PaladinConstants.HOL_COEFF);
            dictValues["Miss Chance"]        = string.Format("{0:P}*{1:0} Hit Rating ({2:P})", WhiteSkill.CT.ChanceToMiss, BasicStats.HitRating, StatConversion.GetHitFromRating(BasicStats.HitRating, CharacterClass.Paladin));
            dictValues["Spell Power"]        = string.Format("{0:N0}*Base Spell Power: {1:N0}", CombatStats.SpellPower, BasicStats.SpellPower);
            dictValues["Spell Crit"]         = string.Format("{0:P}*{1:0} Crit Rating ({2:P})", CombatStats.SpellCrit, BasicStats.CritRating, StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Paladin));
            dictValues["Spell Haste"]        = string.Format("{0:P}*{1:0} Haste Rating ({2:P})", CombatStats.SpellHaste, BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Paladin));
            dictValues["Weapon Damage"]      = string.Format("{0:F}*Base Weapon Damage: {1:F}", AbilityHelper.WeaponDamage(Character, CombatStats.AttackPower), AbilityHelper.WeaponDamage(Character, BasicStats.AttackPower));
            dictValues["Weapon Damage @3.3"] = string.Format("{0:F}*Base Weapon Damage: {1:F}", AbilityHelper.WeaponDamage(Character, CombatStats.AttackPower, true), AbilityHelper.WeaponDamage(Character, BasicStats.AttackPower, true));
            dictValues["Attack Speed"]       = string.Format("{0:F2}*Base Attack Speed: {1:F2}", AbilityHelper.WeaponSpeed(Character, CombatStats.PhysicalHaste), AbilityHelper.WeaponSpeed(Character, BasicStats.PhysicalHaste));

            // DPS Breakdown
            dictValues["Total DPS"]        = OverallPoints.ToString("N0");
            dictValues["White"]            = string.Format("{0:N0}*" + WhiteSkill, WhiteSkill.GetDPS());
            dictValues["Seal"]             = string.Format("{0:N0}*" + SealSkill, SealSkill.GetDPS());
            dictValues["Seal (Dot)"]       = string.Format("{0:N0}*" + SealDotSkill, SealDotSkill.GetDPS());
            dictValues["Seal of Command"]  = string.Format("{0:N0}*" + CommandSkill, CommandSkill.GetDPS());
            dictValues["Crusader Strike"]  = string.Format("{0:N0}*" + CrusaderStrikeSkill, CrusaderStrikeSkill.GetDPS());
            dictValues["Templars Verdict"] = string.Format("{0:N0}*" + TemplarsVerdictSkill, TemplarsVerdictSkill.GetDPS());
            dictValues["Judgement"]        = string.Format("{0:N0}*" + JudgementSkill, JudgementSkill.GetDPS());
            dictValues["Consecration"]     = string.Format("{0:N0}*" + ConsecrationSkill, ConsecrationSkill.GetDPS());
            dictValues["Exorcism"]         = string.Format("{0:N0}*" + ExorcismSkill, ExorcismSkill.GetDPS());
            dictValues["Holy Wrath"]       = string.Format("{0:N0}*" + HolyWrathSkill, HolyWrathSkill.GetDPS());
            dictValues["Hammer of Wrath"]  = string.Format("{0:N0}*" + HammerOfWrathSkill, HammerOfWrathSkill.GetDPS());
            dictValues["GoaK"]             = string.Format("{0:N0}*" + GoakSkill, GoakSkill.GetDPS());
            dictValues["Other"]            = OtherDPS.ToString("N0");

            // Rotation Info:
            dictValues["Inqusition Uptime"]       = CrusaderStrikeSkill.InqUptime.ToString("P2");
            dictValues["Crusader Strike Usage"]   = (CrusaderStrikeSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Templar's Verdict Usage"] = (TemplarsVerdictSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Exorcism Usage"]          = (ExorcismSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Hammer of Wrath Usage"]   = (HammerOfWrathSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Judgement Usage"]         = (JudgementSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Holy Wrath Usage"]        = (HolyWrathSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Consecration Usage"]      = (ConsecrationSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["GoaK Usage"] = (GoakSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");

            return(dictValues);
        }