Ejemplo n.º 1
0
        public static async Task <bool> GapCloser()
        {
            if (await S.Cast(SB.ThrowGlaive, C.CombatColor,
                             !Me.IsWithinMeleeRangeOf(CurrentTarget) &&
                             CurrentTarget.Distance <= 30, "GapCloser - GlaiveTimer: " + glaiveTossTimer.ElapsedMilliseconds + "ms"))
            {
                glaiveTossTimer.Restart();
                return(true);
            }
            if (await S.Cast(SB.FelBlade, C.CombatColor,
                             T.VengeanceFelblade &&
                             !CurrentTarget.IsWithinMeleeRangeOf(Me) &&
                             CurrentTarget.MeleeDistance() <= 15,
                             "ST Gap Closer"))
            {
                return(true);
            }

            if (await S.CastGround(SB.InfernalStrike, C.CombatColor,
                                   VS.VengeanceCombatInfernalStrikeGapCloser &&
                                   !CurrentTarget.IsWithinMeleeRangeOf(Me) &&
                                   CurrentTarget.MeleeDistance() <= infernalStrikeRange &&
                                   (S.GetSpellChargeInfo(SB.InfernalStrike).ChargesLeft > 0),
                                   "ST Gap Closer"))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public static async Task <bool> Pull()
        {
            if (CurrentTarget.IsValidCombatUnit())
            {
                await C.EnsureMeleeRange(CurrentTarget);

                await C.FaceTarget(CurrentTarget);

                if (await S.Cast(SB.ThrowGlaive, C.CombatColor, CurrentTarget.Distance <= 30, "Pull - GlaiveTimer: " + glaiveTossTimer.ElapsedMilliseconds + "ms"))
                {
                    glaiveTossTimer.Restart(); return(true);
                }

                // use to engage if you have the charges to do so
                if (await S.CastGround(SB.InfernalStrike, C.CombatColor,
                                       VS.VengeanceCombatInfernalStrikePull &&
                                       CurrentTarget.Distance <= infernalStrikeRange &&
                                       !CurrentTarget.IsWithinMeleeRangeOf(Me) &&
                                       !VS.VengeancePreferPullWithFelblade
                                       , "Pull"))
                {
                    return(true);
                }

                // need to change this to check to see if we want to pull with Fel Blade or Infernal Strike (or which we prefer)
                if (await S.Cast(SB.FelBlade, C.CombatColor, T.VengeanceFelblade &&
                                 !CurrentTarget.IsWithinMeleeRangeOf(Me) &&
                                 CurrentTarget.Distance <= 15, "Pull"))
                {
                    return(true);
                }

                // now use in case felblade was on cd, but don't check prefer
                if (await S.CastGround(SB.InfernalStrike, C.CombatColor,
                                       CurrentTarget.Distance <= infernalStrikeRange &&
                                       VS.VengeanceCombatInfernalStrikePull &&
                                       !CurrentTarget.IsWithinMeleeRangeOf(Me)
                                       , "Pull"))
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public static async Task <bool> ActiveMitigation()
        {
            WoWUnit stunTarget = GetStunTarget(CurrentTarget, 8f);

            if (await S.CastGround(SB.SigilOfMisery, stunTarget, C.DefensiveColor, stunTarget != null &&
                                   VS.VengeanceAllowStunSigilOfMisery))
            {
                return(true);
            }

            #region Defensive Hotkey
            // demon spikes if force defensive is on
            if (await S.Cast(SB.DemonSpikes, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveDemonSpikes &&
                             !Me.HasAura(SB.AuraDemonSpikes),
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveDemonSpikes:{HKS.HotkeyVengeanceDefensiveDemonSpikes.ToString()}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.MetamorphosisSpell, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveMetamorphosis,
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveMetamorphosis:{HKS.HotkeyVengeanceDefensiveMetamorphosis.ToString()}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.SoulBarrier, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveSoulBarrier,
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveSoulBarrier:{HKS.HotkeyVengeanceDefensiveSoulBarrier.ToString()}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.FelDevastation, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveFelDevastation,
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveFelDevastation:{HKS.HotkeyVengeanceDefensiveFelDevastation.ToString()}")))
            {
                if (Me.HasTankWarglaivesEquipped())
                {
                    if (await S.Cast(SB.SoulCarver, C.DefensiveColor,
                                     HK.VengeanceDefensiveOn &&
                                     HKS.HotkeyVengeanceDefensiveSoulCarver &&
                                     Me.IsWithinMeleeRangeOf(CurrentTarget) && // must be within melee range or won't work.
                                     Me.IsSafelyFacing(CurrentTarget.Location),
                                     string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveSoulCarver:{HKS.HotkeyVengeanceDefensiveSoulCarver.ToString()}")
                                     ))
                    {
                        return(true);
                    }
                }
            }

            if (await S.Cast(SB.SoulCleave, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveSoulCleave &&
                             CurrentTarget.IsWithinMeleeRangeOf(Me),
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveSoulCleave:{HKS.HotkeyVengeanceDefensiveSoulCleave.ToString()}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.EmpowerWards, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveEmpowerWards,
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveEmpowerWards:{HKS.HotkeyVengeanceDefensiveEmpowerWards.ToString()}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.FieryBrand, C.DefensiveColor,
                             HK.VengeanceDefensiveOn &&
                             HKS.HotkeyVengeanceDefensiveEmpowerWards,
                             string.Format($"AM: HK.VengeanceDefensiveOn:{HK.VengeanceDefensiveOn.ToString()}, HotkeyVengeanceDefensiveEmpowerWards:{HKS.HotkeyVengeanceDefensiveEmpowerWards.ToString()}")))
            {
                return(true);
            }

            #endregion

            if (await S.Cast(SB.MetamorphosisSpell, C.DefensiveColor,
                             VS.VengeanceAllowMetamorphosis &&
                             Me.HealthPercent <= VS.VengeanceMetamorphosisHp,
                             string.Format($"AM: HP:{Me.HealthPercent.ToString("F0")}<={VS.VengeanceMetamorphosisHp}")
                             ))
            {
                return(true);
            }

            // cast Demon Spikes if we have
            if (await S.Cast(SB.DemonSpikes, C.DefensiveColor,
                             VS.VengeanceAllowDemonSpikes &&
                             C.CurrentPower >= 20 &&
                             Me.HealthPercent <= VS.VengeanceDemonSpikesHp &&
                             !Me.HasAura(SB.AuraDemonSpikes) &&
                             U.activeEnemies(Me.Location, 8f).Any(),
                             string.Format($"AM: HP:{Me.HealthPercent.ToString("F0")}<={VS.VengeanceDemonSpikesHp}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.SoulBarrier, C.DefensiveColor, T.VengeanceSoulBarrier &&
                             VS.VengeanceAllowSoulBarrier &&
                             Me.HealthPercent <= VS.VengeanceSoulBarrierHp,
                             string.Format($"AM: HP:{Me.HealthPercent.ToString("F0")}<={VS.VengeanceSoulBarrierHp}")
                             ))
            {
                return(true);
            }

            // make sure we have tank weapons equipped (for lower level stuff)

            if (await S.Cast(SB.SoulCarver, C.DefensiveColor,
                             VS.VengeanceAllowSoulCarver &&
                             Me.HealthPercent <= VS.VengeanceSoulCarverHp,
                             string.Format($"AM: HP:{Me.HealthPercent.ToString("F0")}<={VS.VengeanceSoulCarverHp}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.SoulCleave, C.DefensiveColor,
                             VS.VengeanceAllowSoulCleave &&
                             C.CurrentPower >= 30 &&
                             Me.CurrentHealth <= VS.VengeanceSoulCleaveHp &&
                             CurrentTarget.IsWithinMeleeRangeOf(Me),
                             string.Format($"AM: HP:{Me.HealthPercent.ToString("F0")}<={VS.VengeanceSoulCleaveHp}")
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.EmpowerWards, C.DefensiveColor,
                             VS.VengeanceEmpowerWards &&
                             U.activeEnemies(Me.Location, 50f).Where(u =>
                                                                     u.IsTargetingMeOrPet && u.IsCasting)
                             .Any()
                             ))
            {
                return(true);
            }

            if (await S.Cast(SB.FieryBrand, C.DefensiveColor,
                             VS.VengeanceAllowFieryBrand &&
                             Me.HealthPercent <= VS.VengeanceFieryBrandHp))
            {
                return(true);
            }

            return(false);
        }