Example #1
0
 /// <summary>
 /// Switch to Apect of the fox while moving then back to aspect of the hawk (or Iron Hawk)
 /// </summary>
 public static Composite HandleAspectSwitching(int time)
 {
     return(new PrioritySelector(
                new Decorator(ret => CLUSettings.Instance.Hunter.HandleAspectSwitching,
                              Buff.CastBuff("Aspect of the Hawk", !TalentManager.HasTalent(8) ? "Aspect of the Hawk" : "Aspect of the Iron Hawk", ret => TalentManager.HasTalent(8), "Aspect of the Iron Hawk")
                              )));
 }
Example #2
0
 /* atm unused, not finished */
 private Composite FireMageRotation()
 {
     return(new PrioritySelector(
                new Decorator(ret => CLUSettings.Instance.PauseRotation, new ActionAlwaysSucceed()),
                new Decorator(ret => Me.CurrentTarget != null && Unit.UseCooldowns(),
                              new PrioritySelector(
                                  Item.UseTrinkets(),
                                  Racials.UseRacials(),
                                  Buff.CastBuff("Lifeblood", ret => true, "Lifeblood"), // Thanks Kink
                                  Item.UseBagItem("Volcanic Potion", ret => Buff.UnitHasHasteBuff(Me), "Volcanic Potion Heroism/Bloodlust"),
                                  Item.UseEngineerGloves())),
                Spell.CastSpell("Spellsteal", ret => Spell.TargetHasStealableBuff() && !Me.IsMoving, "[Steal] Spellsteal"),
                Spell.CastInterupt("Counterspell", ret => true, "Counterspell"),
                Spell.CastSpell("Blazing Speed", unit => Me, ret => Me.MovementInfo.ForwardSpeed < 8.05 && Me.IsMoving && TalentManager.HasTalent(5) && CLUSettings.Instance.EnableMovement, "Blazing Speed"),
                // Cooldowns
                new Decorator(ret => CLUSettings.Instance.UseCooldowns,
                              new PrioritySelector(
                                  //Spell.ChannelSelfSpell("Evocation", ret => Unit.UseCooldowns() && TalentManager.HasTalent(16) && !Me.HasAura("Invoker's Energy") && !Me.HasAura("Pyroblast!"), "Evocation"),
                                  Spell.PreventDoubleChannel("Evocation", 0.5, true, On => Me, ret => Unit.UseCooldowns() && TalentManager.HasTalent(16) && !Me.HasAura("Invoker's Energy") && !Me.HasAura("Pyroblast!")),
                                  Spell.PreventDoubleCast("Presence of Mind", 0.5, on => Me, ret => Unit.UseCooldowns() && Me.HasAura("Pyroblast!") && Spell.CanCast("Alter Time")),
                                  Spell.PreventDoubleCast("Alter Time", 0.5, on => Me, ret => (Me.HasAura("Invoker's Energy") && Me.HasAura("Pyroblast!") && Me.HasAura("Presence of Mind") && !Me.HasAura("Alter Time")) || (!Me.HasAura("Presence of Mind") && !Me.HasAura("Pyroblast!"))),
                                  Item.UseBagItem("Mana Gem", ret => Me.CurrentTarget != null && Me.ManaPercent < 90, "Mana Gem"),
                                  Item.UseBagItem("Brilliant Mana Gem", ret => Me.CurrentTarget != null && Me.ManaPercent < 90, "Brilliant Mana Gem"),
                                  Spell.PreventDoubleCast("Mirror Image", 0.5, on => Me, ret => true))),
                Spell.CastSpell(759, ret => Spell.CanCast("Conjure Mana Gem") && Buff.PlayerHasBuff("Presence of Mind") && !Item.HaveManaGem() && Me.Level > 50, "Conjure Mana Gem"),
                // Rune of Power
                Spell.CastOnUnitLocation("Rune of Power", unit => Me, ret => !Buff.PlayerHasBuff("Rune of Power") && TalentManager.HasTalent(17), "Rune of Power"),
                // AoE
                new Decorator(ret => !Me.IsMoving && Me.CurrentTarget != null && Unit.CountEnnemiesInRange(Me.CurrentTarget.Location, 15) >= CLUSettings.Instance.BurstOnMobCount && CLUSettings.Instance.UseAoEAbilities,
                              new PrioritySelector(
                                  Spell.CastOnUnitLocation("Flamestrike", u => Me.CurrentTarget, ret => Me.CurrentTarget != null && !Buff.TargetHasDebuff("Flamestrike") && !BossList.IgnoreAoE.Contains(Unit.CurrentTargetEntry) && Me.ManaPercent > 30 && Unit.CountEnnemiesInRange(Me.CurrentTarget.Location, 15) > 3, "Flamestrike"),
                                  Spell.CastConicSpell("Dragon's Breath", 12f, 33f, ret => !Me.HasMyAura("Heating Up") && !Me.HasMyAura("Pyroblast!"), "Dragon's Breath")
                                  )),
                new Decorator(ret => Me.GotTarget && Me.CurrentTarget != null && Me.CurrentTarget.IsAlive && Me.CurrentTarget.Attackable,
                              new PrioritySelector(
                                  //SkipFireball(),
                                  Spell.CastSpell("Combustion", ret => CLUSettings.Instance.Mage.EnableCombustion && Buff.TargetHasDebuff("Ignite") && Unit.UseCooldowns(), "Combustion"),
                                  /* Remove start - this is experimental und SHOULDN'T work*/
                                  Spell.CastSpell("Living Bomb", ret => !Me.CurrentTarget.HasAura("Living Bomb") || Me.CurrentTarget.HasAura("Living Bomb") && Buff.GetAuraDoubleTimeLeft(Me.CurrentTarget, "Living Bomb", true) <= 1, "Living Bomb"),
                                  Spell.CastSpell("Nether Tempest", ret => !Me.CurrentTarget.HasAura("Nether Tempest") || Me.CurrentTarget.HasAura("Nether Tempest") && Buff.GetAuraDoubleTimeLeft(Me.CurrentTarget, "Nether Tempest", true) <= 1, "Nether Tempest"),
                                  Spell.CastSpell("Frost Bomb", ret => !Me.CurrentTarget.HasAura("Frost Bomb"), "Frost Bomb"),
                                  /* Remove end */
                                  Spell.CastSpell("Pyroblast", ret => Me.HasAura("Pyroblast!") || Me.HasAura("Presence of Mind"), "Pyroblast"),
                                  Spell.PreventDoubleCast("Inferno Blast", 0.5, ret => Me.HasMyAura("Heating Up")),
                                  Spell.CastSpell("Mage Bomb", ret => !Me.CurrentTarget.HasAnyAura(MageBomb) || (Me.CurrentTarget.HasAnyAura(MageBomb) && Buff.GetAuraDoubleTimeLeft(Me.CurrentTarget, Magebombtalent, true) <= 1), "Mage Bomb"),
                                  Spell.PreventDoubleCast("Fireball", 0.5, ret => Buff.GetAuraDoubleTimeLeft(Me.CurrentTarget, Magebombtalent, true) > 2)
                                  ))
                ));
 }