public void DoAA(int bonusAP = 0, bool didWf = false) { ResultType res = Player.WhiteAttackEnemy(Player.Sim.Boss, MH); int minDmg = (int)Math.Round(Weapon.DamageMin + Weapon.Speed * (Player.AP + bonusAP) / 14); int maxDmg = (int)Math.Round(Weapon.DamageMax + Weapon.Speed * (Player.AP + bonusAP) / 14); double baseDamage = Player.Sim.random.Next(minDmg, maxDmg + 1) * Entity.ArmorMitigation(Player.Sim.Boss.Armor) * (Player.DualWielding() ? (MH ? 1 : 0.5 * (1 + (0.05 * Player.GetTalentPoints("DWS")))) : (1 + 0.01 * Player.GetTalentPoints("2HS"))); int rageDamage = (int)Math.Round(baseDamage * Player.Sim.RageDamageMod(res)); int damage = (int)Math.Round(baseDamage * Player.Sim.DamageMod(res)); //Player.Ressource += (int)Math.Round(Simulation.RageGained(damage, Weapon.Speed, res, MH, Player.Level)); Player.Ressource += (int)Math.Round(Simulation.RageGained(damage, Player.Level)); RegisterDamage(new ActionResult(res, damage)); if (Player.GetTalentPoints("DW") > 0) { DeepWounds.CheckProc(Player, res, Player.GetTalentPoints("DW")); } if (Player.GetTalentPoints("Flurry") > 0) { Flurry.CheckProc(Player, res, Player.GetTalentPoints("Flurry"), didWf); } if (Player.GetTalentPoints("UW") > 0) { UnbridledWrath.CheckProc(Player, res, Player.GetTalentPoints("UW")); } if ((MH && Player.MH.Enchantment.Name == "Crusader") || (!MH && Player.OH.Enchantment.Name == "Crusader")) { Crusader.CheckProc(Player, res, Weapon.Speed); } if (MH && !didWf && Player.WindfuryTotem) { if (res == ResultType.Hit || res == ResultType.Crit || res == ResultType.Block || res == ResultType.Glancing) { if (Player.Sim.random.NextDouble() < 0.2) { if (Program.logFight) { Program.Log(string.Format("{0:N2} : Windfury procs", Player.Sim.CurrentTime)); } DoAA(315, true); } } } }
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); }
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); } }