/// <summary> /// Uses a pomander of witching when there are 3 mobs in combat around us /// </summary> /// <returns></returns> private async Task <bool> UseWitching() { if ( !DeepDungeonManager.BossFloor && DeepDungeonManager.GetInventoryItem(Pomander.Witching).Count > 0 && GameObjectManager.NumberOfAttackers >= 3 && !GameObjectManager.Attackers.Any(i => i.HasAura(Auras.Frog) || i.HasAura(Auras.Imp) || i.HasAura(Auras.Chicken)) //Toad && (!PartyManager.IsInParty || PartyManager.IsPartyLeader) ) { Logger.Info("Witching debug: {0} {1} {2} {3} {4}", !DeepDungeonManager.BossFloor, DeepDungeonManager.GetInventoryItem(Pomander.Witching).Count, GameObjectManager.NumberOfAttackers, !GameObjectManager.Attackers.Any(i => i.HasAura(Auras.Frog) || i.HasAura(Auras.Imp) || i.HasAura(Auras.Chicken)), (!PartyManager.IsInParty || PartyManager.IsPartyLeader) ); await CommonTasks.StopMoving("Use Pomander"); var res = await Tasks.Coroutines.Common.UsePomander(Pomander.Witching); await Coroutine.Yield(); return(res); } return(false); }
public override async Task <bool> BuffCurrentFloor() { if (DeepDungeonManager.GetInventoryItem(Pomander.Frailty).Count > 1) { return(await UsePomander(Pomander.Frailty)); } return(false); }
/// <summary> /// Player pomander buffs /// </summary> /// <returns></returns> private static async Task <bool> BuffMe() { if (Core.Me.HasAura(Auras.ItemPenalty)) { return(false); } if (CombatTargeting.Instance.LastEntities.Count() > 4) { return(await UsePomander(Pomander.Petrification)); } if (DeepDungeonManager.GetInventoryItem(Pomander.Petrification).Count == 3) { return(await UsePomander(Pomander.Petrification)); } if (await UsePomander(Pomander.Raising)) { return(true); } if (await UsePomander(Pomander.Intuition)) { return(true); } if (!Settings.Instance.SaveSteel || DeepDungeonManager.GetInventoryItem(Pomander.Steel).Count > 1) { if (await UsePomander(Pomander.Steel, Auras.Steel)) { return(true); } } if (!Settings.Instance.SaveStr || DeepDungeonManager.GetInventoryItem(Pomander.Strength).Count > 1) { if (await UsePomander(Pomander.Strength, Auras.Strength)) { return(true); } } if (Core.Me.HasAura(Auras.Pox)) { if (await UsePomander(Pomander.Purity)) { return(true); } } return(false); }
public override async Task <bool> BuffMe() { if (CombatTargeting.Instance.LastEntities.Count > 4) { return(await UsePomander(Pomander.Petrification)); } if (DeepDungeonManager.GetInventoryItem(Pomander.Petrification).Count == 3) { return(await UsePomander(Pomander.Petrification)); } return(false); }
public override async Task <bool> BuffMe() { if (GameObjectManager.Attackers.Count > 3) { return(await UsePomander(Pomander.Petrification)); } if (DeepDungeonManager.GetInventoryItem(Pomander.Petrification).Count == 3) { return(await UsePomander(Pomander.Petrification)); } return(false); }
public void Tick() { if (CommonBehaviors.IsLoading) { return; } if (!Constants.InDeepDungeon) { return; } DeepDungeonManager.HaveMainPomander = DeepDungeonManager.GetInventoryItem(Pomander.Lust).Count > 0 && DeepDungeonManager.GetInventoryItem(Pomander.Strength).Count > 0 && DeepDungeonManager.GetInventoryItem(Pomander.Steel).Count > 0; }
private static async Task LustLogic() { var lust = false; var itm = DeepDungeonManager.GetInventoryItem(Pomander.Lust); Logger.Info("[LUST] Item Count: {0}", itm.Count); //we are inside the dungeon, should be ok to use InParty here. if (PartyManager.IsInParty) { Logger.Info("In A Party. Doing Lust Logic..."); var lustFound = false; foreach (var k in PartyManager.AllMembers) { if (!k.Class.IsHealer() && !k.Class.IsTank()) { lustFound = true; if (k.IsMe) { lust = true; } break; } } Logger.Info("Party Lust status: {0} :: {1} :: {2}", !lust, !lustFound, PartyManager.IsPartyLeader); if (!lust && !lustFound) { lust = PartyManager.IsPartyLeader; } if (!PartyManager.IsPartyLeader && itm.Count > 0) { lust = true; } } else { Logger.Info("Solo Lust Logic"); lust = true; } if (lust) { Logger.Info("Use Pomander Debug: [HasAura: {0}]", itm.HasAura); await UsePomander(Pomander.Lust, Auras.Lust); } }
/// <summary> /// Player pomander buffs /// </summary> /// <returns></returns> private static async Task <bool> BuffMe() { if (Core.Me.HasAura(Auras.ItemPenalty)) { return(false); } await Constants.SelectedDungeon.BuffMe(); if (await UsePomander(Pomander.Raising)) { return(true); } if (await UsePomander(Pomander.Intuition)) { return(true); } if (DeepDungeonManager.GetInventoryItem(Pomander.Steel).Count > 1) { if (await UsePomander(Pomander.Steel, Auras.Steel)) { return(true); } } if (DeepDungeonManager.GetInventoryItem(Pomander.Strength).Count > 1) { if (await UsePomander(Pomander.Strength, Auras.Strength)) { return(true); } } if (Core.Me.HasAura(Auras.Pox)) { if (await UsePomander(Pomander.Purity)) { return(true); } } return(false); }
/// <summary> /// buffs the start of the level /// </summary> /// <returns></returns> private async Task <bool> BuffCurrentFloor() { //do not buff the floor if there is a boss... if (DeepDungeonManager.BossFloor) { return(false); } if (PartyManager.IsPartyLeader && (Core.Me.HasAura(Auras.Amnesia) || Core.Me.HasAura(Auras.ItemPenalty) || Core.Me.HasAura(Auras.NoAutoHeal))) { await UsePomander(Pomander.Serenity); } if (await Traps()) { return(true); } if (await UsePomander(Pomander.Fortune)) { return(true); } // if (await UsePomander(Pomander.Rage)) // return true; if (await Inuit()) { return(true); } //if (await UsePomander(Pomander.Intuition)) return true; //SaveFrailty if (!Settings.Instance.SaveFrailty || DeepDungeonManager.GetInventoryItem(Pomander.Frailty).Count > 1) { if (await UsePomander(Pomander.Frailty)) { return(true); } } return(await BuffNextFloor()); }
public override async Task <bool> BuffCurrentFloor() { if ((PartyManager.IsInParty && PartyManager.IsPartyLeader) || !PartyManager.IsInParty) { if (DeepDungeonManager.GetMagiciteCount() >= 1) { Logger.Warn("Magicite >= 1"); DeepDungeonManager.CastMagicite(); await Coroutine.Sleep(500); } } if (DeepDungeonManager.GetInventoryItem(Pomander.Frailty).Count > 1) { return(await UsePomander(Pomander.Frailty)); } return(false); }
internal static async Task <bool> UsePomander(Pomander number, uint auraId = 0) { if (Core.Me.HasAura(Auras.ItemPenalty) && number != Pomander.Serenity) { return(false); } //cannot use pomander while under the auras of rage / lust if (Core.Me.HasAnyAura(Auras.Lust, Auras.Rage)) { return(false); } var data = DeepDungeonManager.GetInventoryItem(number); if (data.Count == 0) { return(false); } if (data.HasAura) { return(false); } if (Core.Me.HasAura(auraId) && Core.Me.GetAuraById(auraId).TimespanLeft > TimeSpan.FromMinutes(1)) { return(false); } var lockoutTimer = PomanderLockoutTimers[number]; if (!lockoutTimer.IsFinished) { return(false); } await Coroutine.Wait(5000, () => !DeepDungeonManager.IsCasting); var cnt = data.Count; await Coroutine.Wait(5000, () => !DeepDungeonManager.IsCasting); var wt = new WaitTimer(TimeSpan.FromSeconds(30)); wt.Reset(); while (cnt == data.Count && !wt.IsFinished) { Logger.Verbose($"Using Pomander: {number}"); DeepDungeonManager.UsePomander(number); await Coroutine.Sleep(150); await Coroutine.Wait(5000, () => !DeepDungeonManager.IsCasting); DeepDungeonManager.PomanderChange(); data = DeepDungeonManager.GetInventoryItem(number); } //Wait a little so we don't trigger the anti-stuck await Coroutine.Sleep(1000); //TODO this is probabbly stored somewhere in the client... switch (number) { case Pomander.Rage: PomanderState = ItemState.Rage; break; case Pomander.Lust: PomanderState = ItemState.Lust; break; case Pomander.Resolution: PomanderState = ItemState.Resolution; break; } lockoutTimer.Reset(); return(true); }
private bool HaveMainPomander() { return(DeepDungeonManager.GetInventoryItem(Pomander.Lust).Count > 0 && DeepDungeonManager.GetInventoryItem(Pomander.Strength).Count > 0 && DeepDungeonManager.GetInventoryItem(Pomander.Steel).Count > 0); }
/// <summary> /// buff the stuff /// </summary> /// <returns></returns> private async Task <bool> BuffBoss() { if (DeepDungeonManager.BossFloor && !Core.Me.InCombat) { if (Core.Me.HasAura(Auras.Lust) || _runbuf) { return(false); } _runbuf = true; if (Core.Me.HasAura(Auras.Enervation) || Core.Me.HasAura(Auras.Silence)) { return(true); } if (!DeepDungeonManager.PortalActive) { await UsePomander(Pomander.Strength, Auras.Strength); await UsePomander(Pomander.Steel, Auras.Steel); var lust = false; var itm = DeepDungeonManager.GetInventoryItem(Pomander.Lust); Logger.Info("[LUST] Item Count: {0}", itm.Count); //we are inside the dungeon, should be ok to use InParty here. if (PartyManager.IsInParty) { Logger.Info("In A Party. Doing Lust Logic..."); var lustFound = false; foreach (var k in PartyManager.AllMembers) { if (!k.Class.IsHealer() && !k.Class.IsTank()) { lustFound = true; if (k.IsMe) { lust = true; } break; } } Logger.Info("Party Lust status: {0} :: {1} :: {2}", !lust, !lustFound, PartyManager.IsPartyLeader); if (!lust && !lustFound) { lust = PartyManager.IsPartyLeader; } } else { Logger.Info("Solo Lust Logic"); lust = true; } if (lust) { Logger.Info("Use Pomander Debug: [HasAura: {0}]", itm.HasAura); await UsePomander(Pomander.Lust, Auras.Lust); } } } else { _runbuf = false; return(await BuffMe()); } return(false); }