Exemplo 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));
        }
Exemplo n.º 2
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));
        }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
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);
            }
        }