当前位置: 首页>>代码示例>>C#>>正文


C# AIHeroClient.GetSpell方法代码示例

本文整理汇总了C#中AIHeroClient.GetSpell方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.GetSpell方法的具体用法?C# AIHeroClient.GetSpell怎么用?C# AIHeroClient.GetSpell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.GetSpell方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetHeroAvgDamage

        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(AIHeroClient player, List<AIHeroClient> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.LSGetAutoAttackDamage(s) * 2));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.Q) : 0f)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.W) : 0f)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.E) : 0f)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.R) : 0f)));

            var itemsDamage = 0f;

            foreach (var item in player.InventoryItems)
            {
                foreach (var hero in Enemies)
                {
                    var itemID = item.Id;
                    switch (itemID)
                    {
                        case ItemId.Bilgewater_Cutlass:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
                            break;
                        case ItemId.Blade_of_the_Ruined_King:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Botrk);
                            break;
                        case ItemId.Hextech_Gunblade:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Hexgun);
                            break;
                        case ItemId.Frost_Queens_Claim:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.FrostQueenClaim);
                            break;
                        case ItemId.Tiamat_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Tiamat)
                                : 0f;
                            break;
                        case ItemId.Ravenous_Hydra_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Hydra)
                                : 0f;
                            break;
                        case ItemId.Liandrys_Torment:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.LiandrysTorment);
                            break;
                    }
                }

            }

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage + itemsDamage;

            return (float) totalDamage / totalEnemies;
        }
开发者ID:CONANLXF,项目名称:AIO,代码行数:65,代码来源:TFHelperCalculator.cs

示例2: Game_OnGameLoad

        public static void Game_OnGameLoad()
        {
            _player = ObjectManager.Player;

            if (_player.ChampionName != ChampionName) return;

            _q = new Spell(SpellSlot.Q, 950F);
            _w = new Spell(SpellSlot.W, 950f);
            _e = new Spell(SpellSlot.E, 450f);
            _r = new Spell(SpellSlot.R, 1500f);

            _q.SetSkillshot(0.25f, 60f, 2000f, false, SkillshotType.SkillshotLine);
            _w.SetSkillshot(0.35f, 150f, 1650f, false, SkillshotType.SkillshotCircle);
            _r.SetSkillshot(0.25f, 100f, 2100f, false, SkillshotType.SkillshotLine);

            _youmuu = new Items.Item(3142, 10);
            _bilge = new Items.Item(3144, 450f);
            _blade = new Items.Item(3153, 450f);

            if (_player.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner1, 570f);
                _smiteSlot = SpellSlot.Summoner1;
            }
            else if (_player.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner2, 570f);
                _smiteSlot = SpellSlot.Summoner2;
            }

            Menu = MainMenu.AddMenu("D-Graves", "D-Graves");

            comboMenu = Menu.AddSubMenu("Combo", "Combo");
            comboMenu.Add("smitecombo", new CheckBox("Use Smite in target"));
            comboMenu.Add("UseQC", new CheckBox("Use Q"));
            comboMenu.Add("UseWC", new CheckBox("Use W"));
            comboMenu.Add("UseEC", new CheckBox("Use E"));
            comboMenu.Add("UseRC", new CheckBox("Use R"));
            comboMenu.Add("UseEreload", new CheckBox("Use E to Reload"));
            comboMenu.Add("UseRE", new CheckBox("Use R if hits X enemies"));
            comboMenu.Add("MinTargets", new Slider("Use R if Hit Enemys >=", 2, 1, 5));
            comboMenu.Add("useRaim", new KeyBind("Manual R", false, KeyBind.BindTypes.HoldActive, 'T'));

            itemMenu = Menu.AddSubMenu("Items", "items");
            itemMenu.Add("Youmuu", new CheckBox("Use Youmuu's"));
            itemMenu.AddSeparator();
            itemMenu.Add("Bilge", new CheckBox("Use Bilge"));
            itemMenu.Add("BilgeEnemyhp", new Slider("If Enemy Hp <", 85, 1, 100));
            itemMenu.Add("Bilgemyhp", new Slider("Or Your Hp <", 85, 1, 100));
            itemMenu.Add("Blade", new CheckBox("Use Bork"));
            itemMenu.Add("BladeEnemyhp", new Slider("If Enemy Hp <", 85, 1, 100));
            itemMenu.Add("Blademyhp", new Slider("Or Your Hp <", 85, 1, 100));
            itemMenu.AddLabel("Deffensive Items");
            itemMenu.AddSeparator();
            itemMenu.Add("useqss", new CheckBox("Use QSS/Mercurial Scimitar/Dervish Blade"));
            itemMenu.Add("blind", new CheckBox("Blind"));
            itemMenu.Add("charm", new CheckBox("Charm"));
            itemMenu.Add("fear", new CheckBox("Fear"));
            itemMenu.Add("flee", new CheckBox("Flee"));
            itemMenu.Add("taunt", new CheckBox("Taunt"));
            itemMenu.Add("snare", new CheckBox("Snare"));
            itemMenu.Add("suppression", new CheckBox("Suppression"));
            itemMenu.Add("stun", new CheckBox("Stun"));
            itemMenu.Add("polymorph", new CheckBox("Polymorph"));
            itemMenu.Add("silence", new CheckBox("Silence"));
            itemMenu.Add("Cleansemode", new ComboBox("Use Cleanse", 1, "Always", "In Combo"));
            itemMenu.AddLabel("Potions");
            itemMenu.AddSeparator();
            itemMenu.Add("usehppotions", new CheckBox("Use Healt potion/Refillable/Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionhp", new Slider("If Health % <", 35, 1, 100));
            itemMenu.Add("usemppotions", new CheckBox("Use Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionmp", new Slider("If Mana % <", 35, 1, 100));

            harassMenu = Menu.AddSubMenu("Harass", "Harass");
            harassMenu.Add("UseQH", new CheckBox("Use Q"));
            harassMenu.Add("UseWH", new CheckBox("Use W"));
            harassMenu.Add("Harrasmana", new Slider("Minimum Mana", 60, 1, 100));
            harassMenu.Add("harasstoggle", new KeyBind("AutoHarass (toggle)", false, KeyBind.BindTypes.HoldActive, 'L'));

            lasthitMenu = Menu.AddSubMenu("LastHit", "LastHit");
            lasthitMenu.Add("UseQLH", new CheckBox("Q LastHit"));
            lasthitMenu.Add("UseWLH", new CheckBox("W LastHit"));
            lasthitMenu.Add("Lastmana", new Slider("Minimum Mana", 60, 1, 100));

            clearMenu = Menu.AddSubMenu("LaneClear", "LaneClear");
            clearMenu.Add("UseQL", new CheckBox("Q LaneClear"));
            clearMenu.Add("minminions", new Slider("Minimum minions to use Q", 3, 1, 6));
            clearMenu.Add("UseWL", new CheckBox("W LaneClear", false));
            clearMenu.Add("minminionsw", new Slider("Minimum minions to use W", 3, 1, 5));
            clearMenu.Add("Lanemana", new Slider("Minimum Mana", 60, 1, 100));

            jungleMenu = Menu.AddSubMenu("JungleClear", "JungleClear");
            jungleMenu.Add("UseQJ", new CheckBox("Q Jungle"));
            jungleMenu.Add("UseWJ", new CheckBox("W Jungle"));
            jungleMenu.Add("Junglemana", new Slider("Minimum Mana", 60, 1, 100));

            smiteMenu = Menu.AddSubMenu("Smite", "Smite");
            smiteMenu.Add("Usesmite", new KeyBind("Use Smite(toggle)", false, KeyBind.BindTypes.PressToggle, 'N'));
            smiteMenu.Add("Useblue", new CheckBox("Smite Blue Early"));
            smiteMenu.Add("manaJ", new Slider("Smite Blue Early if MP% <", 30, 1, 100));
//.........这里部分代码省略.........
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:101,代码来源:Program.cs

示例3: Game_OnGameLoad

        public static void Game_OnGameLoad()
        {
            _player = ObjectManager.Player;
            if (_player.ChampionName != ChampionName) return;

            _humanQ = new Spell(SpellSlot.Q, 625f);
            _humanW = new Spell(SpellSlot.W, 950f);
            _humanE = new Spell(SpellSlot.E, 1075f);
            _spiderQ = new Spell(SpellSlot.Q, 475f);
            _spiderW = new Spell(SpellSlot.W, 0);
            _spiderE = new Spell(SpellSlot.E, 750f);
            _r = new Spell(SpellSlot.R, 0);

            _humanW.SetSkillshot(0.75f, 100f, 5000, true, SkillshotType.SkillshotLine);
            _humanE.SetSkillshot(0.5f, 55f, 1450, true, SkillshotType.SkillshotLine);

            _bilge = new Items.Item(3144, 475f);
            _blade = new Items.Item(3153, 425f);
            _hydra = new Items.Item(3074, 250f);
            _tiamat = new Items.Item(3077, 250f);
            _rand = new Items.Item(3143, 490f);
            _lotis = new Items.Item(3190, 590f);
            _zhonya = new Items.Item(3157, 10);

            if (_player.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner1, 570f);
                _smiteSlot = SpellSlot.Summoner1;
            }
            else if (_player.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner2, 570f);
                _smiteSlot = SpellSlot.Summoner2;
            }

            _igniteSlot = _player.GetSpellSlot("SummonerDot");

            Menu = MainMenu.AddMenu("D-Elise", "D-Elise");

            comboMenu = Menu.AddSubMenu("Combo", "Combo");
            comboMenu.Add("UseHumanQ", new CheckBox("Human Q"));
            comboMenu.Add("UseHumanW", new CheckBox("Human W"));
            comboMenu.Add("UseHumanE", new CheckBox("Human E"));
            comboMenu.Add("UseRCombo", new CheckBox("Auto use R"));
            comboMenu.Add("UseSpiderQ", new CheckBox("Spider Q"));
            comboMenu.Add("UseSpiderW", new CheckBox("Spider W"));
            comboMenu.Add("UseSpiderE", new CheckBox("Spider E"));

            harassMenu = Menu.AddSubMenu("Harass", "Harass");
            harassMenu.Add("UseQHarass", new CheckBox("Human Q"));
            harassMenu.Add("UseWHarass", new CheckBox("Human W"));
            harassMenu.Add("Harrasmana", new Slider("Minimum Mana", 60, 1, 100));

            itemMenu = Menu.AddSubMenu("Items", "items");
            itemMenu.Add("Youmuu", new CheckBox("Use Youmuu's"));
            itemMenu.AddSeparator();
            itemMenu.Add("Bilge", new CheckBox("Use Bilge"));
            itemMenu.Add("BilgeEnemyhp", new Slider("If Enemy Hp <", 85, 1, 100));
            itemMenu.Add("Bilgemyhp", new Slider("Or Your Hp <", 85, 1, 100));
            itemMenu.Add("Blade", new CheckBox("Use Bork"));
            itemMenu.Add("BladeEnemyhp", new Slider("If Enemy Hp <", 85, 1, 100));
            itemMenu.Add("Blademyhp", new Slider("Or Your Hp <", 85, 1, 100));
            itemMenu.Add("Hextech", new CheckBox("Hextech Gunblade"));
            itemMenu.Add("HextechEnemyhp", new Slider("If Enemy Hp <", 85, 1, 100));
            itemMenu.Add("Hextechmyhp", new Slider("Or Your Hp <", 85, 1, 100));
            itemMenu.AddLabel("Deffensive Items");
            itemMenu.AddSeparator();
            itemMenu.Add("Omen", new CheckBox("Use Randuin Omen"));
            itemMenu.Add("Omenenemys", new Slider("Randuin if enemys>", 2, 1, 5));
            itemMenu.Add("Zhonyas", new CheckBox("Use Zhonya's"));
            itemMenu.Add("Zhonyashp", new Slider("Use Zhonya's if HP%<", 20, 1, 100));
            itemMenu.Add("useqss", new CheckBox("Use QSS/Mercurial Scimitar/Dervish Blade"));
            itemMenu.Add("blind", new CheckBox("Blind"));
            itemMenu.Add("charm", new CheckBox("Charm"));
            itemMenu.Add("fear", new CheckBox("Fear"));
            itemMenu.Add("flee", new CheckBox("Flee"));
            itemMenu.Add("taunt", new CheckBox("Taunt"));
            itemMenu.Add("snare", new CheckBox("Snare"));
            itemMenu.Add("suppression", new CheckBox("Suppression"));
            itemMenu.Add("stun", new CheckBox("Stun"));
            itemMenu.Add("polymorph", new CheckBox("Polymorph"));
            itemMenu.Add("silence", new CheckBox("Silence"));
            itemMenu.Add("Cleansemode", new ComboBox("Use Cleanse", 1, "Always", "In Combo"));
            itemMenu.AddLabel("Potions");
            itemMenu.AddSeparator();
            itemMenu.Add("usehppotions", new CheckBox("Use Healt potion/Refillable/Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionhp", new Slider("If Health % <", 35, 1, 100));
            itemMenu.Add("usemppotions", new CheckBox("Use Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionmp", new Slider("If Mana % <", 35, 1, 100));

            clearMenu = Menu.AddSubMenu("Farm", "Farm");
            clearMenu.Add("HumanQFarm", new CheckBox("Human Q"));
            clearMenu.Add("HumanWFarm", new CheckBox("Human W"));
            clearMenu.Add("SpiderQFarm", new CheckBox("Spider Q", false));
            clearMenu.Add("SpiderWFarm", new CheckBox("Spider W"));
            clearMenu.Add("Farm_R", new KeyBind("Auto Switch (toggle)", false, KeyBind.BindTypes.PressToggle, 'L'));
            clearMenu.Add("Lanemana", new Slider("Minimum Mana", 60, 1, 100));

            jungleMenu = Menu.AddSubMenu("Jungle", "Jungle");
            jungleMenu.Add("HumanQFarmJ", new CheckBox("Human Q"));
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例4: Game_OnGameLoad

        public static void Game_OnGameLoad()
        {
            _player = ObjectManager.Player;
            if (ObjectManager.Player.ChampionName != ChampionName)
            {
                Chat.Print("Please use Kayle~");
                return;
            }

            _q = new Spell(SpellSlot.Q, 650f);
            _w = new Spell(SpellSlot.W, 900f);
            _e = new Spell(SpellSlot.E, 675f);
            _r = new Spell(SpellSlot.R, 900f);

            if (_player.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner1, 570f);
                _smiteSlot = SpellSlot.Summoner1;
            }
            else if (_player.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
            {
                _smite = new Spell(SpellSlot.Summoner2, 570f);
                _smiteSlot = SpellSlot.Summoner2;
            }

            SpellList.Add(_q);
            SpellList.Add(_w);
            SpellList.Add(_e);
            SpellList.Add(_r);

            _rand = new Items.Item(3143, 490f);
            _lotis = new Items.Item(3190, 590f);
            _frostqueen = new Items.Item(3092, 800f);
            _mikael = new Items.Item(3222, 600f);

            _igniteSlot = _player.GetSpellSlot("SummonerDot");

            _config = MainMenu.AddMenu("D-Kayle", "D-Kayle");

            comboMenu = _config.AddSubMenu("Combo", "Combo");
            comboMenu.Add("UseIgnitecombo", new CheckBox("Use Ignite", true));
            comboMenu.Add("smitecombo", new CheckBox("Use Smite in target", true));
            comboMenu.Add("UseQCombo", new CheckBox("Use Q", true));
            comboMenu.Add("UseWCombo", new CheckBox("Use W", true));
            comboMenu.Add("UseECombo", new CheckBox("Use E", true));

            itemMenu = _config.AddSubMenu("Items", "items");
            itemMenu.Add("frostQ", new CheckBox("Use Frost Queen's"));
            itemMenu.AddSeparator();
            itemMenu.Add("Omen", new CheckBox("Use Randuin Omen"));
            itemMenu.Add("Omenenemys", new Slider("Randuin if enemys >", 2, 1, 5));
            itemMenu.Add("lotis", new CheckBox("Use Iron Solari"));
            itemMenu.Add("lotisminhp", new Slider("Solari if Ally Hp <", 35, 1, 100));
            itemMenu.AddLabel("Cleanse");
            itemMenu.AddSeparator();
            itemMenu.Add("usemikael", new CheckBox("Use Mikael's to remove Debuffs"));
            itemMenu.Add("mikaelusehp", new Slider("Mikael's if Ally Hp <", 35, 1, 100));
            foreach (var hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.IsAlly))
            {
                itemMenu.Add("mikaeluse" + hero.BaseSkinName, new CheckBox(hero.BaseSkinName));

            }
            itemMenu.Add("useqss", new CheckBox("Use QSS/Mercurial Scimitar/Dervish Blade"));
            itemMenu.Add("blind", new CheckBox("Blind"));
            itemMenu.Add("charm", new CheckBox("Charm"));
            itemMenu.Add("fear", new CheckBox("Fear"));
            itemMenu.Add("flee", new CheckBox("Flee"));
            itemMenu.Add("taunt", new CheckBox("Taunt"));
            itemMenu.Add("snare", new CheckBox("Snare"));
            itemMenu.Add("suppression", new CheckBox("Suppression"));
            itemMenu.Add("stun", new CheckBox("Stun"));
            itemMenu.Add("polymorph", new CheckBox("Polymorph"));
            itemMenu.Add("silence", new CheckBox("Silence"));
            itemMenu.Add("Cleansemode", new ComboBox("Use Cleanse", 1, "Always", "In Combo"));
            itemMenu.AddLabel("Potions");
            itemMenu.AddSeparator();
            itemMenu.Add("usehppotions", new CheckBox("Use Healt potion/Refillable/Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionhp", new Slider("If Health % <", 35, 1, 100));
            itemMenu.Add("usemppotions", new CheckBox("Use Hunters/Corrupting/Biscuit"));
            itemMenu.Add("usepotionmp", new Slider("If Mana % <", 35, 1, 100));

            utilityMenu = _config.AddSubMenu("Utilities", "utilities");
            utilityMenu.Add("onmeW", new CheckBox("W Self"));
            utilityMenu.Add("healper", new Slider("Self Health %", 40, 1, 100));
            utilityMenu.Add("onmeR", new CheckBox("R Self Use"));
            utilityMenu.Add("healper", new Slider("Self Health %", 40, 1, 100));
            utilityMenu.AddLabel("Use W Ally");
            utilityMenu.Add("allyW", new CheckBox("W Ally"));
            utilityMenu.Add("allyhealper", new Slider("Ally Health %", 40, 1, 100));
            foreach (var hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.IsAlly && !hero.IsMe))
            {
                utilityMenu.Add("usewally" + hero.BaseSkinName, new CheckBox(hero.BaseSkinName));

            }
            utilityMenu.AddLabel("Use R Ally");
            utilityMenu.Add("allyR", new CheckBox("R Ally"));
            utilityMenu.Add("ultiallyHP", new Slider("Ally Health %", 40, 1, 100));
            foreach (var hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.IsAlly && !hero.IsMe))
            {
                utilityMenu.Add("userally" + hero.BaseSkinName, new CheckBox(hero.BaseSkinName));
//.........这里部分代码省略.........
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:101,代码来源:Program.cs


注:本文中的AIHeroClient.GetSpell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。