Beispiel #1
0
        public static async Task <bool> HealAlliance()
        {
            if (Group.CastableAlliance.Count == 0)
            {
                return(false);
            }

            Group.SwitchCastableToAlliance();
            var res = await DoHeal();

            Group.SwitchCastableToParty();
            return(res);

            async Task <bool> DoHeal()
            {
                if (await Heals.Ascend())
                {
                    return(true);
                }

                if (AstrologianSettings.Instance.HealAllianceOnlyBenefic)
                {
                    return(await Heals.Benefic());
                }

                if (await Heals.EssentialDignity())
                {
                    return(true);
                }
                if (await Heals.Benefic2())
                {
                    return(true);
                }
                if (await Heals.Benefic())
                {
                    return(true);
                }
                return(await Heals.AspectedBenefic());
            }
        }
Beispiel #2
0
 void Start()
 {
     heals    = GetComponent <Heals>();
     maxHeals = heals.maxHeals;
 }
        /// <summary>
        /// Merge data from another participant into this participant.
        /// </summary>
        public void Merge(FightParticipant p, int intervalOffset = 0, int timeOffset = 0)
        {
            OutboundMissCount   += p.OutboundMissCount;
            OutboundHitCount    += p.OutboundHitCount;
            OutboundHitSum      += p.OutboundHitSum;
            OutboundStrikeCount += p.OutboundStrikeCount;

            InboundMissCount  += p.InboundMissCount;
            InboundHitCount   += p.InboundHitCount;
            InboundHitSum     += p.InboundHitSum;
            InboundMeleeCount += p.InboundMeleeCount;
            InboundMeleeSum   += p.InboundMeleeSum;
            InboundRiposteSum += p.InboundRiposteSum;
            //InboundSpellCount += p.InboundSpellCount;
            //InboundSpellSum += p.InboundSpellSum;
            InboundStrikeCount += p.InboundStrikeCount;

            OutboundHealSum    += p.OutboundHealSum;
            InboundHealSum     += p.InboundHealSum;
            InboundFullHealSum += p.InboundFullHealSum;

            DeathCount += p.DeathCount;

            // merge intervals starting at 'intervalOffset' base
            for (var i = 0; i < p.DPS.Count; i++)
            {
                while (DPS.Count <= intervalOffset + i)
                {
                    DPS.Add(0);
                }
                DPS[intervalOffset + i] += p.DPS[i];
            }

            for (var i = 0; i < p.TankDPS.Count; i++)
            {
                while (TankDPS.Count <= intervalOffset + i)
                {
                    TankDPS.Add(0);
                }
                TankDPS[intervalOffset + i] += p.TankDPS[i];
            }

            for (var i = 0; i < p.HPS.Count; i++)
            {
                while (HPS.Count <= intervalOffset + i)
                {
                    HPS.Add(0);
                }
                HPS[intervalOffset + i] += p.HPS[i];
            }

            for (var i = 0; i < p.InboundHPS.Count; i++)
            {
                while (InboundHPS.Count <= intervalOffset + i)
                {
                    InboundHPS.Add(0);
                }
                InboundHPS[intervalOffset + i] += p.InboundHPS[i];
            }


            foreach (var at in p.AttackTypes)
            {
                var _at = AttackTypes.FirstOrDefault(x => x.Type == at.Type);
                if (_at == null)
                {
                    _at      = new FightHit();
                    _at.Type = at.Type;
                    AttackTypes.Add(_at);
                }
                _at.Merge(at);
            }

            foreach (var dt in p.DefenseTypes)
            {
                var _dt = DefenseTypes.FirstOrDefault(x => x.Type == dt.Type);
                if (_dt == null)
                {
                    _dt      = new FightMiss();
                    _dt.Type = dt.Type;
                    DefenseTypes.Add(_dt);
                }
                _dt.Merge(dt);
            }

            foreach (var h in p.Heals)
            {
                var _h = Heals.FirstOrDefault(x => x.Target == h.Target);
                if (_h == null)
                {
                    _h        = new FightHeal();
                    _h.Target = h.Target;
                    Heals.Add(_h);
                }
                _h.Merge(h);
            }

            foreach (var s in p.Spells)
            {
                var _s = Spells.FirstOrDefault(x => x.Name == s.Name && x.Type == s.Type);
                if (_s == null)
                {
                    _s      = new FightSpell();
                    _s.Type = s.Type;
                    _s.Name = s.Name;
                    //_s.Times =  // todo
                    Spells.Add(_s);
                }
                _s.Merge(s);
            }

            // disabled - merging buffs will create duplicates if fights overlap and include the same buff
            // it would be better to recreate buffs after merging
            p.Buffs.Clear();

            // >= 0 avoids any pre fight buffs
            //foreach (var b in p.Buffs.Where(x => x.Time >= 0))
            //{
            //    if (timeOffset == 0)
            //        Buffs.Add(b);
            //    else
            //        Buffs.Add(new FightBuff { Name = b.Name, Time = b.Time + timeOffset });
            //}
        }
        public void AddHeal(LogHealEvent heal, int interval = -1)
        {
            if (FirstAction == null)
            {
                FirstAction = heal.Timestamp;
            }
            LastAction = heal.Timestamp;

            // promised heals appear as self heals
            // we may want to ignore them for self healing stats
            //var promised = heal.Source == Name && heal.Target == Name && heal.Spell != null && heal.Spell.StartsWith("Promised");

            //if (heal.Source == Name && heal.Target == Name)
            //{
            //    SelfHealSum += heal.Amount;
            //}

            if (heal.Source == Name)
            {
                OutboundHealSum     += heal.Amount;
                OutboundFullHealSum += heal.FullAmount;

                var h = Heals.FirstOrDefault(x => x.Target == heal.Target);
                if (h == null)
                {
                    h        = new FightHeal();
                    h.Target = heal.Target;
                    Heals.Add(h);
                }
                h.HitCount   += 1;
                h.HitSum     += heal.Amount;
                h.FullHitSum += heal.FullAmount;

                // should we label unknown heals as lifetap or unknown?
                var spell = AddSpell(heal.Spell ?? "Lifetap", "heal");
                spell.HitCount   += 1;
                spell.HitSum     += heal.Amount;
                spell.FullHitSum += heal.FullAmount;

                if (heal.Mod.HasFlag(LogEventMod.Critical))
                {
                    spell.CritCount += 1;
                    spell.CritSum   += heal.Amount;
                }

                if (heal.Mod.HasFlag(LogEventMod.Twincast))
                {
                    spell.TwinCount += 1;
                }

                if (interval >= 0)
                {
                    while (HPS.Count <= interval)
                    {
                        HPS.Add(0);
                    }
                    HPS[interval] += heal.Amount;
                }
            }

            if (heal.Target == Name)
            {
                InboundHealSum     += heal.Amount;
                InboundFullHealSum += heal.FullAmount;

                if (interval >= 0)
                {
                    while (InboundHPS.Count <= interval)
                    {
                        InboundHPS.Add(0);
                    }
                    InboundHPS[interval] += heal.Amount;
                }
            }
        }
Beispiel #5
0
        public static void AddAllToMenu()
        {
            var mySpells = AbilityMain.Me.Spellbook.Spells.Where(x => AbilityDatabase.Find(x.Name) != null);
            var myItems  = AbilityMain.Me.Inventory.Items;
            var spells   = mySpells as Ability[] ?? mySpells.ToArray();
            var myItems1 = myItems as Item[] ?? myItems.ToArray();
            var blink    = myItems1.FirstOrDefault(x => x.Name == "item_blink");

            MyAbilities.SoulRing = myItems1.FirstOrDefault(x => x.Name == "item_soul_ring");
            if (blink != null)
            {
                MyAbilities.Blink = blink;
                RangeDrawing.AddRange(blink);
            }

            Nukes.AddAllNukes(spells, myItems1);
            Disables.AddAllDisables(spells, myItems1);
            Slows.AddAllSlows(spells, myItems1);
            Buffs.AddAllBuffs(spells, myItems1);
            Harrases.AddAllHarrases(spells, myItems1);
            Silences.AddAllSilences(spells, myItems1);
            Specials.AddAllSpecials(spells, myItems1);
            Heals.AddAllHeals(spells, myItems1);
            Shields.AddAllShields(spells, myItems1);
            MainMenu.Menu.AddSubMenu(MainMenu.AbilitiesMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.DamageIndicatorMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.GankDamageMenu);
            MainMenu.GankDamageMenu.AddItem(new MenuItem("enableGankDamage", "Enable: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageAllies", "Enable for allies: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageEnemies", "Enable for enemies: ").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawDamage", "Draw Damage").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawHits", "Draw hits").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorTextSize", "Increase text size").SetValue(new Slider(0, 0, 5)));
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.AbilityOverlayMenu);
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("spellOverlay", "SPELLS OVERLAY:").SetFontStyle(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderSpell", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("itemOverlay", "ITEMS OVERLAY:").SetFontStyle(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderItem", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("unfinishedFeature", "This feature is currently unfinished!"))
            .SetFontStyle(fontColor: Color.OrangeRed)
            .SetTooltip("Contains unfinished stuff, not all combos are tweaked/in right order.");
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityKey1", "Combo Key"))
            .SetValue(new KeyBind('G', KeyBindType.Press));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityComboType", "Combo Order"))
            .SetValue(new StringList(new[] { "Normal", "Maximum Disable", "Maximum Damage" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.Mode", "Move mode"))
            .SetValue(new StringList(new[] { "Orbwalk", "Move to mouse", "Attack target", "Do nothing" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.NoMoveRange", "No move range"))
            .SetValue(new Slider(0, 0, 300))
            .SetTooltip("Your hero will not move if you put your mouse near your hero in the selected range");
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.Target", "Target selection"))
            .SetValue(new StringList(new[] { "ClosestToMouse", "FastestKillable" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.TargetLock", "Target lock"))
            .SetValue(new StringList(new[] { "None", "WhenTheyGoToFog", "WhenKeyIsPressed" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("comboAbilitiesToggler", "Abilities in combo: "))
            .SetValue(new AbilityToggler(new Dictionary <string, bool>()));

            foreach (var spell in
                     from spell in spells
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                (data != null &&
                                 (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                  data.IsSlow || data.IsSilence)) || spell.Name == "tinker_rearm"
                                select spell)
            {
                var dv = spell.AbilityType != AbilityType.Ultimate || spell.Name == "templar_assassin_psionic_trap";
                if (NameManager.Name(spell) == "tinker_rearm")
                {
                    MyAbilities.TinkerRearm = spell;
                }

                ComboMenu.AddAbility(spell.Name, dv);
            }

            foreach (var spell in
                     from spell in myItems1
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                data != null &&
                                (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                 data.IsSlow || data.IsSilence)
                                select spell)
            {
                ComboMenu.AddAbility(spell.Name);
            }

            // if (blink != null)
            // {
            // MainMenu.ComboKeysMenu.Item("comboAbilitiesToggler").GetValue<AbilityToggler>().Add(blink.Name);
            // }
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.ComboKeysMenu);
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.DrawingsMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.OptionsMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.RangeDrawingMenu);
        }
Beispiel #6
0
        public static void AddAllToMenu()
        {
            var mySpells = AbilityMain.Me.Spellbook.Spells.Where(x => AbilityDatabase.Find(x.Name) != null);
            var myItems  = AbilityMain.Me.Inventory.Items;
            var spells   = mySpells as Ability[] ?? mySpells.ToArray();
            var myItems1 = myItems as Item[] ?? myItems.ToArray();
            var blink    = myItems1.FirstOrDefault(x => x.Name == "item_blink");

            MyAbilities.SoulRing = myItems1.FirstOrDefault(x => x.Name == "item_soul_ring");
            if (blink != null)
            {
                MyAbilities.Blink = blink;
                BlinkMenu.Create(blink);
            }
            Nukes.AddAllNukes(spells, myItems1);
            Disables.AddAllDisables(spells, myItems1);
            Slows.AddAllSlows(spells, myItems1);
            Buffs.AddAllBuffs(spells, myItems1);
            Harrases.AddAllHarrases(spells, myItems1);
            Silences.AddAllSilences(spells, myItems1);
            Specials.AddAllSpecials(spells, myItems1);
            Heals.AddAllHeals(spells, myItems1);
            Shields.AddAllShields(spells, myItems1);
            MainMenu.Menu.AddSubMenu(MainMenu.AbilitiesMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.DamageIndicatorMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.GankDamageMenu);
            MainMenu.GankDamageMenu.AddItem(new MenuItem("enableGankDamage", "Enable: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageAllies", "Enable for allies: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageEnemies", "Enable for enemies: ").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawDamage", "Draw Damage").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawHits", "Draw hits").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorTextSize", "Increase text size").SetValue(new Slider(0, 0, 5)));
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.AbilityOverlayMenu);
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("spellOverlay", "SPELLS OVERLAY:").SetFontStyle(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderSpell", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("itemOverlay", "ITEMS OVERLAY:").SetFontStyle(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderItem", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("unfinishedFeature", "This feature is currently unfinished!"))
            .SetFontStyle(fontColor: Color.OrangeRed)
            .SetTooltip("Contains unfinished stuff, not all combos are tweaked/in right order.");
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityKey1", "Combo Key"))
            .SetValue(new KeyBind('G', KeyBindType.Press));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityComboType", "Combo Order"))
            .SetValue(new StringList(new[] { "Normal", "Maximum Disable", "Maximum Damage" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("comboAbilitiesToggler", "Abilities in combo: "))
            .SetValue(new AbilityToggler(new Dictionary <string, bool>()));
            foreach (var spell in
                     from spell in spells
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                data != null &&
                                (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                 data.IsSlow || data.IsSilence)
                                select spell)
            {
                var dv = spell.AbilityType != AbilityType.Ultimate;
                ComboMenu.AddAbility(spell.Name, dv);
            }
            foreach (var spell in
                     from spell in myItems1
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                data != null &&
                                (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                 data.IsSlow || data.IsSilence)
                                select spell)
            {
                ComboMenu.AddAbility(spell.Name);
            }
            //if (blink != null)
            //{
            //    MainMenu.ComboKeysMenu.Item("comboAbilitiesToggler").GetValue<AbilityToggler>().Add(blink.Name);
            //}
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.ComboKeysMenu);
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.DrawingsMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.OptionsMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.RangeDrawingMenu);
        }
Beispiel #7
0
        public static async Task <bool> Heal()
        {
            if (WorldManager.InSanctuary)
            {
                return(false);
            }

            if (Core.Me.IsMounted)
            {
                return(false);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Heals.Ascend())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }

            if ((AstrologianSettings.Instance.WeaveOGCDHeals && GlobalCooldown.CanWeave(1)) || Casting.LastSpellTimeFinishAge.ElapsedMilliseconds > Spells.Malefic.AdjustedCooldown.TotalMilliseconds || !Casting.LastSpellTimeFinishAge.IsRunning)
            {
                if (await Heals.EssentialDignity())
                {
                    return(true);
                }
                if (await Buff.LucidDreaming())
                {
                    return(true);
                }
                if (await Buff.Lightspeed())
                {
                    return(true);
                }
                if (await Buff.NeutralSect())
                {
                    return(true);
                }
            }

            if (Globals.InActiveDuty || Core.Me.InCombat)
            {
                if ((AstrologianSettings.Instance.WeaveOGCDHeals && GlobalCooldown.CanWeave(1)) || Casting.LastSpellTimeFinishAge.ElapsedMilliseconds > Spells.Malefic.AdjustedCooldown.TotalMilliseconds || !Casting.LastSpellTimeFinishAge.IsRunning)
                {
                    if (await Heals.EssentialDignity())
                    {
                        return(true);
                    }
                    if (await Heals.CelestialIntersection())
                    {
                        return(true);
                    }
                    if (await Heals.Macrocosmos())
                    {
                        return(true);
                    }
                    if (await Heals.CelestialOpposition())
                    {
                        return(true);
                    }
                    if (await Heals.LadyOfCrowns())
                    {
                        return(true);
                    }
                    if (await Heals.Horoscope())
                    {
                        return(true);
                    }
                    if (await Heals.HoroscopePop())
                    {
                        return(true);
                    }
                    if (await Heals.Exaltation())
                    {
                        return(true);
                    }
                    if (await Heals.CollectiveUnconscious())
                    {
                        return(true);
                    }
                    if (await Buff.Synastry())
                    {
                        return(true);
                    }
                }

                if (await Heals.AspectedHelios())
                {
                    return(true);
                }
                if (await Heals.Helios())
                {
                    return(true);
                }
                if (await Heals.Benefic2())
                {
                    return(true);
                }
                if (await Heals.Benefic())
                {
                    return(true);
                }
                if (await Heals.AspectedBenefic())
                {
                    return(true);
                }
                if (await Heals.EarthlyStar())
                {
                    return(true);
                }
                if (await Heals.DontLetTheDrkDie())
                {
                    return(true);
                }
            }

            return(await HealAlliance());
        }
        public static void AddAllToMenu()
        {
            var mySpells = AbilityMain.Me.Spellbook.Spells.Where(x => AbilityDatabase.Find(x.Name) != null);
            var myItems  = AbilityMain.Me.Inventory.Items;
            var spells   = mySpells as Ability[] ?? mySpells.ToArray();
            var myItems1 = myItems as Item[] ?? myItems.ToArray();
            var blink    = myItems1.FirstOrDefault(x => x.Name == "item_blink")
                           ?? spells.FirstOrDefault(x => x.Name == "antimage_blink" || x.Name == "queenofpain_blink");

            MyAbilities.SoulRing         = myItems1.FirstOrDefault(x => x.Name == "item_soul_ring");
            MyAbilities.ForceStaff       = myItems1.FirstOrDefault(x => x.Name == "item_force_staff");
            MyAbilities.ChargeOfDarkness = spells.FirstOrDefault(x => x.Name == "spirit_breaker_charge_of_darkness");
            MyAbilities.InvokerInvoke    = AbilityMain.Me.Spellbook.Spells.FirstOrDefault(x => x.Name == "invoker_invoke");
            MyAbilities.InvokerQ         = AbilityMain.Me.Spellbook.Spells.FirstOrDefault(x => x.Name == "invoker_quas");
            MyAbilities.InvokerW         = AbilityMain.Me.Spellbook.Spells.FirstOrDefault(x => x.Name == "invoker_wex");
            MyAbilities.InvokerE         = AbilityMain.Me.Spellbook.Spells.FirstOrDefault(x => x.Name == "invoker_exort");
            MainMenu.Menu.AddItem(new MenuItem("Ability#.EnableAutoKillSteal", "Enable AutoKillSteal:"))
            .SetValue(true)
            .SetFontColor(fontColor: Color.DarkOrange);
            MainMenu.Menu.AddItem(new MenuItem("Ability#.EnableAutoUsage", "Enable AutoUsage:"))
            .SetValue(true)
            .SetFontColor(fontColor: Color.DarkOrange);
            Nukes.AddAllNukes(spells, myItems1);
            Disables.AddAllDisables(spells, myItems1);
            Slows.AddAllSlows(spells, myItems1);
            Buffs.AddAllBuffs(spells, myItems1);
            Harrases.AddAllHarrases(spells, myItems1);
            Silences.AddAllSilences(spells, myItems1);
            Specials.AddAllSpecials(spells, myItems1);
            Heals.AddAllHeals(spells, myItems1);
            Shields.AddAllShields(spells, myItems1);
            MainMenu.Menu.AddSubMenu(MainMenu.AbilitiesMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.DamageIndicatorMenu);
            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.GankDamageMenu);
            MainMenu.GankDamageMenu.AddItem(new MenuItem("enableGankDamage", "Enable: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageAllies", "Enable for allies: ").SetValue(true));
            MainMenu.GankDamageMenu.AddItem(
                new MenuItem("enableGankDamageEnemies", "Enable for enemies: ").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawDamage", "Draw Damage").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorDrawHits", "Draw hits").SetValue(true));
            MainMenu.DamageIndicatorMenu.AddItem(
                new MenuItem("abilityDamageIndicatorTextSize", "Increase text size").SetValue(new Slider(0, 0, 5)));

            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.ManaBarMenu);
            MainMenu.ManaBarMenu.AddItem(
                new MenuItem("manaBar", "MANA BAR:").SetFontColor(fontColor: Color.White));
            MainMenu.ManaBarMenu.AddItem(
                new MenuItem("enableManaBar", "Enable Mana Bar: ").SetValue(true));

            MainMenu.DrawingsMenu.AddSubMenu(MainMenu.AbilityOverlayMenu);
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("spellOverlay", "SPELLS OVERLAY:").SetFontColor(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableSpellOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderSpell", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("ExtraPosSliderSpellX", "Extra Pos X: ").SetValue(new Slider(0, -400, 400)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("ExtraPosSliderSpellY", "Extra Pos Y: ").SetValue(new Slider(0, -400, 400)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("itemOverlay", "ITEMS OVERLAY:").SetFontColor(fontColor: Color.White));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayEnemy", "Enable for enemies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("enableItemOverlayAlly", "Enable for allies: ").SetValue(true));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("sizeSliderItem", "Increase the size: ").SetValue(new Slider(0, 0, 25)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("ExtraPosSliderItemX", "Extra Pos X: ").SetValue(new Slider(0, -400, 400)));
            MainMenu.AbilityOverlayMenu.AddItem(
                new MenuItem("ExtraPosSliderItemY", "Extra Pos Y: ").SetValue(new Slider(0, -400, 400)));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("unfinishedFeature", "This feature is currently unfinished!"))
            .SetFontColor(fontColor: Color.OrangeRed)
            .SetTooltip("Contains unfinished stuff, not all combos are tweaked/in right order.");
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityKey1", "Combo Key"))
            .SetValue(new KeyBind('G', KeyBindType.Press));
            var priorityChanger =
                new MenuItem("Ability#.ComboOrder", "Custom Order: ").SetValue(
                    new PriorityChanger(new List <string>(), "Ability#.ComboOrder")).SetFontColor(fontColor: Color.Gray);

            MainMenu.ComboKeysMenu.AddItem(new MenuItem("abilityComboType", "Combo Order"))
            .SetValue(new StringList(new[] { "Normal", "Maximum Disable", "Maximum Damage", "Custom" }))
            .ValueChanged +=
                (sender, args) =>
            {
                priorityChanger.SetFontColor(
                    fontColor: args.GetNewValue <StringList>().SelectedIndex == 3 ? Color.Green : Color.Gray);
            };

            if (MainMenu.ComboKeysMenu.Item("abilityComboType").GetValue <StringList>().SelectedIndex == 3)
            {
                priorityChanger.SetFontColor(fontColor: Color.Green);
            }

            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.Mode", "Move mode"))
            .SetValue(new StringList(new[] { "Orbwalk", "Move to mouse", "Attack target", "Do nothing" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.NoMoveRange", "No move range"))
            .SetValue(new Slider(0, 0, 300))
            .SetTooltip("Your hero will not move if you put your mouse near your hero in the selected range");
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.Target", "Target selection"))
            .SetValue(new StringList(new[] { "ClosestToMouse", "FastestKillable" }));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("Ability.KeyCombo.TargetLock", "Target lock"))
            .SetValue(new StringList(new[] { "None", "WhenTheyGoToFog", "WhenKeyIsPressed" }));
            MainMenu.ComboKeysMenu.AddItem(
                new MenuItem("Ability#.MaximizeDamage", "Maximize damage (beta feature)").SetValue(false)
                .SetFontColor(fontColor: Color.Aqua)
                .SetTooltip(
                    "Enabling this option will make sure that all damage/damage amplifying abilities are used right away"));
            MainMenu.ComboKeysMenu.AddItem(new MenuItem("comboAbilitiesToggler", "Abilities in combo: "))
            .SetValue(new AbilityToggler(new Dictionary <string, bool>()));
            MainMenu.ComboKeysMenu.AddItem(priorityChanger);

            foreach (var spell in
                     from spell in AbilityMain.Me.Spellbook.Spells
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                (data != null &&
                                 (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                  data.IsSlow || data.IsSilence)) || spell.Name == "tinker_rearm" ||
                                spell.StoredName() == "invoker_emp" || spell.StoredName() == "invoker_forge_spirit" ||
                                spell.StoredName() == "invoker_chaos_meteor" ||
                                spell.StoredName() == "skywrath_mage_mystic_flare"
                                select spell)
            {
                var dv = spell.AbilityType != AbilityType.Ultimate || spell.Name == "templar_assassin_psionic_trap";
                if (NameManager.Name(spell) == "tinker_rearm")
                {
                    MyAbilities.TinkerRearm = spell;
                }

                ComboMenu.AddAbility(spell.Name, spell, dv);
            }

            foreach (var spell in
                     from spell in myItems1
                     let data = AbilityDatabase.Find(spell.Name)
                                where
                                data != null &&
                                (data.IsNuke || data.IsDisable || data.IsHarras || data.IsBuff || data.WeakensEnemy ||
                                 data.IsSlow || data.IsSilence)
                                select spell)
            {
                if (NameManager.Name(spell) == "item_cyclone")
                {
                    MyAbilities.Cyclone = spell;
                }

                ComboMenu.AddAbility(spell.Name, spell);
            }

            if (blink != null)
            {
                MyAbilities.Blink = blink;
                RangeDrawing.AddRange(blink);
                ComboMenu.AddAbility(blink.StoredName(), blink);
            }

            // if (blink != null)
            // {
            // MainMenu.ComboKeysMenu.Item("comboAbilitiesToggler").GetValue<AbilityToggler>().Add(blink.Name);
            // }
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.ComboKeysMenu);
            MainMenu.OptionsMenu.AddSubMenu(MainMenu.DrawingsMenu);
            MainMenu.BlinkMenu.AddItem(
                new MenuItem("Ability#.BlinkRange", "BlinkPosition distance from target").SetValue(
                    new Slider(0, 0, 700)));
            MainMenu.BlinkMenu.AddItem(
                new MenuItem("Ability#.BlinkMaxEnemiesAround", "Maximum enemies around target to use blink").SetValue(
                    new Slider(2, 0, 3)))
            .SetTooltip("If theres more enemies around then specified value, blink will not be used");
            if (AbilityMain.Me.ClassId == ClassId.CDOTA_Unit_Hero_Invoker)
            {
                MainMenu.OptionsMenu.AddSubMenu(MainMenu.InvokerMenu);
                MainMenu.InvokerMenu.AddItem(
                    new MenuItem("Ability#.InvokerInvoke", "Enable AutoInvoke").SetValue(false));
            }

            MainMenu.OptionsMenu.AddSubMenu(MainMenu.BlinkMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.OptionsMenu);
            MainMenu.Menu.AddSubMenu(MainMenu.RangeDrawingMenu);
        }