public static Composite ElementalCombat()
        {
            return(new PrioritySelector(
                       Common.CreateInterruptBehavior(),
                       new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.IsBoss(),
                                     new PrioritySelector(
                                         Spell.Cast("Elemental Mastery"),
                                         Spell.Cast("Ascendance", ret => Me.CurrentTarget.CachedGetAuraTimeLeft("Flame Shock") > 18 && Me.CachedHasAura("Elemental Mastery")),
                                         Spell.Cast("Fire Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > (TalentManager.HasGlyph("Fire Elemental Totem") ? 30 : 60)),
                                         Spell.Cast("Earth Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > 60 && Spell.GetSpellCooldown("Fire Elemental Totem").TotalSeconds > 61),
                                         Spell.Cast("Stormlash Totem", ret => PartyBuff.WeHaveBloodlust))),

                       Spell.WaitForCast(),
                       Spell.Cast("Thunderstorm", ret => Me.ManaPercent < 60 && TalentManager.HasGlyph("Thunderstorm")),

                       new Decorator(ret => Unit.UnfriendlyUnitsNearTargetFacing(10).Count() >= 4,
                                     AOE()),

                       Spell.Cast("Spiritwalker's Grace", ret => Me.IsMoving && !SpellManager.Spells["Lava Burst"].Cooldown),
                       Spell.Cast("Flame Shock", on => FlameShockTar, ret => FlameShockTar.CachedHasAuraDown("Flame Shock", 1, true, 3)),
                       Spell.Cast("Lava Burst"),
                       Spell.Cast("Elemental Blast"),
                       Spell.Cast("Earth Shock", ret => Me.CachedHasAura("Lightning Shield", Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 2 ? 7 : 6)),
                       Spell.Cast("Searing Totem", ret => !Totems.ExistInRange(Me.CurrentTarget.Location, WoWTotem.Searing)),
                       Spell.Cast(Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 1 ? "Chain Lightning" : "Lightning Bolt")));
        }
Beispiel #2
0
    void Awake()
    {
        Instance = this;

        Totems.Add(ServerPlayerId, new List <Totem>());
        Totems.Add(ClientPlayerId, new List <Totem>());
    }
        public void RemoveSummonedEntourage()
        {
            if (Minions != null)
            {
                foreach (var minion in Minions.Where(minion => minion != null))
                {
                    DeleteMinion(minion);
                }
            }

            if (Totems != null)
            {
                foreach (var totem in Totems.Where(totem => totem != null))
                {
                    DeleteMinion(totem);
                }
            }
        }
Beispiel #4
0
 protected override IEnumerable <MatcherData> CreateCollection() =>
 new ConditionMatcherCollection(_modifierBuilder)
 {
     // actions
     // - generic
     { "on ({ActionMatchers})", Reference.AsAction.On() },
     { "if you've ({ActionMatchers}) recently", Reference.AsAction.Recently },
     { "if you haven't ({ActionMatchers}) recently", Not(Reference.AsAction.Recently) },
     {
         "when you ({ActionMatchers}) a rare or unique enemy",
         And(Reference.AsAction.Against(Enemy).On(), Enemy.IsRareOrUnique)
     },
     // - kill
     { "on ({KeywordMatchers}) kill", Kill.On(Reference.AsKeyword) },
     { "when you kill an enemy,", Kill.Against(Enemy).On() },
     {
         "if you've killed a maimed enemy recently",
         And(Kill.Against(Enemy).Recently, Buff.Maim.IsOn(Enemy))
     },
     {
         "if you've killed a bleeding enemy recently",
         And(Kill.Against(Enemy).Recently, Ailment.Bleed.IsOn(Enemy))
     },
     {
         "if you've killed a cursed enemy recently",
         And(Kill.Against(Enemy).Recently, Buffs(target: Enemy).With(Keyword.Curse).Any())
     },
     {
         "if you or your totems have killed recently",
         Or(Kill.Recently, Kill.By(Entity.Totem).Recently)
     },
     { "if you or your totems kill an enemy", Or(Kill.On(), Kill.By(Entity.Totem).On()) },
     // - block
     { "when they block", Block.On() },
     { "when you block", Block.On() },
     {
         "if you've blocked a hit from a unique enemy recently",
         And(Block.Against(Enemy).Recently, Enemy.IsUnique)
     },
     // - hit
     { "(from|with) hits", Hit.On() },
     { "hits deal", Hit.On() },
     { "when you are hit", Hit.Taken.On() },
     { "if you've been hit recently", Hit.Taken.Recently },
     { "if you haven't been hit recently", Not(Hit.Taken.Recently) },
     { "if you were damaged by a hit recently", Hit.Taken.Recently },
     { "if you've taken no damage from hits recently", Not(Hit.Taken.Recently) },
     // - other
     { "if you've taken a savage hit recently", Action.SavageHit.Taken.Recently },
     { "when you deal a critical strike", CriticalStrike.On() },
     { "if you've crit in the past # seconds", CriticalStrike.InPastXSeconds(Value) },
     { "if you've shattered an enemy recently", Action.Shatter.Against(Enemy).Recently },
     { "when you stun an enemy", Effect.Stun.On() },
     { "after spending # mana", Action.SpendMana(Value).On() },
     { "if you have consumed a corpse recently", Action.ConsumeCorpse.Recently },
     { "when you gain a ({ChargeTypeMatchers})", Reference.AsChargeType.GainAction.On() },
     // damage
     // - by item tag
     { "with weapons", Damage.With(Tags.Weapon) },
     { "weapon", Damage.With(Tags.Weapon) },
     { "with bows", Damage.With(Tags.Bow) },
     { "bow", Damage.With(Tags.Bow) },
     { "with swords", Damage.With(Tags.Sword) },
     { "with claws", Damage.With(Tags.Claw) },
     { "claw", Damage.With(Tags.Claw) },
     { "with daggers", Damage.With(Tags.Dagger) },
     { "with wands", Damage.With(Tags.Wand) },
     { "wand", Damage.With(Tags.Wand) },
     { "with axes", Damage.With(Tags.Axe) },
     { "with staves", Damage.With(Tags.Staff) },
     { "with maces", Or(Damage.With(Tags.Mace), Damage.With(Tags.Sceptre)) },
     { "with one handed weapons", Damage.With(Tags.OneHandWeapon) },
     {
         "with one handed melee weapons",
         And(Damage.With(Tags.OneHandWeapon), Not(Damage.With(Tags.Ranged)))
     },
     { "with two handed weapons", Damage.With(Tags.TwoHandWeapon) },
     {
         "with two handed melee weapons",
         And(Damage.With(Tags.TwoHandWeapon), Not(Damage.With(Tags.Ranged)))
     },
     // - by item slot
     { "with the main-hand weapon", Damage.With(ItemSlot.MainHand) },
     { "with main hand", Damage.With(ItemSlot.MainHand) },
     { "with off hand", Damage.With(ItemSlot.OffHand) },
     // - by source
     { "attacks have", Damage.With(Source.Attack) },
     { "with attacks", Damage.With(Source.Attack) },
     { "from damage over time", Damage.With(Source.DamageOverTime) },
     // - by ailment
     { "with ({AilmentMatchers})", Damage.With(Reference.AsAilment) },
     { "with ailments", Ailment.All.Any(Damage.With) },
     // action and damage combinations
     // - by item tag
     { "if you get a critical strike with a bow", And(CriticalStrike.On(), Damage.With(Tags.Bow)) },
     { "if you get a critical strike with a staff", And(CriticalStrike.On(), Damage.With(Tags.Staff)) },
     { "critical strikes with daggers have a", And(CriticalStrike.On(), Damage.With(Tags.Dagger)) },
     // - by item slot
     // - by source
     { "for each enemy hit by your attacks", And(Hit.Against(Enemy).On(), Damage.With(Source.Attack)) },
     // - by ailment
     { "with hits and ailments", Or(Hit.On(), Ailment.All.Any(Damage.With)) },
     {
         "poison you inflict with critical strikes deals",
         And(Damage.With(Ailment.Poison), CriticalStrike.On())
     },
     // equipment
     { "while unarmed", Not(MainHand.HasItem) },
     { "while wielding a staff", MainHand.Has(Tags.Staff) },
     { "while wielding a dagger", MainHand.Has(Tags.Dagger) },
     { "while wielding a bow", MainHand.Has(Tags.Bow) },
     { "while wielding a sword", MainHand.Has(Tags.Sword) },
     { "while wielding a claw", MainHand.Has(Tags.Claw) },
     { "while wielding an axe", MainHand.Has(Tags.Axe) },
     { "while wielding a mace", Or(MainHand.Has(Tags.Mace), MainHand.Has(Tags.Sceptre)) },
     { "while wielding a melee weapon", And(MainHand.Has(Tags.Weapon), Not(MainHand.Has(Tags.Ranged))) },
     { "while wielding a one handed weapon", MainHand.Has(Tags.OneHandWeapon) },
     { "while wielding a two handed weapon", MainHand.Has(Tags.TwoHandWeapon) },
     { "while dual wielding", OffHand.Has(Tags.Weapon) },
     { "while holding a shield", OffHand.Has(Tags.Shield) },
     { "while dual wielding or holding a shield", Or(OffHand.Has(Tags.Weapon), OffHand.Has(Tags.Shield)) },
     { "with shields", OffHand.Has(Tags.Shield) },
     { "from equipped shield", And(Condition.BaseValueComesFrom(OffHand), OffHand.Has(Tags.Shield)) },
     { "with # corrupted items equipped", Equipment.Count(e => e.IsCorrupted) >= Value },
     // stats
     // - pool
     { "when on low life", Life.IsLow },
     { "when not on low life", Not(Life.IsLow) },
     { "while no mana is reserved", Mana.Reservation.Value == 0 },
     { "while energy shield is full", EnergyShield.IsFull },
     { "while on full energy shield", EnergyShield.IsFull },
     { "while not on full energy shield", Not(EnergyShield.IsFull) },
     { "if energy shield recharge has started recently", EnergyShield.Recharge.StartedRecently },
     // - charges
     { "while you have no ({ChargeTypeMatchers})", Reference.AsChargeType.Amount.Value == 0 },
     {
         "while (at maximum|on full) ({ChargeTypeMatchers})",
         Reference.AsChargeType.Amount.Value == Reference.AsChargeType.Amount.Maximum.Value
     },
     // - flags
     { "while you have ({FlagMatchers})", Reference.AsFlagStat.IsSet },
     { "during onslaught", Flag.Onslaught.IsSet },
     { "while phasing", Flag.Phasing.IsSet },
     // - other
     { "if you have # primordial jewels,", Stat.PrimordialJewelsSocketed.Value >= Value },
     // - on enemy
     { "(against enemies )?that are on low life", Enemy.Stat(Life).IsLow },
     { "(against enemies )?that are on full life", Enemy.Stat(Life).IsFull },
     { "against rare and unique enemies", Enemy.IsRareOrUnique },
     // buffs
     { "while you have fortify", Buff.Fortify.IsOn(Self) },
     { "if you've taunted an enemy recently", Buff.Taunt.Action.Recently },
     { "enemies you taunt( deal| take)?", And(For(Enemy), Buff.Taunt.IsOn(Enemy)) },
     { "enemies you curse (take|have)", And(For(Enemy), Buffs(Self, Enemy).With(Keyword.Curse).Any()) },
     { "(against|from) blinded enemies", Buff.Blind.IsOn(Enemy) },
     { "from taunted enemies", Buff.Taunt.IsOn(Enemy) },
     {
         "you and allies affected by your auras have",
         Or(For(Entity.ModifierSource), And(For(Ally), Buffs(target: Ally).With(Keyword.Aura).Any()))
     },
     {
         "you and allies deal while affected by auras you cast",
         Or(For(Entity.ModifierSource), And(For(Ally), Buffs(target: Ally).With(Keyword.Aura).Any()))
     },
     // buff and damage combinations
     {
         "bleeding you inflict on maimed enemies deals",
         And(Damage.With(Ailment.Bleed), Buff.Maim.IsOn(Enemy))
     },
     // ailments
     { "while ({AilmentMatchers})", Reference.AsAilment.IsOn(Self) },
     { "(against|from) ({AilmentMatchers}) enemies", Reference.AsAilment.IsOn(Enemy) },
     {
         "against frozen, shocked or ignited enemies",
         Or(Ailment.Freeze.IsOn(Enemy), Ailment.Shock.IsOn(Enemy), Ailment.Ignite.IsOn(Enemy))
     },
     { "enemies which are ({AilmentMatchers})", Reference.AsAilment.IsOn(Enemy) },
     {
         "against enemies( that are)? affected by elemental ailments",
         Ailment.Elemental.Any(a => a.IsOn(Enemy))
     },
     {
         "against enemies( that are)? affected by no elemental ailments",
         Not(Ailment.Elemental.Any(a => a.IsOn(Enemy)))
     },
     // ground effects
     { "while on consecrated ground", Ground.Consecrated.IsOn(Self) },
     // other effects
     { "against burning enemies", Fire.DamageOverTimeIsOn(Enemy) },
     // skills
     // - by keyword
     { "vaal( skill)?", With(Skills[Keyword.Vaal]) },
     { "({KeywordMatchers})", With(Skills[Reference.AsKeyword]) },
     {
         "({KeywordMatchers}) and ({KeywordMatchers})",
         Or(With(Skills[References[0].AsKeyword]), With(Skills[References[1].AsKeyword]))
     },
     { "(with|of|for|from) ({KeywordMatchers})( skills)?", With(Skills[Reference.AsKeyword]) },
     { "({KeywordMatchers}) skills (have|deal)", With(Skills[Reference.AsKeyword]) },
     // - by damage type
     { "with ({DamageTypeMatchers}) skills", With(Skills[Reference.AsDamageType]) },
     // - by item slot
     { "skills (in|from) your ({ItemSlotMatchers})(can have| have)?", With(Skills[Reference.AsItemSlot]) },
     // - by single skill
     { "({SkillMatchers})('|s)?( fires| has a| have a| has| deals| gain)?", With(Reference.AsSkill) },
     { "(dealt by) ({SkillMatchers})", With(Reference.AsSkill) },
     // - cast recently/in past x seconds
     { "if you've cast a spell recently", Skills[Keyword.Spell].Cast.Recently },
     { "if you've attacked recently", Skills[Keyword.Attack].Cast.Recently },
     { "if you've used a movement skill recently", Skills[Keyword.Movement].Cast.Recently },
     { "if you've used a warcry recently", Skills[Keyword.Warcry].Cast.Recently },
     {
         "if you've used a ({DamageTypeMatchers}) skill in the past # seconds",
         Skills[Reference.AsDamageType].Cast.InPastXSeconds(Value)
     },
     // skill and action combinations
     {
         "projectiles have against targets they pierce",
         And(Projectile.Pierce.On(), With(Skills[Keyword.Projectile]))
     },
     // traps and mines
     { "with traps", With(Traps) },
     { "with mines", With(Mines) },
     { "traps and mines (deal|have a)", Or(With(Traps), With(Mines)) },
     { "from traps and mines", Or(With(Traps), With(Mines)) },
     { "for throwing traps", With(Traps) },
     { "if you detonated mines recently", Skill.DetonateMines.Cast.Recently },
     { "if you've placed a mine or thrown a trap recently", Or(Traps.Cast.Recently, Mines.Cast.Recently) },
     // totems
     { "totems", For(Entity.Totem) },
     { "totems (fire|gain|have)", With(Totems) },
     { "(spells cast|attacks used|skills used) by totems (have a|have)", With(Totems) },
     { "of totem skills that cast an aura", With(Skills[Keyword.Totem, Keyword.Aura]) },
     { "while you have a totem", Totems.Any(s => s.HasInstance) },
     { "if you've summoned a totem recently", Totems.Cast.Recently },
     { "when you place a totem", Totems.Cast.On() },
     // minions
     { "minions", For(Entity.Minion) },
     { "minions (deal|have|gain)", For(Entity.Minion) },
     { "you and your minions have", For(Entity.Minion, Entity.ModifierSource) },
     { "golem", For(Entity.Minion.With(Keyword.Golem)) },
     { "golems have", For(Entity.Minion.With(Keyword.Golem)) },
     { "spectres have", For(Entity.Minion.From(Skill.RaiseSpectre)) },
     {
         // Technically this would be separate for each minion summoned by that skill, but DPS will
         // only be calculated for a single minion anyway.
         "golems summoned in the past # seconds deal",
         With(Golems.Where(s => s.Cast.InPastXSeconds(Value)))
     },
     { "if you Summoned a golem in the past # seconds", Golems.Cast.InPastXSeconds(Value) },
     // flasks
     { "while using a flask", Flask.IsAnyActive },
     { "during any flask effect", Flask.IsAnyActive },
     // other
     { "while leeching", Condition.WhileLeeching },
     { "(you )?gain", Condition.True },     // may be left over at the end, does nothing
     // unique
     {
         "when your trap is triggered by an enemy",
         Condition.Unique("When your Trap is triggered by an Enemy")
     },
     {
         "when your mine is detonated targeting an enemy",
         Condition.Unique("When your Mine is detonated targeting an Enemy")
     },
     {
         "if you've killed an enemy affected by your damage over time recently",
         Condition.Unique("Have you recently killed an Enemy affected by your Damage over Time?")
     },
 };
Beispiel #5
0
        public static Composite EnhancementCombat()
        {
            return(new PrioritySelector(
                       //new Decorator(ret => AdvancedAI.PvPRot,
                       //              EnhancementShamanPvP.CreateESPvPCombat),

                       Spell.Cast("Healing Stream Totem", ret => Me.HealthPercent < 80 && !Totems.Exist(WoWTotemType.Water)),
                       Spell.Cast("Healing Tide Totem", ret => HealerManager.GetCountWithHealth(55) > 6 && !Totems.Exist(WoWTotemType.Water)),

                       //burst
                       new Decorator(ret => AdvancedAI.Burst,
                                     new PrioritySelector(
                                         Spell.Cast("Stormlash Totem", ret => !Me.HasAura("Stormlash Totem")),
                                         Spell.Cast("Elemental Mastery"),
                                         Spell.Cast("Fire Elemental Totem"),
                                         Spell.Cast("Feral Spirit"),
                                         Spell.Cast("Ascendance", ret => !Me.HasAura("Ascendance")))),

                       //new Decorator(ret => Unit.UnfriendlyUnits(10).Count() >= 3,
                       //            CreateAoe()),

                       Spell.Cast("Searing Totem", ret => Me.GotTarget && Me.CurrentTarget.SpellDistance() < Totems.GetTotemRange(WoWTotem.Searing) - 2f && !Totems.Exist(WoWTotemType.Fire)),

                       Spell.Cast("Unleash Elements", ret => SpellManager.HasSpell("Unleashed Fury")),

                       Spell.Cast("Elemental Blast", ret => Me.HasAura("Maelstrom Weapon", 1)),

                       new Decorator(ret => Me.HasAura("Maelstrom Weapon", 5),
                                     new PrioritySelector(
                                         Spell.Cast("Chain Lightning", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2),
                                         Spell.Cast("Lightning Bolt"))),

                       //StormBlast
                       new Decorator(ret => (Me.HasAura("Ascendance") && !WoWSpell.FromId(115356).Cooldown),
                                     new Action(ret => Lua.DoString("RunMacroText('/cast Stormblast')"))),

                       Spell.Cast("Stormstrike"),
                       Spell.Cast("Flame Shock", ret => Me.CachedHasAura("Unleash Flame") && !Me.CurrentTarget.HasMyAura("Flame Shock")),
                       Spell.Cast("Lava Lash"),
                       Spell.Cast("Flame Shock", ret => (Me.CachedHasAura("Unleash Flame") && Me.CurrentTarget.CachedGetAuraTimeLeft("Flame Shock") < 10) || !Me.CurrentTarget.HasMyAura("Flame Shock")),

                       Spell.Cast("Unleash Elements"),
                       new Decorator(ret => Me.HasAura("Maelstrom Weapon", 3) && !Me.HasAura("Ascendance"),
                                     new PrioritySelector(
                                         Spell.Cast("Chain Lightning", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2),
                                         Spell.Cast("Lightning Bolt"))),
                       // need to make it at <2
                       Spell.Cast("Ancestral Swiftness", ret => !Me.HasAura("Maelstrom Weapon")),
                       Spell.Cast("Lighting Bolt", ret => Me.HasAura("Ancestral Swiftness")),
                       Spell.Cast("Earth Shock"),

                       Spell.Cast("Earth Elemental Totem", ret => Me.CurrentTarget.IsBoss && SpellManager.Spells["Fire Elemental Totem"].CooldownTimeLeft.Seconds >= 50)));

            //need more gear
            //new Decorator(ret => Me.HasAura("Maelstrom Weapon", 1) && !Me.HasAura("Ascendance"),
            //    new PrioritySelector(
            //        Spell.Cast("Chain Lightning", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2),
            //        Spell.Cast("Lightning Bolt")
            //        )
            //    )
            //    );
        }
        public static Composite RestorationCombat()
        {
            HealerManager.NeedHealTargeting = true;
            //var cancelHeal = Math.Max(95, Math.Max(AvehealingWave(), Math.Max(AvegreaterhealingWave(), AvehealingSurge())));//95,93,55,25
            var cancelHeal = Math.Max(95, Math.Max(93, Math.Max(55, 25)));//95,93,55,25

            return(new PrioritySelector(
                       Spell.WaitForCastOrChannel(),
                       //new Decorator(ret => AdvancedAI.PvPRot,
                       //    RestorationShamanPvP.CreateRSPvPCombat),
                       new Decorator(ret => (Me.Combat || healtarget.Combat /*|| healtarget.GetPredictedHealthPercent() <= 99*/) && !Me.Mounted,
                                     new PrioritySelector(
                                         //Totems.CreateTotemsBehavior(),
                                         RollRiptide(),
                                         TidalWaves(),
                                         new Decorator(ret => AdvancedAI.Dispell,
                                                       Dispelling.CreateDispelBehavior()),
                                         Item.UsePotionAndHealthstone(40),
                                         new Throttle(1, 1,
                                                      new PrioritySelector(
                                                          Spell.Cast("Earth Shield",
                                                                     on => GetBestEarthShieldTargetInstance(),
                                                                     ret => !GetBestEarthShieldTargetInstance().CachedHasAura("Earth Shield")))),
                                         Spell.Cast("Spirit Link Totem",
                                                    on => healtarget,
                                                    ret => HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 40 && p.Distance <= Totems.GetTotemRange(WoWTotem.SpiritLink)) >= 3 && AdvancedAI.Burst),
                                         new Decorator(ret => healtarget.HealthPercent < 25,
                                                       new Sequence(
                                                           Spell.Cast("Ancestral Swiftness"),
                                                           Spell.Cast("Greater Healing Wave",
                                                                      on => healtarget))),
                                         Spell.Cast("Healing Tide Totem",
                                                    ret => Me.Combat && HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 60 && p.Distance <= Totems.GetTotemRange(WoWTotem.HealingTide)) >= (Me.GroupInfo.IsInRaid ? 3 : 2) && AdvancedAI.Burst),
                                         Spell.Cast("Healing Stream Totem",
                                                    ret => Me.Combat && !Totems.Exist(WoWTotemType.Water) && HealerManager.Instance.TargetList.Any(p => p.GetPredictedHealthPercent() < 95 && p.Distance <= Totems.GetTotemRange(WoWTotem.HealingTide))),
                                         Spell.Cast("Mana Tide Totem",
                                                    ret => !Totems.Exist(WoWTotemType.Water) && Me.ManaPercent < 80),
                                         HealingRain(),
                                         ChainHeal(),
                                         Spell.Cast("Elemental Blast",
                                                    on => BoltTar()),
                                         //ret => SpellManager.HasSpell("Elemental Blast"),
                                         //cancel => healtarget.HealthPercent < 40),
                                         Spell.Cast("Greater Healing Wave",
                                                    on => healtarget,
                                                    //ret => AvegreaterhealingWave() < Deficit(),//55
                                                    ret => healtarget.HealthPercent <55,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Healing Wave",
                                                    on => healtarget,
                                                    //ret => AvehealingWave() < Deficit(),//93
                                                    ret => healtarget.HealthPercent <93,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Healing Surge",
                                                    on => healtarget,
                                                    //ret => AvehealingSurge() < Deficit(),//25
                                                    ret => healtarget.HealthPercent <25,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Ascendance",
                                                    ret => HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 50) >= 4 && !Me.CachedHasAura("Ascendance") && AdvancedAI.Burst),
                                         Riptide(),
                                         new Decorator(ret => AdvancedAI.InterruptsEnabled,
                                                       Common.CreateInterruptBehavior()),
                                         //Totems.CreateTotemsBehavior(),
                                         Spell.Cast("Lightning Bolt",
                                                    on => BoltTar(),
                                                    ret => TalentManager.HasGlyph("Telluric Currents"),
                                                    cancel => healtarget.HealthPercent < 70)))));
        }
Beispiel #7
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Kyber Destruction Warlock - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 3203012", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveCovenant", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using Covenant abilities on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);
            Aimsharp.PrintMessage("This rotation will use Havoc on your focus target, so please make a macro to set focus quickly.", Color.Blue);
            Aimsharp.PrintMessage("/focus [@mouseover,nodead,exists]; [@target,exists]", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            foreach (string Spell in SpellsList)
            {
                Spellbook.Add(Spell);
            }

            foreach (string Spell in CovenantAbilities)
            {
                Spellbook.Add(Spell);
            }

            foreach (string Spell in Racials)
            {
                Spellbook.Add(Spell);
            }

            foreach (string Buff in GeneralBuffs)
            {
                Buffs.Add(Buff);
            }

            foreach (string Buff in BuffsList)
            {
                Buffs.Add(Buff);
            }

            foreach (string Buff in BloodlustEffects)
            {
                Buffs.Add(Buff);
            }

            foreach (string Debuff in DebuffsList)
            {
                Debuffs.Add(Debuff);
            }

            foreach (string Debuff in GeneralDebuffs)
            {
                Debuffs.Add(Debuff);
            }

            foreach (string Totem in TotemsList)
            {
                Totems.Add(Totem);
            }

            Items.Add(GetString("Potion name:"));

            Macros.Add("DPS Pot", "/use " + GetString("Potion name:"));
            Macros.Add("havoc focus", "/cast [@focus] Havoc");
            Macros.Add("cata cursor", "/cast [@cursor] Cataclysm");
            Macros.Add("rof cursor", "/cast [@cursor] Rain of Fire");
            Macros.Add("inf cursor", "/cast [@cursor] Summon Infernal");
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");

            foreach (string MacroCommand in MacroCommands)
            {
                CustomCommands.Add(MacroCommand);
            }

            CustomFunctions.Add("GetCovenant", "local spell = 0 local i = 1 while true do local spellName, spellSub = GetSpellBookItemName(i, BOOKTYPE_SPELL) if not spellName then do break end end if spellName == 'Decimating Bolt' then spell = 4 elseif spellName == 'Soul Rot' then spell = 3 elseif spellName == 'Impending Catastrophe' then spell = 2 elseif spellName == 'Scouring Tithe' then spell = 1 end i = i + 1 end return spell");
            CustomFunctions.Add("GetLegendarySpellID", "local power = 0 for i=1,15,1 do local xcs = ItemLocation:CreateFromEquipmentSlot(i) if(C_Item.DoesItemExist(xcs)) then if(C_LegendaryCrafting.IsRuneforgeLegendary(xcs)) then local id = C_LegendaryCrafting.GetRuneforgeLegendaryComponentInfo(xcs)[\"powerID\"] power = C_LegendaryCrafting.GetRuneforgePowerInfo(id)[\"descriptionSpellID\"] end end end return power");
        }