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


C# Hero.IsRooted方法代码示例

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


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

示例1: AD


//.........这里部分代码省略.........
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Sniper && e.Spellbook.SpellR.IsInAbilityPhase && angle <= 0.03 && me.Distance2D(e) <= 300)//e.FindSpell("sniper_assassinate").Cooldown > 0 && me.Modifiers.Any(y => y.Name == "modifier_sniper_assassinate"))
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner && e.Spellbook.SpellQ.IsInAbilityPhase && angle <= 0.1 && me.Distance2D(e) <= 400)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Sven && e.Spellbook.SpellQ.IsInAbilityPhase && me.Distance2D(e) <= 300)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_SkeletonKing && e.Spellbook.SpellQ.IsInAbilityPhase && angle <= 0.03 && me.Distance2D(e) <= 300)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_ChaosKnight && e.Spellbook.SpellQ.IsInAbilityPhase && angle <= 0.03 && me.Distance2D(e) <= 300)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_VengefulSpirit && e.Spellbook.SpellQ.IsInAbilityPhase && angle <= 0.03 && me.Distance2D(e) <= 300)
							
							)
						)
					{
						cyclone.UseAbility(e);
						Utils.Sleep(50, e.Handle.ToString());
					}
					
							
					
					
					//cyclone dodge	
					if (Utils.SleepCheck("item_cyclone") && cyclone != null && cyclone.CanBeCasted())
					{
						//use on me
						var mod =
							me.Modifiers.FirstOrDefault(
								x =>
									x.Name == "modifier_lina_laguna_blade" ||
								   
									//x.Name == "modifier_orchid_malevolence_debuff" || 
									//x.Name == "modifier_skywrath_mage_ancient_seal" ||

									x.Name == "modifier_lion_finger_of_death");
							
						if (cyclone != null && cyclone.CanBeCasted() && 
							(mod != null
							|| (me.IsRooted() && !me.Modifiers.Any(y => y.Name == "modifier_razor_unstablecurrent_slow")  )
							//|| e.ClassID == ClassID.CDOTA_Unit_Hero_Zuus && e.FindSpell("zuus_thundergods_wrath").IsInAbilityPhase  //zuus can cancel
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Huskar && IsCasted(e.Spellbook.SpellR) && angle <= 0.15 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 250) //( (e.FindSpell("huskar_life_break").Cooldown >= 3 && e.AghanimState()) || (e.FindSpell("huskar_life_break").Cooldown >= 11 && !e.AghanimState())) && me.Distance2D(e) <= 400)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Juggernaut && e.Modifiers.Any(y => y.Name == "modifier_juggernaut_omnislash") && me.Distance2D(e) <= 300  && !me.IsAttackImmune())// && (ghost == null || !ghost.CanBeCasted()) && (ghost == null || !ghost.CanBeCasted())&& !me.Modifiers.Any(y => y.Name == "modifier_item_ghost_scepter")


							//dodge flying stuns
							|| (e.FindItem("item_ethereal_blade")!=null && IsCasted(e.FindItem("item_ethereal_blade")) && angle <= 0.1 && me.Distance2D(e) < e.FindItem("item_ethereal_blade").GetCastRange() + 250)

							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Sniper && IsCasted(e.Spellbook.SpellR) && me.Distance2D(e) > 300 && me.Modifiers.Any(y => y.Name == "modifier_sniper_assassinate"))//e.FindSpell("sniper_assassinate").Cooldown > 0 && me.Modifiers.Any(y => y.Name == "modifier_sniper_assassinate"))
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Tusk && angle <= 0.35 && e.Modifiers.Any(y => y.Name == "modifier_tusk_snowball_movement") && me.Distance2D(e) <= 575)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Windrunner && IsCasted(e.Spellbook.SpellQ) && angle <= 0.12 && me.Distance2D(e) > 400 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 550)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Sven && IsCasted(e.Spellbook.SpellQ) && angle <= 0.3 && me.Distance2D(e) > 300 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 500)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_SkeletonKing && IsCasted(e.Spellbook.SpellQ) && angle <= 0.1 && me.Distance2D(e) > 300 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_ChaosKnight && IsCasted(e.Spellbook.SpellQ) && angle <= 0.1 && me.Distance2D(e) > 300 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_VengefulSpirit && IsCasted(e.Spellbook.SpellQ) && angle <= 0.1 && me.Distance2D(e) > 300 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Alchemist && e.FindSpell("alchemist_unstable_concoction_throw").IsInAbilityPhase && angle <= 0.3 && me.Distance2D(e) < e.FindSpell("alchemist_unstable_concoction_throw").GetCastRange() + 500)

							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Viper && IsCasted(e.Spellbook.SpellR) && angle <= 0.1 && me.Distance2D(e) < e.Spellbook.SpellR.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_PhantomLancer && IsCasted(e.Spellbook.SpellQ) && angle <= 0.1 && me.Distance2D(e) > 300 && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Morphling && IsCasted(e.Spellbook.SpellW) && angle <= 0.1  && me.Distance2D(e) < e.Spellbook.SpellW.GetCastRange() + 350)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter && IsCasted(e.Spellbook.SpellQ) && angle <= 0.1 && me.Distance2D(e) > 300  && me.Distance2D(e) < e.Spellbook.SpellQ.GetCastRange() + 150)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Visage && IsCasted(e.Spellbook.SpellW) && angle <= 0.1 && me.Distance2D(e) > 300  && me.Distance2D(e) < e.Spellbook.SpellW.GetCastRange() + 250)
							|| (e.ClassID == ClassID.CDOTA_Unit_Hero_Lich && IsCasted(e.Spellbook.SpellR) && angle <= 0.5  && me.Distance2D(e) < e.Spellbook.SpellR.GetCastRange() + 350)

							
							//free silence
							|| (me.IsSilenced() && !me.IsHexed() && !me.Modifiers.Any(y => y.Name == "modifier_doom_bringer_doom") && !me.Modifiers.Any(y => y.Name == "modifier_riki_smoke_screen")&& !me.Modifiers.Any(y => y.Name == "modifier_disruptor_static_storm")))
							
							//free debuff
							|| me.Modifiers.Any(y => y.Name == "modifier_oracle_fortunes_end_purge") 
							|| me.Modifiers.Any(y => y.Name == "modifier_life_stealer_open_wounds") 
							)
开发者ID:Air13,项目名称:ESharp,代码行数:67,代码来源:Tinker_Air13.cs

示例2: IsInDanger

        private static bool IsInDanger(Hero ally)
        {
            if (ally != null && ally.IsAlive)
            {
                var projectiles = ObjectMgr.Projectiles.Where(x => Equals(x.Target, ally)).ToList();

                if (projectiles.Any())
                {
                    foreach (var projectile in projectiles)
                    {
                        if (projectile.Source != null && Equals(projectile.Target, ally))
                        {
                            return true;
                        }
                    }
                }

                var percHealth = ally.Health <= (ally.MaximumHealth*0.7);
                var enemies =
                    ObjectMgr.GetEntities<Hero>()
                        .Where(
                            entity =>
                                entity.Team != ally.Team && entity.IsAlive && entity.IsVisible && !entity.IsIllusion)
                        .ToList();
                if (enemies.Any() && percHealth)
                {
                    foreach (var enemy in enemies)
                    {
                        if (ally.Distance2D(enemy) < enemy.AttackRange + 50)
                        {
                            return true;
                        }
                        if (enemy.Spellbook.Spells.Any(abilities => ally.Distance2D(enemy) < abilities.CastRange + 50))
                        {
                            return true;
                        }
                    }
                }

                var buffs = new[]
                {
                    "modifier_item_urn_damage", "modifier_doom_bringer_doom", "modifier_axe_battle_hunger",
                    "modifier_queenofpain_shadow_strike", "modifier_phoenix_fire_spirit_burn",
                    "modifier_venomancer_poison_nova", "modifier_venomancer_venomous_gale",
                    "modifier_silencer_curse_of_the_silent", "modifier_silencer_last_word", "modifier_bane_fiends_grip",
                    "modifier_earth_spirit_magnetize", "modifier_jakiro_macropyre", "modifier_nerolyte_reapers_scythe",
                    "modifier_batrider_flaming_lasso", "modifier_sniper_assassinate", "modifier_pudge_dismember",
                    "modifier_enigma_black_hole_pull", "modifier_disruptor_static_storm", "modifier_sand_king_epicenter",
                    "modifier_bloodseeker_rupture", "modifier_dual_breath_burn", "modifier_jakiro_liquid_fire_burn",
                    "modifier_axe_battle_hunger", "modifier_viper_corrosive_skin", "modifier_viper_poison_attack",
                    "modifier_viper_viper_strike"
                };

                foreach (var buff in buffs)
                {
                    return ally.Modifiers.Any(x => x.Name == buff);
                }

                if ((ally.IsStunned() ||
                     (ally.IsSilenced() &&
                      ((ally.FindItem("item_manta_style") == null || ally.FindItem("item_manta_style").Cooldown > 0) ||
                       (ally.FindItem("item_black_king_bar") == null ||
                        ally.FindItem("item_black_king_bar").Cooldown > 0))) ||
                     ally.IsHexed() ||
                     ally.IsRooted()) && !ally.IsInvul()
                    )
                {
                    return true;
                }

                return false;
            }
            return false;
        }
开发者ID:evezus,项目名称:EnsageSharp,代码行数:74,代码来源:Program.cs

示例3: DisabledAlly

 public static bool DisabledAlly(Hero target)
 {
     return target.IsStunned() || target.IsHexed() || target.IsRooted();
 }
开发者ID:Ray0fHope,项目名称:EnsageSharp,代码行数:4,代码来源:CastingChecks.cs


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