Exemple #1
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int damage = (int)Math.Round(0.45 * Player.AP
                                         * (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 * 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);
        }
Exemple #2
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);
        }
Exemple #3
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int damage = (int)Math.Round(DAMAGE
                                         * Player.Sim.DamageMod(res)
                                         * (1 + Player.GetTalentPoints("SF") * 0.1)
                                         * Simulation.ArmorMitigation(Player.Sim.Boss.Armor)
                                         * Player.DamageMod
                                         );

            int threat = (int)Math.Round(damage * THREAT_MOD * 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);
        }
Exemple #4
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);
        }
Exemple #5
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);
        }
Exemple #6
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);
        }
Exemple #7
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);
        }
Exemple #8
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);
        }
Exemple #9
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);
        }
Exemple #10
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);
        }
Exemple #11
0
        public override void DoAction()
        {
            ResultType res = Player.YellowAttackEnemy(Player.Sim.Boss);

            int reducedCost;

            switch (Player.GetTalentPoints("IE"))
            {
            case 2: reducedCost = 5; break;

            case 1: reducedCost = 2; break;

            default: reducedCost = 0; break;
            }

            int damage = (int)Math.Round((600 + (Player.Resource - (15 - reducedCost)) * 15)
                                         * (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"))));

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

            RegisterDamage(new ActionResult(res, damage));

            Player.CheckOnHits(true, false, res);
        }
Exemple #12
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);
            }
        }
Exemple #13
0
 public override string ToString()
 {
     return(string.Format("Level {0}, {1} Armor ({2:N2}% mitigation)\n", Level, Armor, (1 - Simulation.ArmorMitigation(Armor)) * 100));
 }
Exemple #14
0
 public override double GetExternalModifiers()
 {
     return(base.GetExternalModifiers() * Simulation.ArmorMitigation(Target.Armor));
 }
Exemple #15
0
        public override string ToString()
        {
            string magicResists = "";

            foreach (School s in MagicResist.Keys)
            {
                if (s != School.Physical && s != School.Magical)
                {
                    magicResists += "[" + s.ToString() + ":" + MagicResist[s] + "]";
                }
            }
            return(string.Format("Level {0}, {1} Armor ({2:N2}% mitigation), Magic Resists : {3}\n", Level, Armor, (1 - Simulation.ArmorMitigation(Armor)) * 100, magicResists));
        }