Exemple #1
0
        public static async Task <bool> SingleTarget()
        {
            if (await S.Cast(SB.ThrowGlaive, C.CombatColor,
                             (!glaiveTossTimer.IsRunning && VS.VengeanceCombatThrowGlaive) ||
                             (glaiveTossTimer.IsRunning && VS.VengeanceCombatThrowGlaive && glaiveTossTimer.ElapsedMilliseconds > VS.VengeanceCombatThrowGlaiveSeconds), "ST - GlaiveTimer: " + glaiveTossTimer.ElapsedMilliseconds + "ms"))
            {
                glaiveTossTimer.Restart();
                return(true);
            }

            if (await S.Cast(SB.SoulCleave, C.CombatColor,
                             C.CurrentPower >= VS.VengeanceCombatSoulCleavePain &&
                             ((T.VengeanceSpiritBomb && CurrentTarget.HasAura(SB.AuraFrailty) && CurrentTarget.GetAuraById(SB.AuraFrailty).TimeLeft.TotalMilliseconds > 5000) ||
                              (!T.VengeanceSpiritBomb)) &&
                             CurrentTarget.IsWithinMeleeRangeOf(Me),
                             string.Format($"ST: CP:{C.CurrentPower}>={VS.VengeanceCombatSoulCleavePain}")
                             ))
            {
                return(true);
            }

            // cast infernal strike in melee only if we have max chargets
            // it is off of the gcd, so can be cast any time.
            if (await S.CastGroundOnMe(SB.InfernalStrike, C.CombatColor,
                                       VS.VengeanceCombatInfernalStrikeSingleTarget &&
                                       Me.IsWithinMeleeRangeOf(CurrentTarget) &&
                                       S.MaxChargesAvailable(SB.InfernalStrike) &&
                                       CurrentTarget.IsWithinMeleeRangeOf(Me),
                                       "ST Max Charges Available"))
            {
                return(true);
            }


            if (await S.Cast(SB.ImmolationAura, C.CombatColor, CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.FelBlade, C.CombatColor, T.VengeanceFelblade, "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.FelEruption, C.CombatColor, T.VengeanceFelEruption && CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.SpiritBomb, C.CombatColor, T.VengeanceSpiritBomb && Me.HasAura(SB.AuraSoulFragments) && (!CurrentTarget.HasAura(SB.AuraFrailty) || (CurrentTarget.HasAura(SB.AuraFrailty) && CurrentTarget.GetAuraById(SB.AuraFrailty).TimeLeft.TotalMilliseconds <= 3000)), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.Shear, C.CombatColor, T.VengeanceBladeTurning && Me.HasAura(SB.AuraBladeTurning) && CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.Fracture, C.CombatColor, T.VengeanceFracture && CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.SigilOfFlameTalented, C.CombatColor, T.VengeanceConcentratedSigils && CurrentTarget.IsWithinMeleeRangeOf(Me), "ST - Contentrated Sigils"))
            {
                return(true);
            }
            if (await S.CastGround(SB.SigilOfFlame, C.CombatColor, !T.VengeanceConcentratedSigils && !Me.IsWithinMeleeRangeOf(CurrentTarget), "ST - Not in Melee; Cast on target"))
            {
                return(true);
            }
            if (await S.CastGroundOnMe(SB.SigilOfFlame, C.CombatColor, !T.VengeanceConcentratedSigils && Me.IsWithinMeleeRangeOf(CurrentTarget), "ST - In Melee; Cast on self"))
            {
                return(true);
            }
            if (await S.Cast(SB.Shear, C.CombatColor, CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }



            return(true);
        }
Exemple #2
0
        public static async Task <bool> MultipleTarget()
        {
            if (await S.Cast(SB.ThrowGlaive, C.CombatColor,
                             !glaiveTossTimer.IsRunning && VS.VengeanceCombatThrowGlaive ||
                             (glaiveTossTimer.IsRunning && VS.VengeanceCombatThrowGlaive && glaiveTossTimer.ElapsedMilliseconds > VS.VengeanceCombatThrowGlaiveSeconds), "AoE - GlaiveTimer: " + glaiveTossTimer.ElapsedMilliseconds + "ms"))
            {
                glaiveTossTimer.Restart();
                return(true);
            }

            if (await S.Cast(SB.SoulCleave, C.CombatColor,
                             C.CurrentPower >= VS.VengeanceCombatSoulCleavePain,
                             string.Format($"AoE: CP:{C.CurrentPower}>={VS.VengeanceCombatSoulCleavePain}")
                             ))
            {
                return(true);
            }

            if (await S.CastGroundOnMe(SB.InfernalStrike, C.CombatColor,
                                       VS.VengeanceCombatInfernalStrikeAoE &&
                                       Me.IsWithinMeleeRangeOf(CurrentTarget) &&
                                       S.MaxChargesAvailable(SB.InfernalStrike),
                                       "AoE Max Charges Available"))
            {
                return(true);
            }

            if (await S.Cast(SB.FelDevastation, C.CombatColor, T.VengeanceFelDevastation, addLog: "AoE Fel Devastation"))
            {
                return(true);
            }
            if (await S.Cast(SB.ImmolationAura, C.CombatColor, addLog: "AoE"))
            {
                return(true);
            }
            if (await S.Cast(SB.SpiritBomb, C.CombatColor, T.VengeanceSpiritBomb && !CurrentTarget.HasAura(SB.AuraFrailty), "AoE"))
            {
                return(true);
            }
            if (await S.Cast(SB.FelBlade, C.CombatColor, T.VengeanceFelblade, "AoE"))
            {
                return(true);
            }
            if (await S.Cast(SB.Shear, C.CombatColor, T.VengeanceBladeTurning && Me.HasAura(SB.AuraBladeTurning) && CurrentTarget.IsWithinMeleeRangeOf(Me), "ST"))
            {
                return(true);
            }
            if (await S.Cast(SB.SigilOfFlameTalented, C.CombatColor, CurrentTarget.IsWithinMeleeRangeOf(Me) && T.VengeanceConcentratedSigils, "AoE - Contentrated Sigils"))
            {
                return(true);
            }
            if (await S.CastGround(SB.SigilOfFlame, C.CombatColor, !T.VengeanceConcentratedSigils && !Me.IsWithinMeleeRangeOf(CurrentTarget), "AoE - Not in Melee; Cast on target"))
            {
                return(true);
            }
            if (await S.CastGroundOnMe(SB.SigilOfFlame, C.CombatColor, !T.VengeanceConcentratedSigils && Me.IsWithinMeleeRangeOf(CurrentTarget), "AoE - In Melee; Cast on self"))
            {
                return(true);
            }
            if (await S.CastGround(SB.SigilOfChains, C.CombatColor, T.VengeanceSigilOfChains && VS.VengeanceCombatSigilOfChains && CurrentTarget.NearbyTargets()?.Count() >= VS.VengeanceCombatSigilOfChainsUnits))
            {
                if (await S.Cast(SB.FieryBrand, C.CombatColor, T.VengeanceBurningAlive, addLog: "AoE has Burning Alive Talent"))
                {
                    return(true);
                }
            }
            if (await S.Cast(SB.Shear, C.CombatColor, addLog: "AoE"))
            {
                return(true);
            }

            return(false);
        }
Exemple #3
0
        /// <summary>
        /// this is the opening rotation for single target. Once activated, it will continue to use these abilities until it has been fulfilled and then reset again.
        /// </summary>
        /// <returns></returns>
        public static async Task <bool> OpeningRotationSingleTarget()
        {
            //L.debugLog("UseRotation:" + (!useOpenRotation).ToString() + ", FelRushOnPull:" + (HS.HavocFelRushOnPull).ToString() + ", UseMetaCd:" + UseMetamorphosisCD(false).ToString() + ", FRMaxCharges:" + S.MaxChargesAvailable(SB.FelRush).ToString() + ", FRChargesNoFelMastery:" + (S.GetSpellChargeInfo(SB.FelRush).ChargesLeft >= 1 && !T.HavocFelMastery).ToString() + ", MetaCD:" + (!S.OnCooldown(SB.MetamorphosisSpell)).ToString());

            if ((useOpenRotation && (openRotationTimeout.ElapsedMilliseconds > 5000 && openingRotationSkillsUsed != OpenerSteps.FuryBuilder) || openRotationTimeout.ElapsedMilliseconds > 10000 && openingRotationSkillsUsed == OpenerSteps.FuryBuilder))
            {
                useOpenRotation           = false;
                openingRotationSkillsUsed = OpenerSteps.None;
                L.infoLog("Opener Rotation timed out.", C.InfoColor);
                return(false);
            }



            if (!useOpenRotation && (HS.HavocFelRushOnPull && UseMetamorphosisCD(false) &&
                                     (S.MaxChargesAvailable(SB.FelRush) ||                                      // make sure we have max charges saved up.
                                      (S.GetSpellChargeInfo(SB.FelRush).ChargesLeft >= 1 && !T.HavocFelMastery) // also check for 1 charge if no fel mastery.
                                     ) &&
                                     !S.OnCooldown(SB.MetamorphosisSpell) &&                                    // make sure metamorphosis is not on cd.
                                     CurrentTarget.Distance < 25))                                              // make sure we aren't too far away.
            {
                L.infoLog("Ready for Havoc Single Target Opener: " + openingRotationSkillsUsed, C.HavocOpenerColor);
                useOpenRotation           = true;
                openingRotationSkillsUsed = OpenerSteps.InitialFelRush;
                openRotationTimeout.Restart();
                return(true);
            }

            if (useOpenRotation)
            {
                //L.debugLog(openingRotationSkillsUsed.ToString());
                if (openingRotationSkillsUsed == OpenerSteps.InitialFelRush)
                {
                    // we haven't used an ability yet for opener, let's fel rush
                    if (await S.GCD(SB.FelRush, C.HavocOpenerColor, CurrentTarget.Distance <= 15 && Me.IsSafelyFacing(CurrentTarget), "Opener 1"))
                    {
                        openingRotationSkillsUsed = OpenerSteps.FelMasteryFelRush;
                        openRotationTimeout.Restart();
                        return(true);
                    }
                }

                if (openingRotationSkillsUsed == OpenerSteps.FelMasteryFelRush)
                {
                    //L.debugLog("Made it to FelMasteryFelRush : HasFelMastery:" + T.HavocFelMastery + ", HasMomentum: " + Me.HasAnyAura("Momentum"));
                    if (await S.GCD(SB.FelRush, C.HavocOpenerColor,
                                    T.HavocFelMastery && NeedMomentum(), "Opener 2 - Fel Mastery 2nd Fel Rush"))
                    {
                        openingRotationSkillsUsed = OpenerSteps.FuryBuilder;
                        openRotationTimeout.Restart();
                        return(true);
                    }
                    // if we don't have fel mastery talent, just bump the rotation.
                    // really should have it, but just in case someone thinks they know better ;]
                    if (!T.HavocFelMastery)
                    {
                        L.combatLog("Skipping Opener 2; No Fel Mastery talent", C.HavocOpenerColor);
                        openingRotationSkillsUsed = OpenerSteps.FuryBuilder;
                        openRotationTimeout.Restart();
                        return(true);
                    }
                }

                if (openingRotationSkillsUsed == OpenerSteps.FuryBuilder)
                {
                    if (await S.GCD(SB.DemonsBite, C.HavocOpenerColor, !T.HavocDemonBlades, "Opener 3, building Fury"))
                    {
                        return(true);
                    }


                    // if we have demon blades, we want to passively get <=20 missing fury.
                    if (T.HavocDemonBlades && C.MissingPower > 20)
                    {
                        L.combatLog("Opener 3, passively building fury", C.HavocOpenerColor);
                    }
                    if (C.MissingPower <= 20)
                    {
                        openingRotationSkillsUsed = OpenerSteps.FaceAwayFromTarget;
                        return(true);
                    }
                }

                // make sure we have max charges saved up.
                if (openingRotationSkillsUsed == OpenerSteps.FaceAwayFromTarget)
                {
                    // we don't want to be safely facing
                    if (Me.IsSafelyFacing(CurrentTarget.Location))
                    {
                        await FaceAwayFromTarget();

                        openingRotationSkillsUsed = OpenerSteps.VengefulRetreat;
                    }
                }
                //if (openingRotationSkillsUsed == OpenerSteps.VengefulRetreat && !Me.IsSafelyFacing(CurrentTarget))
                //{
                //    // wait until you are safely facing.
                //    return true;
                //}

                if (openingRotationSkillsUsed == OpenerSteps.VengefulRetreat && !Me.IsSafelyFacing(CurrentTarget.Location))
                {
                    if (await S.Cast(SB.VengefulRetreat, C.HavocOpenerColor, T.HavocPrepared || T.HavocMomentum, "Opener 4"))
                    {
                        openingRotationSkillsUsed = OpenerSteps.Nemesis;
                        return(true);
                    }
                }

                if (openingRotationSkillsUsed == OpenerSteps.Nemesis)
                {
                    if (await S.Cast(SB.Nemesis, C.HavocOpenerColor, T.HavocNemesis, "Opener 5"))
                    {
                        openingRotationSkillsUsed = OpenerSteps.Metamorphosis;
                        return(true);
                    }
                    if (!T.HavocNemesis)
                    {
                        L.combatLog("Skip Opener 5 - Nemesis.  No talent selected", C.HavocOpenerColor);
                        openingRotationSkillsUsed = OpenerSteps.Metamorphosis;
                        return(true);
                    }
                }
                if (openingRotationSkillsUsed == OpenerSteps.Metamorphosis)
                {
                    // if in melee, need to cast on yourself.  If in ranged, cast on target.
                    if (await S.CastGround(SB.MetamorphosisSpell, C.HavocOpenerColor, !Me.IsWithinMeleeRangeOf(CurrentTarget), "Opener 6 - Cast on Target"))
                    {
                        openingRotationSkillsUsed = OpenerSteps.ChaosBlades;
                        return(true);
                    }
                    if (await S.CastGroundOnMe(SB.MetamorphosisSpell, C.HavocOpenerColor, Me.IsWithinMeleeRangeOf(CurrentTarget), "Opener 6 - Cast on Me"))
                    {
                        // if we did metamorphosis then that's our last ability we can now continue single target
                        openingRotationSkillsUsed = OpenerSteps.ChaosBlades;
                        return(true);
                    }
                }
                if (openingRotationSkillsUsed == OpenerSteps.ChaosBlades)
                {
                    if (await S.Cast(SB.ChaosBlades, C.HavocOpenerColor, T.HavocChaosBlades, "Opener 7"))
                    {
                        useOpenRotation           = false;
                        openingRotationSkillsUsed = OpenerSteps.None;
                    }
                    if (!T.HavocChaosBlades)
                    {
                        useOpenRotation           = false;
                        openingRotationSkillsUsed = OpenerSteps.None;
                        return(true);
                    }
                }
                await S.Cast(SB.DemonsBite, C.HavocOpenerColor, !T.HavocDemonBlades && Me.IsWithinMeleeRangeOf(CurrentTarget), "Opener, Filler");
            }
            return(useOpenRotation);
        }