Exemplo n.º 1
0
 public static Composite SelectLeadersTarget()
 {
     // Just use the leader's target if it's in range.
     return(new Decorator(ret => RaFHelper.Leader != null && AltarboySettings.Instance.RaFLeaderTargeting,
                          new PrioritySelector(
                              new Decorator(ret => (RaFHelper.Leader.CurrentTarget != null && TargetManager.IsUnitInRange(RaFHelper.Leader.CurrentTarget, 40)),
                                            new TreeSharp.Action(delegate { SetTarget(RaFHelper.Leader.CurrentTarget, TargetMode.SingleTarget); })
                                            )
                              )
                          ));
 }
        private static Composite MindSpikeRotation()
        {
            return(new Sequence(
                       //this is the stationary composite, so it shouldn't be an issue to face the target.
                       new TreeSharp.Action(delegate { if (!Me.IsMoving)
                                                       {
                                                           TargetManager.ActiveTarget.Face();
                                                       }
                                            }),

                       //Need to add code here to respect the SWD logic specified by settings..

                       new PrioritySelector(

                           AltarboyComposites.CastSpell("Archangel", ret => (
                                                            AuraManager.HasMyAura("Dark Evangelism", Me, 5)), Me),

                           //Shadow Word Death On Exectue
                           AltarboyComposites.CastSpell("Shadow Word: Death", ret => (
                                                            TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) &&
                                                            AltarboySettings.Instance.ShadowWordDeathForExecute &&
                                                            TargetManager.ActiveTarget.HealthPercent <= 25
                                                            ), TargetManager.ActiveTarget),

                           AltarboyComposites.CastSpell("Mind Blast", ret => AuraManager.HasMyAura("Mind Spike", TargetManager.ActiveTarget, 3), TargetManager.ActiveTarget),
                           AltarboyComposites.CastSpell("Shadow Word: Death", ret => (TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathForManaOnly && Me.ManaPercent <= AltarboySettings.Instance.ShadowWordDeathManaPercent), TargetManager.ActiveTarget),
                           AltarboyComposites.CastSpell("Mind Spike", ret => true, TargetManager.ActiveTarget),
                           AltarboyComposites.CastSpell("Mind Flay", ret => (
                                                            Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                            (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration)
                                                            ), TargetManager.ActiveTarget)

                           )));
        }
        private static Composite NormalDpsRotation(SimpleBoolReturnDelegate extra)
        {
            // Altarboy.Logger.Slog(Color.Lime, "--- Single Target Max Dps Rotation  --- ");
            return(new Sequence(

                       //this is the stationary composite, so it shouldn't be an issue to face the target.
                       new TreeSharp.Action(delegate { if (!Me.IsMoving && !Me.IsSafelyFacing(TargetManager.ActiveTarget))
                                                       {
                                                           TargetManager.ActiveTarget.Face();
                                                       }
                                            }),

                       new Decorator(
                           ret => extra(ret),
                           new PrioritySelector(

                               // This doesnt belong here but Im using it for raiding at the moment... will move later.
                               AltarboyComposites.CastSpell("Dispersion", ret => (AuraManager.HasAuraStacks("Tormented", 14, Me)), Me),

                               //Shadow Word Death On Exectue
                               AltarboyComposites.CastSpell("Shadow Word: Death", ret => (
                                                                TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) &&
                                                                AltarboySettings.Instance.ShadowWordDeathForExecute &&
                                                                TargetManager.ActiveTarget.HealthPercent <= 25
                                                                ), TargetManager.ActiveTarget),

                               //Shadowfiend on Bloodlust.
                               AltarboyComposites.CastSpell("Shadowfiend", ret => (
                                                                AltarboySettings.Instance.ForceFiendOnBloodlust &&
                                                                AuraManager.IsLusting(Me)), TargetManager.ActiveTarget
                                                            ),

                               //Shadowfiend on Bloodlust.
                               AltarboyComposites.CastSpell("Shadowfiend", ret => (
                                                                AltarboySettings.Instance.ForceShadowFiendOnArchangel &&
                                                                AuraManager.HasMyAura("Dark Archangel", Me)), TargetManager.ActiveTarget
                                                            ),

                               // I think it always makes sense to use pain first... this can generate orbs, and apparitions.
                               AltarboyComposites.CastSpell("Shadow Word: Pain", ret => (
                                                                AuraManager.GetAuraTimeLeft("Shadow Word: Pain", TargetManager.ActiveTarget, true).TotalSeconds <= .4),
                                                            TargetManager.ActiveTarget
                                                            ),



                               AltarboyComposites.CastSpell("Mind Flay", ret => (
                                                                !Altarboy.AuraManager.HasAuraStacks("Dark Evangelism", 5, Me) &&
                                                                Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                                (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration)
                                                                ), TargetManager.ActiveTarget),

                               // If there is an orb to use, and ES is close to running out... Refresh it before applying dots.
                               AltarboyComposites.CastSpell("Mind Blast", ret =>
                                                            Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                            AuraManager.HasMyAura("Shadow Orb", Me, 1) &&
                                                            AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds < 4,
                                                            TargetManager.ActiveTarget
                                                            ),

                               AltarboyComposites.CastSpell("Vampiric Touch", ret => (
                                                                CastManager.LastSpellCast != "Vampiric Touch" &&
                                                                Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                                (AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds <= 2.6)
                                                                ), TargetManager.ActiveTarget),


                               // DP goes second cause you can cast while moving and it does instant damage.
                               AltarboyComposites.CastSpell("Devouring Plague", ret => (
                                                                TargetManager.ShouldApplyDevouringPlague()
                                                                ), TargetManager.ActiveTarget),


                               // --- Trying to delay mana regen stuff untill dots are up if possible.  ---//

                               //Use dispersion when low on mana.
                               AltarboyComposites.CastSpell("Dispersion", ret => (Me.ManaPercent <= AltarboySettings.Instance.DispersionManaPercent), Me),

                               //Shadowfiend on CD or as mana regen.
                               AltarboyComposites.CastSpell("Shadowfiend", ret => (
                                                                (AltarboySettings.Instance.UseShadowFiendOnCD || (AltarboySettings.Instance.UseShadowFiendForManaRegen && Me.ManaPercent <= AltarboySettings.Instance.UseShadowFiendManaPercent)) &&
                                                                AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5)
                                                            , TargetManager.ActiveTarget
                                                            ),

                               //Only use Archangel when there are 5 stacks up.
                               //TODO - Want to add logic to make sure this isn't cast when dots are close to needing a refresh
                               // - the goal is to make sure that right after this we can maximize mindblasts and mindflays.
                               AltarboyComposites.CastSpell("Archangel", ret => (
                                                                AuraManager.HasMyAura("Dark Evangelism", Me, 5) &&
                                                                AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds > 8 &&
                                                                AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5)
                                                            , Me
                                                            ),

                               //Shadow Word Death For Mana
                               AltarboyComposites.CastSpell("Shadow Word: Death", ret => (
                                                                TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) &&
                                                                AltarboySettings.Instance.ShadowWordDeathForManaOnly &&
                                                                Me.ManaPercent <= AltarboySettings.Instance.ShadowWordDeathManaPercent
                                                                ), TargetManager.ActiveTarget),


                               //Shadow Word on CD (Not sure who would want this)
                               AltarboyComposites.CastSpell("Shadow Word: Death", ret => (
                                                                TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) &&
                                                                AltarboySettings.Instance.ShadowWordDeathOnCD
                                                                ), TargetManager.ActiveTarget),

                               //Mind blast freely if we have at least ten seconds of ES left or if use wants to fire it on cooldown
                               AltarboyComposites.CastSpell("Mind Blast", ret =>
                                                            Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                            (AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds > 9 || AltarboySettings.Instance.UseMindBlastOnCD)
                                                            , TargetManager.ActiveTarget
                                                            ),

                               //Mind blast if we have at least 1 orb up and no ES at all. (Want to get ES up as fast as possible)
                               AltarboyComposites.CastSpell("Mind Blast", ret =>
                                                            Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                            AuraManager.HasMyAura("Shadow Orb", Me, 1)
                                                            , TargetManager.ActiveTarget),

                               //Always use MB when you have 3 orbs
                               AltarboyComposites.CastSpell("Mind Blast",
                                                            ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                            (AuraManager.HasMyAura("Shadow Orb", Me, 3)
                                                            ), TargetManager.ActiveTarget),


                               //Mind flay when when you have nothing else to do.. Try and clip to account for lag.
                               AltarboyComposites.CastSpell("Mind Flay", ret => (
                                                                Me.IsSafelyFacing(TargetManager.ActiveTarget) &&
                                                                (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration)
                                                                ), TargetManager.ActiveTarget)

                               )
                           )

                       ));
        }
 private static Composite SingleTargetDps()
 {
     //Never Attack Anything That we shouldnt
     return(new Decorator(
                ret => TargetManager.ShouldAttack(TargetManager.ActiveTarget),
                new PrioritySelector(
                    UseCoolDowns(),                                                                                           //cant seem to detect if a trinket can but used or not... gonna have to use user settings.
                    new Decorator(ret => AuraManager.HasAuraStacks("Molten Feather", 2, Me), NormalDpsRotation(ret => true)), // Alysrazor
                    new Decorator(ret => TargetManager.IsShackleTarget(TargetManager.ActiveTarget), ShackleTarget()),
                    new Decorator(ret => Me.IsMoving, MovementDps()),
                    new Decorator(ret => TargetManager.MSShadowFiend(), MindSpikeRotation()),
                    new Decorator(ret => TargetManager.IsMindSpikeTarget(TargetManager.ActiveTarget), MindSpikeRotation()),
                    new Decorator(ret => !TargetManager.IsMindSpikeTarget(TargetManager.ActiveTarget) && !TargetManager.MSShadowFiend(), NormalDpsRotation(ret => true))
                    //,
                    //new ActionAlwaysFail()
                    )
                ));
 }
Exemplo n.º 5
0
        //private void mobGrid_SelectionChanged(object sender, EventArgs e)
        //{
        //   if(mobGrid.SelectedRows.Count > 0)
        //   {
        //        int index = mobGrid.SelectedRows[0].Index;
        //        uint targetID = (uint)mobGrid["MobID", index].Value;
        //        lblTargetName.Text = TargetManager.AltarboySpecialTargets.First(tar => tar.TargetId == targetID).TargetName;
        //   }
        //}

        private void mobGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            TargetManager.SaveSpecialTargets();
            //SaveSettings();
        }
Exemplo n.º 6
0
        private Composite CreateCombatBuffBehavior()
        {
            return(new Decorator(
                       ret => Me.Combat && !CastManager.IsHymning(),
                       new PrioritySelector(
                           AltarboyComposites.BuffSelf("Inner Fire", ret => (AltarboySettings.Instance.UseInnerFire)),
                           AltarboyComposites.BuffSelf("Inner Will", ret => (AltarboySettings.Instance.UseInnerWill)),

                           ////Is there something I should dispell from my self?
                           // new Decorator(
                           //     ret => (Me.Debuffs).Any(aura => AltarboyHashes.TargetHasAuraType(aura.Value.SpellId, AltarboyHashes.AuraTypes.DispelAsap)),
                           //     new Decorator(ret => CastManager.CanCast("Dipel Magic", Me),
                           //         new TreeSharp.Action(delegate
                           //         {
                           //             CastManager.CastSpell("Dipel Magic", Me);
                           //         })
                           //     )
                           // ),

                           //Do I need to fade? If something is aggroing me and within a specific range.
                           AltarboyComposites.BuffSelf("Fade", ret => (Me.IsInParty || Me.IsInMyRaid) && AltarboySettings.Instance.EnableFadeOnAggro &&
                                                       TargetManager.DetectHostileTargets(10).Any(Unit => TargetManager.IsTargetingMeOrMyStuff(Unit))
                                                       ),

                           AltarboyComposites.CommonPriestBuffs()

                           )));
        }