Esempio n. 1
0
        public override void DoAction()
        {
            base.DoAction();

            double winterChillBonusCrit = 0.1;

            ResultType res;
            double     mitigation = Simulation.MagicMitigation(Player.Sim.Boss.ResistChances[School]);

            if (mitigation == 0)
            {
                res = ResultType.Resist;
            }
            else
            {
                res = Player.SpellAttackEnemy(Player.Sim.Boss, true, 0.02 * Player.GetTalentPoints("EP"), winterChillBonusCrit);
            }

            CommonManaSpell();

            int minDmg = MIN_DMG;
            int maxDmg = MAX_DMG;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + (Player.SP * RATIO))
                                         * (Player.Sim.DamageMod(res, School) + (res == ResultType.Crit ? 0.1 * Player.GetTalentPoints("IS") : 0))
                                         * (1 + 0.02 * Player.GetTalentPoints("PI"))
                                         * mitigation
                                         * Player.DamageMod
                                         );

            RegisterDamage(new ActionResult(res, damage));
        }
Esempio n. 2
0
        public override void DoAction()
        {
            //Player.Life -= Randomer.Next(LIFE_MIN, LIFE_MAX + 1);
            Player.Mana += Randomer.Next(MANA_MIN, MANA_MAX + 1);

            LogAction();
        }
Esempio n. 3
0
        public override void DoAction()
        {
            base.DoAction();

            ResultType res;
            double     mitigation = Simulation.MagicMitigation(Player.Sim.Boss.ResistChances[School]);

            if (mitigation == 0)
            {
                res = ResultType.Resist;
            }
            else
            {
                res = Player.SpellAttackEnemy(Player.Sim.Boss, true, 0, 0.02 * Player.GetTalentPoints("Deva"));
            }

            CommonManaSpell();

            int minDmg = MIN_DMG;
            int maxDmg = MAX_DMG;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + (Player.SP * RATIO))
                                         * (Player.Sim.DamageMod(res, School) + (res == ResultType.Crit ? 0.5 * Player.GetTalentPoints("Ruin") : 0))
                                         * (1 + 0.02 * Player.GetTalentPoints("SM"))
                                         * (1 + 0.15 * Player.GetTalentPoints("DS"))
                                         * (Player.Sim.Boss.Effects.ContainsKey(ShadowVulnerability.NAME) ? ((ShadowVulnerability)Player.Sim.Boss.Effects[ShadowVulnerability.NAME]).Modifier : 1)
                                         * mitigation
                                         * Player.DamageMod
                                         );

            ShadowVulnerability.CheckProc(Player, this, res);
            RegisterDamage(new ActionResult(res, damage));
        }
Esempio n. 4
0
        public override void DoAction()
        {
            Player.applyAtNextAA = null;

            Weapon weapon = Player.MH;

            LockedUntil = Player.Sim.CurrentTime + weapon.Speed / Player.HasteMod;

            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = (int)Math.Round(weapon.DamageMin + weapon.Speed * (Player.AP + Player.nextAABonus) / 14);
            int maxDmg = (int)Math.Round(weapon.DamageMax + weapon.Speed * (Player.AP + Player.nextAABonus) / 14);

            Player.nextAABonus = 0;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + 157)
                                         * (Player.Sim.DamageMod(res) + (res == ResultType.Crit ? 0 + (0.1 * Player.GetTalentPoints("Impale")) : 0))
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * Player.DamageMod
                                         * (Player.DualWielding ? 1 : (1 + 0.01 * Player.GetTalentPoints("2HS"))));

            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= Cost / 2;
            }
            else
            {
                Player.Resource -= Cost;
            }

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 5
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int damage = (int)Math.Round(Randomer.Next(DMG_MIN, DMG_MAX + 1)
                                         * (Player.Sim.DamageMod(res) + (res == ResultType.Crit ? 0 + (0.1 * Player.GetTalentPoints("Impale")) : 0))
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * Player.DamageMod
                                         * (Player.DualWielding ? 1 : (1 + 0.01 * Player.GetTalentPoints("2HS")))
                                         );

            int threat = (int)Math.Round((damage + BONUS_THREAT) * Player.ThreatMod);

            CommonAction();
            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= Cost / 2;
            }
            else
            {
                Player.Resource -= Cost;
            }

            RegisterDamage(new ActionResult(res, damage, threat));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 6
0
        public override void StartEffect()
        {
            base.StartEffect();

            Player.Resource += Randomer.Next(45, 347);
            Player.BonusAttributes.SetValue(Attribute.Strength, Player.BonusAttributes.GetValue(Attribute.Strength) + 60);
            Player.BonusAttributes.SetValue(Attribute.AP, Player.BonusAttributes.GetValue(Attribute.AP) + 120);
        }
Esempio n. 7
0
        public override void DoAction()
        {
            //  Don't call base.DoAction, since that resets the swing timer
            Player.casting = null;

            LogAction();

            //  Find out whether it hits/crits
            ResultType res = Player.WhiteAttackEnemy(Player.Sim.Boss, true);

            int damage = 0;

            //  Can't glance, so treat glance as a hit
            if (res == ResultType.Glance)
            {
                res = ResultType.Hit;
            }

            if (res == ResultType.Hit || res == ResultType.Crit)
            {
                //  Calculate weapon dmg
                double weapMin = Player.MH.DamageMin + Player.MH.Speed * (Player.AP + Player.nextAABonus) / 14;
                double weapMax = Player.MH.DamageMax + Player.MH.Speed * (Player.AP + Player.nextAABonus) / 14;

                //  70% weapon damage
                int minDmg = (int)(0.7 * weapMin);
                int maxDmg = (int)(0.7 * weapMax);

                //  Include SotC bonus
                int holyBoost = 0;
                if (Player.Sim.Boss.Effects.ContainsKey(JudgementOfTheCrusaderDebuff.NAME))
                {
                    holyBoost = ((JudgementOfTheCrusaderDebuff)Player.Sim.Boss.Effects[JudgementOfTheCrusaderDebuff.NAME]).HolyDmgIncrease;
                }

                //  Include spell resistance
                double spellResist = 1.0;

                /*  I don't think this factors in, for some reason, or there is a different dmg *boost* missing to offset this
                 * spellResist = 1 - Simulation.AverageResistChance(315);
                 */

                damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + ((holyBoost + Player.SP) * RATIO))
                                         * Player.Sim.DamageMod(res, School.Physical) //  Crit modifier using Melee multiplier
                                         * (Player.Sim.Boss.Effects.ContainsKey(SpellVulnerability.NAME) ? ((SpellVulnerability)Player.Sim.Boss.Effects[SpellVulnerability.NAME]).Modifier : 1)
                                         * spellResist
                                         * Player.DamageMod
                                         );

                //  Turn on Vengeance
                if (Player.GetTalentPoints("Veng") > 0)
                {
                    Vengeance.CheckProc(Player, res);
                }
            }

            RegisterDamage(new ActionResult(res, damage));
        }
Esempio n. 8
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = (int)Math.Round(Player.Level * 0.85 + Player.AP / 14);
            int maxDmg = (int)Math.Round(Player.Level * 1.25 + Player.AP / 14);

            int damage = (int)Math.Round(
                (Randomer.Next(minDmg, maxDmg + 1) * 2.25 + 180)
                * (1 + Player.GetTalentPoints("NW") * 0.02)
                * Player.Sim.DamageMod(res)
                * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                * Player.DamageMod);

            CommonAction();

            int cost = Cost;

            if (Player.Effects.ContainsKey(ClearCasting.NAME))
            {
                cost = 0;
                Player.Effects[ClearCasting.NAME].StackRemove();
            }

            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= cost / 2;
            }
            else
            {
                Player.Resource -= cost;
            }

            if (res == ResultType.Hit || res == ResultType.Crit || res == ResultType.Block || res == ResultType.Glance)
            {
                Player.Combo++;
            }

            if (res == ResultType.Crit && Randomer.NextDouble() < 0.5 * Player.GetTalentPoints("BF"))
            {
                Player.Combo++;
            }

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 9
0
        public override void DoAction()
        {
            Weapon weapon = Player.MH;

            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = (int)Math.Round(weapon.DamageMin + Simulation.Normalization(weapon) * (Player.AP + Player.nextAABonus) / 14);
            int maxDmg = (int)Math.Round(weapon.DamageMax + Simulation.Normalization(weapon) * (Player.AP + Player.nextAABonus) / 14);

            Player.nextAABonus = 0;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + 68)
                                         * Player.Sim.DamageMod(res)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * (1 + (0.02 * Player.GetTalentPoints("Agg")))
                                         * (res == ResultType.Crit ? 1 + (0.06 * Player.GetTalentPoints("Letha")) : 1)
                                         * (1 + (0.01 * Player.GetTalentPoints("Murder")))
                                         * Player.DamageMod
                                         );

            CommonAction();

            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= Cost / 2;
            }
            else
            {
                Player.Resource -= Cost;
            }

            if (res == ResultType.Hit || res == ResultType.Crit || res == ResultType.Block || res == ResultType.Glance)
            {
                Player.Combo++;
            }

            /*
             * if (res == ResultType.Crit && Randomer.NextDouble() < 0.2 * Player.GetTalentPoints("SF"))
             * {
             *  Player.Combo++;
             * }
             */

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 10
0
        public override void DoAction()
        {
            //  Don't call base.DoAction, since that resets the swing timer
            Player.casting = null;

            LogAction();

            ResultType res = Player.SpellAttackEnemy(Player.Sim.Boss);

            int damage = 0;

            //  Can't glance
            if (res == ResultType.Hit || res == ResultType.Crit)
            {
                //  Include SotC bonus
                int holyBoost = 0;
                if (Player.Sim.Boss.Effects.ContainsKey(JudgementOfTheCrusaderDebuff.NAME))
                {
                    holyBoost = ((JudgementOfTheCrusaderDebuff)Player.Sim.Boss.Effects[JudgementOfTheCrusaderDebuff.NAME]).HolyDmgIncrease;
                }

                //  Include spell resistance
                double spellResist = 1.0;

                /*  I don't think this factors in, for some reason, or there is a different dmg *boost* missing to offset this
                 * spellResist = 1 - Simulation.AverageResistChance(315);
                 */

                //  Include talented SoR
                double impSoRMultiplier = 1.0 + 0.03 * Player.GetTalentPoints("ImpSoR");

                damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + ((holyBoost + Player.SP) * RATIO))
                                         * Player.Sim.DamageMod(ResultType.Hit, School.Light)
                                         * (Player.Sim.Boss.Effects.ContainsKey(SpellVulnerability.NAME) ? ((SpellVulnerability)Player.Sim.Boss.Effects[SpellVulnerability.NAME]).Modifier : 1)
                                         * spellResist
                                         * Player.DamageMod
                                         * impSoRMultiplier
                                         );

                //  Turn on Vengeance
                if (Player.GetTalentPoints("Veng") > 0)
                {
                    Vengeance.CheckProc(Player, res);
                }
            }

            RegisterDamage(new ActionResult(res, damage));
        }
        public override void DoAction()
        {
            //  Don't call base.DoAction, since that resets the swing timer
            Player.casting = null;

            LogAction();

            ResultType res = Player.MeleeSpellAttackEnemy(Player.Sim.Boss);

            int damage = 0;

            //  Can't glance
            if (res == ResultType.Hit || res == ResultType.Crit)
            {
                int minDmg = minDmg_Normal;
                int maxDmg = maxDmg_Normal;

                //  Double dmg if target is stunned
                if (Player.Sim.Boss.Effects.ContainsKey(HammerOfJusticeDebuff.NAME))
                {
                    minDmg = minDmg_Stunned;
                    maxDmg = maxDmg_Stunned;
                }

                //  Include SotC bonus
                int holyBoost = 0;
                if (Player.Sim.Boss.Effects.ContainsKey(JudgementOfTheCrusaderDebuff.NAME))
                {
                    holyBoost = ((JudgementOfTheCrusaderDebuff)Player.Sim.Boss.Effects[JudgementOfTheCrusaderDebuff.NAME]).HolyDmgIncrease;
                }

                damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + ((holyBoost + Player.SP) * RATIO))
                                         * Player.Sim.DamageMod(res, School.Physical) //  Crit modifier using Melee multiplier
                                         * (Player.Sim.Boss.Effects.ContainsKey(SpellVulnerability.NAME) ? ((SpellVulnerability)Player.Sim.Boss.Effects[SpellVulnerability.NAME]).Modifier : 1)
                                         * (1 - Simulation.AverageResistChance(315))
                                         * Player.DamageMod
                                         );

                //  Turn on Vengeance
                if (Player.GetTalentPoints("Veng") > 0)
                {
                    Vengeance.CheckProc(Player, res);
                }
            }

            RegisterDamage(new ActionResult(res, damage));
        }
Esempio n. 12
0
        public override void DoAction()
        {
            Player.applyAtNextAA = null;

            Weapon weapon = Player.MH;

            LockedUntil = Player.Sim.CurrentTime + weapon.Speed / Player.HasteMod;

            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = (int)Math.Round(Player.Level * 0.85 + 2.5 * (Player.AP + Player.nextAABonus) / 14);
            int maxDmg = (int)Math.Round(Player.Level * 1.25 + 2.5 * (Player.AP + Player.nextAABonus) / 14);

            Player.nextAABonus = 0;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + 101)
                                         * Player.Sim.DamageMod(res)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * (1 + Player.GetTalentPoints("SF") * 0.1)
                                         * Player.DamageMod
                                         );

            int threat = (int)Math.Round(damage * THREAT_MOD * Player.ThreatMod);

            int cost = Cost;

            if (Player.Effects.ContainsKey(ClearCasting.NAME))
            {
                cost = 0;
                Player.Effects[ClearCasting.NAME].StackRemove();
            }

            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= Cost / 2;
            }
            else
            {
                Player.Resource -= Cost;
            }

            RegisterDamage(new ActionResult(res, damage, threat));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 13
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = min[Player.Combo - 1];
            int maxDmg = max[Player.Combo - 1];

            int damage = (int)Math.Round(
                (Randomer.Next(minDmg, maxDmg + 1) + Player.AP * 0.15)
                * Player.Sim.DamageMod(res)
                * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                * Player.DamageMod
                * (1 + (0.02 * Player.GetTalentPoints("Agg")))
                * (1 + (0.05 * Player.GetTalentPoints("IE")))
                * (1 + (0.01 * Player.GetTalentPoints("Murder")))
                );

            CommonAction();
            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource -= Cost / 2;
            }
            else
            {
                Player.Resource -= Cost;

                if (Player.GetTalentPoints("RS") > 0 && Randomer.NextDouble() < 0.2 * Player.Combo)
                {
                    Player.Resource += 25;
                }

                Player.Combo = 0;

                if (Randomer.NextDouble() < 0.2 * Player.GetTalentPoints("Ruth"))
                {
                    Player.Combo++;
                }
            }

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 14
0
        public override void DoAction()
        {
            //  Don't call base.DoAction, since that resets the swing timer
            Player.casting = null;

            LogAction();

            ResultType res = Player.SpellAttackEnemy(Player.Sim.Boss, false, 0, 0);

            //  Can't glance
            if (res == ResultType.Hit || res == ResultType.Crit)
            {
                int minDmg = 504;
                int maxDmg = 556;

                //  Uses melee crit multiplier
                if (res == ResultType.Crit)
                {
                    minDmg *= 2;
                    maxDmg *= 2;
                }

                //  Include SotC bonus
                int holyBoost = 0;
                if (Player.Sim.Boss.Effects.ContainsKey(JudgementOfTheCrusaderDebuff.NAME))
                {
                    holyBoost = ((JudgementOfTheCrusaderDebuff)Player.Sim.Boss.Effects[JudgementOfTheCrusaderDebuff.NAME]).HolyDmgIncrease;
                }

                int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + ((holyBoost + Player.SP) * RATIO))
                                             * Player.Sim.DamageMod(res, School)
                                             * (Player.Sim.Boss.Effects.ContainsKey(SpellVulnerability.NAME) ? ((SpellVulnerability)Player.Sim.Boss.Effects[SpellVulnerability.NAME]).Modifier : 1)
                                             * Player.DamageMod
                                             );

                RegisterDamage(new ActionResult(res, damage));
            }

            //  Does trigger GCD after cast
            CommonManaSpell();
        }
Esempio n. 15
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            CommonAction();
            Player.Resource -= Cost;

            int minDmg = (int)Math.Round(Player.MH.DamageMin + Simulation.Normalization(Player.MH) * Player.AP / 14);
            int maxDmg = (int)Math.Round(Player.MH.DamageMax + Simulation.Normalization(Player.MH) * Player.AP / 14);

            int damage = (int)Math.Round(Randomer.Next(minDmg, maxDmg + 1)
                                         * Player.Sim.DamageMod(res)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * Player.DamageMod
                                         * (res == ResultType.Crit ? 1 + (0.1 * Player.GetTalentPoints("Impale")) : 1)
                                         * (Player.DualWielding ? 1 : (1 + 0.01 * Player.GetTalentPoints("2HS"))));

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 16
0
        public void DoAA(List <string> alreadyProc = null, bool extra = false)
        {
            ResultType res;

            if (Player.Class == Player.Classes.Warrior && !MH && Player.applyAtNextAA != null)
            {
                res = Player.YellowAttackEnemy(Player.Sim.Boss);
            }
            else
            {
                res = Player.WhiteAttackEnemy(Player.Sim.Boss, MH);
            }

            int minDmg = (int)Math.Round(
                Player.Form == Player.Forms.Cat ? Player.Level * 0.85 + (Player.AP + Player.nextAABonus) / 14 :
                Weapon.DamageMin + Weapon.Speed * (Player.AP + Player.nextAABonus) / 14);
            int maxDmg = (int)Math.Round(
                Player.Form == Player.Forms.Cat ? Player.Level * 1.25 + (Player.AP + Player.nextAABonus) / 14 :
                Weapon.DamageMax + Weapon.Speed * (Player.AP + Player.nextAABonus) / 14);

            Player.nextAABonus = 0;

            int damage = (int)Math.Round(Randomer.Next(minDmg, maxDmg + 1)
                                         * Player.Sim.DamageMod(res)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * (Player.Class == Player.Classes.Paladin ? (1 + 0.02 * Player.GetTalentPoints("2HWS")) : 1.0)
                                         * Player.DamageMod
                                         * (Player.DualWielding ? (MH ? 1 : 0.5 * (1 + (0.05 * Player.GetTalentPoints("DWS")))) : (1 + 0.01 * Player.GetTalentPoints("2HS")))
                                         );

            if (Player.Class == Player.Classes.Warrior || Player.Form == Player.Forms.Bear)
            {
                Player.Resource += (int)Math.Round(Simulation.RageGained(damage, Player.Level));
                //Player.Resource += (int)Math.Round(Simulation.RageGained2(damage, Weapon.Speed, MH, res == ResultType.Crit, Player.Level));
            }

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(MH, true, res, extra, alreadyProc);
        }
Esempio n. 17
0
        public override void DoAction()
        {
            base.DoAction();

            bool inner = Player.Effects.ContainsKey(InnerFocusBuff.NAME);

            ResultType res;
            double     mitigation = Simulation.MagicMitigation(Player.Sim.Boss.ResistChances[School]);

            if (mitigation == 0)
            {
                res = ResultType.Resist;
            }
            else
            {
                res = Player.SpellAttackEnemy(Player.Sim.Boss, true, 0.02 * Player.GetTalentPoints("SF"), inner ? 0.25 : 0);
            }

            CommonManaSpell(inner ? 0 : Cost);

            if (inner)
            {
                Player.Effects[InnerFocusBuff.NAME].EndEffect();
            }

            int minDmg = MIN_DMG;
            int maxDmg = MAX_DMG;

            int damage = (int)Math.Round((Randomer.Next(minDmg, maxDmg + 1) + (Player.SP * RATIO))
                                         * Player.Sim.DamageMod(res, School)
                                         * (1 + 0.02 * Player.GetTalentPoints("Darkness"))
                                         * 1.15 // shadow weaving
                                         * 1.15 // shadow form
                                         * mitigation
                                         * Player.DamageMod
                                         );

            RegisterDamage(new ActionResult(res, damage));
        }
Esempio n. 18
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int minDmg = min[Player.Combo - 1];
            int maxDmg = max[Player.Combo - 1];


            int cost = Cost;

            if (Player.Effects.ContainsKey(ClearCasting.NAME))
            {
                cost = 0;
                Player.Effects[ClearCasting.NAME].StackRemove();
            }

            int damage = (int)Math.Round(
                (Randomer.Next(minDmg, maxDmg + 1) + Player.AP * 0.15 + 2.5 * (Player.Resource - cost))
                * (1 + Player.GetTalentPoints("FA") * 0.03)
                * Player.Sim.DamageMod(res)
                * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                * Player.DamageMod);

            CommonAction();
            if (res == ResultType.Parry || res == ResultType.Dodge)
            {
                // TODO à vérifier
                Player.Resource = cost / 2;
            }
            else
            {
                Player.Resource = 0;
                Player.Combo    = 0;
            }

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Esempio n. 19
0
        public void DoAA(List <string> alreadyProc = null, bool extra = false)
        {
            double     mitigation = 1;
            ResultType res;

            if (Type == AAType.Wand)
            {
                mitigation = Simulation.MagicMitigation(Player.Sim.Boss.ResistChances[School]);
                if (mitigation == 0)
                {
                    res = ResultType.Resist;
                }
                res = Player.RangedMagicAttackEnemy(Player.Sim.Boss);
            }
            else if (Type == AAType.Ranged)
            {
                res = ResultType.Hit;
                // TODO
            }
            else if (Player.Class == Player.Classes.Warrior && !MH && Player.applyAtNextAA != null)
            {
                res = Player.YellowAttackEnemy(Player.Sim.Boss);
            }
            else
            {
                res = Player.WhiteAttackEnemy(Player.Sim.Boss, MH);
            }


            Player.nextAABonus = 0;
            int minDmg, maxDmg, damage;

            if (Type == AAType.Wand)
            {
                minDmg = (int)Math.Round(Weapon.DamageMin);
                maxDmg = (int)Math.Round(Weapon.DamageMax);
                damage = (int)Math.Round(Randomer.Next(minDmg, maxDmg + 1)
                                         * Player.Sim.DamageMod(res, Weapon.School, Player.Level, Player.Sim.Boss.Level, true)
                                         * Player.DamageMod
                                         * (1 + (Player.Class == Player.Classes.Priest ? 0.05 : 0.125) * Player.GetTalentPoints("Wand"))
                                         * mitigation
                                         * (School == School.Shadow && Player.Class == Player.Classes.Priest ? 1.15 * 1.15 : 1) // shadow weaving + form
                                         );
            }
            else
            {
                minDmg = (int)Math.Round(
                    Player.Form == Player.Forms.Cat ? Player.Level * 0.85 + (Player.AP + Player.nextAABonus) / 14 :
                    Weapon.DamageMin + Weapon.Speed * (Player.AP + Player.nextAABonus) / 14);
                maxDmg = (int)Math.Round(
                    Player.Form == Player.Forms.Cat ? Player.Level * 1.25 + (Player.AP + Player.nextAABonus) / 14 :
                    Weapon.DamageMax + Weapon.Speed * (Player.AP + Player.nextAABonus) / 14);

                damage = (int)Math.Round(Randomer.Next(minDmg, maxDmg + 1)
                                         * Player.Sim.DamageMod(res, Weapon.School, Player.Level, Player.Sim.Boss.Level, true)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * Player.DamageMod
                                         * (Player.DualWielding ? (MH ? 1 : 0.5 * (1 + (0.05 * Player.GetTalentPoints("DWS")))) : (1 + 0.01 * Player.GetTalentPoints("2HS")))
                                         * mitigation
                                         );
            }

            int threat = (int)Math.Round(damage * Player.ThreatMod);

            if (Player.Class == Player.Classes.Warrior || Player.Form == Player.Forms.Bear)
            {
                Player.Resource += (int)Math.Round(Simulation.RageGained(damage, Player.Level));
                //Player.Resource += (int)Math.Round(Simulation.RageGained2(damage, Weapon.Speed, MH, res == ResultType.Crit, Player.Level));
            }

            RegisterDamage(new ActionResult(res, damage, threat));

            if (Type == AAType.Melee)
            {
                Player.CheckOnHits(MH, true, res, extra, alreadyProc);
            }
        }
Esempio n. 20
0
        public override void DoAction()
        {
            Player.Mana += Randomer.Next(MIN, MAX + 1);

            LogAction();
        }