本文整理汇总了C#中Obj_AI_Base.IsChampion方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.IsChampion方法的具体用法?C# Obj_AI_Base.IsChampion怎么用?C# Obj_AI_Base.IsChampion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.IsChampion方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastBushwhack
// Human W Logic
internal static void CastBushwhack(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!KL.CatForm() && KL.CanUse(KL.Spells["Bushwhack"], true, mode))
{
if (!target.IsValidTarget(KL.Spells["Bushwhack"].Range))
return;
if (KL.Player.ManaPercent <= 75 && target.IsHunted())
return;
if (mode == "ha" && KL.Player.ManaPercent < 65)
return;
// try bushwhack prediction
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 0)
{
if (target.IsChampion())
KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
else
{
if ((KL.CanUse(KL.Spells["Javelin"], true, "jg") ||
KL.SpellTimer["Javelin"] > 4f) && target.Distance(KL.Player.ServerPosition) > 165f)
KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 305f));
else
KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 100f));
}
}
// try bushwhack behind target
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 1)
{
if (target.IsChampion())
{
var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
KL.Spells["Bushwhack"].Cast(unitpos.Extend(KL.Player.ServerPosition, -75f));
}
else
{
if ((KL.CanUse(KL.Spells["Javelin"], true, "jg") ||
KL.SpellTimer["Javelin"] > 4f) && target.Distance(KL.Player.ServerPosition) > 265f)
KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, +305f));
else
KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 100f));
}
}
}
}
示例2: CastBushwhack
// Human W Logic
internal static void CastBushwhack(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!KL.CatForm() && (mode != "ha" || KL.Player.ManaPercent > 65))
{
if (!KL.SpellTimer["Bushwhack"].IsReady() || !KN.Root.Item("ndhw" + mode).GetValue<bool>())
return;
if (target.IsValidTarget(KL.Spells["Bushwhack"].Range))
{
// try bushwhack prediction
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 0)
{
if (target.IsChampion())
KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
else
KL.Spells["Bushwhack"].Cast(target.ServerPosition);
}
// try bushwhack behind target
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 1)
{
var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
KL.Spells["Bushwhack"].Cast(unitpos.Extend(KL.Player.ServerPosition, -75f));
}
}
}
}
示例3: CalculateRendDamage
public static float CalculateRendDamage(Obj_AI_Base target)
{
var defuffer = 1f;
if (target.HasBuff("FerociousHowl") || target.HasBuff("GarenW"))
defuffer *= .7f;
if (target.HasBuff("Medidate"))
defuffer *= .5f - target.Spellbook.GetSpell(SpellSlot.E).Level * .05f;
if (target.HasBuff("gragaswself"))
defuffer *= .9f - target.Spellbook.GetSpell(SpellSlot.W).Level * .02f;
if (target.Name.Contains("Baron") && Player.HasBuff("barontarget"))
defuffer *= 0.5f;
if (target.Name.Contains("Dragon") && Player.HasBuff("s5test_dragonslayerbuff"))
defuffer *= (1 - (.07f * Player.GetBuffCount("s5test_dragonslayerbuff")));
if (Player.HasBuff("summonerexhaust"))
defuffer *= .4f;
if (!target.IsChampion()) return (GetRendDamage(target) * defuffer);
var healthDebuffer = 0f;
var hero = (Obj_AI_Hero)target;
if (hero.ChampionName == "Blitzcrank" && !target.HasBuff("BlitzcrankManaBarrierCD") && !target.HasBuff("ManaBarrier"))
healthDebuffer += target.Mana / 2;
return (GetRendDamage(target) * defuffer) - (healthDebuffer + GetShield(target) + 15);
}
示例4: CastBushwack
// Human W Logic
internal static void CastBushwack(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!ES.CatForm() && (mode != "ha" || ES.Player.ManaPercent > 65))
{
if (!ES.SpellTimer["Bushwhack"].IsReady() || !KN.Root.Item("ndhw" + mode).GetValue<bool>())
return;
if (target.IsValidTarget(ES.Spells["Bushwhack"].Range))
{
// try bushwack prediction
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 0)
{
if (target.IsChampion())
ES.Spells["Bushwhack"].SPredictionCast((Obj_AI_Hero) target, HitChance.VeryHigh);
else
ES.Spells["Bushwhack"].Cast(target.ServerPosition);
}
// try bushwack behind target
if (KN.Root.Item("ndhwforce").GetValue<StringList>().SelectedIndex == 1)
{
// todo: add adjust-able range & maybe add prediction
ES.Spells["Bushwhack"].Cast(target.ServerPosition.Extend(ES.Player.ServerPosition, -75f));
}
}
}
}
示例5: CastBushwhack
// Human W Logic
internal static void CastBushwhack(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!KL.CatForm() && KL.CanUse(KL.Spells["Bushwhack"], true, mode))
{
if (KL.Player.ManaPercent <= 65 && target.IsHunted() && target.CanMove)
{
return;
}
if (mode != "ha" || KL.Player.ManaPercent > 65)
{
if (target.IsValidTarget(KL.Spells["Bushwhack"].Range))
{
// try bushwhack prediction
if (getBoxItem(wHMenu, "ndhwforce") == 0)
{
if (target.IsChampion())
KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
else
KL.Spells["Bushwhack"].Cast(target.ServerPosition);
}
// try bushwhack behind target
if (getBoxItem(wHMenu, "ndhwforce") == 1)
{
var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
KL.Spells["Bushwhack"].Cast(unitpos.Extend(KL.Player.ServerPosition, -75f));
}
}
}
}
}
示例6: OnProcessSpellCast
protected override void OnProcessSpellCast(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs spell)
{
if (!unit.IsMe && unit.IsEnemy)
{
if (!spell.SData.IsAutoAttack() && spell.Target.IsMe && E.IsReady())
{
if (unit.IsChampion(unit.BaseSkinName))
{
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
{
if (config.Item("UseECombo").GetValue<bool>())
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
}
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass)
{
if (config.Item("UseEHarass").GetValue<bool>())
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
}
}
if (config.Item("UseEMisc").GetValue<bool>())
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
}
}
}
}
}
示例7: CalcRealDamage
public static float CalcRealDamage(Obj_AI_Base target, float fakeDamage)
{
if (CheckNoDamageBuffs((Obj_AI_Hero)target))
return 0f;
var defuffer=1f;
if (target.HasBuff("FerociousHowl")||target.HasBuff("GarenW"))
defuffer*=.7f;
if (target.HasBuff("Medidate"))
defuffer*=.5f-target.Spellbook.GetSpell(SpellSlot.E).Level*.05f;
if (target.HasBuff("gragaswself"))
defuffer*=.9f-target.Spellbook.GetSpell(SpellSlot.W).Level*.02f;
if (target.Name.Contains("Baron")&&Data.Static.Objects.Player.HasBuff("barontarget"))
defuffer*=0.5f;
if (Data.Static.Objects.Player.HasBuff("summonerexhaust"))
defuffer*=.4f;
if (!target.IsChampion())
return fakeDamage*defuffer;
var healthDebuffer=0f;
var hero=(Obj_AI_Hero)target;
if ((hero.ChampionName=="Blitzcrank")&&!target.HasBuff("BlitzcrankManaBarrierCD")&&!target.HasBuff("ManaBarrier"))
healthDebuffer+=target.Mana/2;
return fakeDamage*defuffer-(healthDebuffer+GetShield(target)+target.FlatHPRegenMod+10);
}
示例8: OnProcessSpellCast
protected override void OnProcessSpellCast(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs spell)
{
if (unit.IsMe)
{
if (spell.SData.Name.ToLower().Contains("udyr") && spell.SData.Name.ToLower().Contains("stance"))
{
LastAny = myUtility.TickCount;
}
if (spell.SData.Name.ToLower() == "udyrtigerstance")
{
LastQ = myUtility.TickCount;
}
if (spell.SData.Name.ToLower() == "udyrturtlestance")
{
LastW = myUtility.TickCount;
}
if (spell.SData.Name.ToLower() == "udyrbearstance")
{
LastE = myUtility.TickCount;
}
if (spell.SData.Name.ToLower() == "udyrphoenixstance")
{
LastR = myUtility.TickCount;
}
}
if (!unit.IsMe && unit.IsEnemy && unit.IsValid<Obj_AI_Hero>())
{
if (spell.Target == null || !spell.Target.IsValid || !spell.Target.IsMe)
{
return;
}
if (!spell.SData.IsAutoAttack() && spell.Target.IsMe && E.IsReady())
{
if (unit.IsChampion(unit.BaseSkinName))
{
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
{
if (config.Item("UseWCombo").GetValue<bool>() && !Active(null))
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => W.Cast());
}
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass)
{
if (config.Item("UseWHarass").GetValue<bool>())
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => W.Cast());
}
}
if (config.Item("UseWMisc").GetValue<bool>() && !Active(null))
{
Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => W.Cast());
}
}
}
}
}
示例9: CastJavelin
// Human Q Logic
internal static void CastJavelin(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!ES.CatForm() && (mode != "ha" || ES.Player.ManaPercent > 65))
{
if (!ES.SpellTimer["Javelin"].IsReady() || !KN.Root.Item("ndhq" + mode).GetValue<bool>())
return;
if (target.IsValidTarget(ES.Spells["Javelin"].Range))
{
// try prediction on champion
if (target.IsChampion() && KN.Root.Item("ndhqcheck").GetValue<bool>())
ES.Spells["Javelin"].SPredictionCast((Obj_AI_Hero) target, ES.MyHitChance("hq"));
if (!target.IsChampion())
ES.Spells["Javelin"].Cast(target);
}
}
}
示例10: AIHeroClient_OnDoCast
/// <summary>
/// OnDoCast event for aa windup check
/// </summary>
private static void AIHeroClient_OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (args.SData.IsAutoAttack() && sender.IsEnemy && sender.IsChampion())
{
var enemy = EnemyInfo[sender.NetworkId];
enemy.LastWindupTick = Environment.TickCount;
enemy.IsWindupChecked = false;
EnemyInfo[sender.NetworkId] = enemy;
}
}
示例11: OnProcessSpellCast
private static void OnProcessSpellCast(Obj_AI_Base caster, GameObjectProcessSpellCastEventArgs args)
{
if (!caster.IsChampion()) return;
if (args.SData.Name == "EzrealArcaneShift" || args.SData.Name == "summonerflash")
{
var timer = new Tuple<float, Vector3>(Game.Time + Misc.getSliderValue(BlinkDetectorMenu, "drawSeconds"), args.End);
times.Add(timer);
}
}
示例12: CastJavelin
// Human Q Logic
internal static void CastJavelin(Obj_AI_Base target, string mode)
{
// if not harass mode ignore mana check
if (!KL.CatForm() && (mode != "ha" || KL.Player.ManaPercent > 65))
{
if (!KL.SpellTimer["Javelin"].IsReady() || !KN.Root.Item("ndhq" + mode).GetValue<bool>())
return;
if (target.IsValidTarget(KL.Spells["Javelin"].Range))
{
// try prediction on champion
if (target.IsChampion())
{
var qoutput = KL.Spells["Javelin"].GetPrediction(target);
if (qoutput.Hitchance == HitChance.Collision && KL.Smite.IsReady())
{
if (KN.Root.Item("qsmcol").GetValue<bool>() && target.Health <= KL.CatDamage(target)*3)
{
if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId))
{
var obj = qoutput.CollisionObjects.Cast<Obj_AI_Minion>().ToList();
if (obj.Count == 1)
{
if (obj.Any(
i =>
i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) &&
KL.Player.Distance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First())))
{
KL.Spells["Javelin"].Cast(qoutput.CastPosition);
return;
}
}
}
}
}
if (KN.Root.Item("ndhqcheck").GetValue<bool>() &&
qoutput.Hitchance >= (HitChance) KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)
KL.Spells["Javelin"].Cast(qoutput.CastPosition);
if (!KN.Root.Item("ndhqcheck").GetValue<bool>())
KL.Spells["Javelin"].Cast(target);
}
else
{
KL.Spells["Javelin"].Cast(target);
}
}
}
}
示例13: Obj_AI_Hero_OnNewPath
/// <summary>
/// OnNewPath event for average reaction time calculations
/// </summary>
private static void Obj_AI_Hero_OnNewPath(Obj_AI_Base sender, GameObjectNewPathEventArgs args)
{
if (!sender.IsEnemy || !sender.IsChampion() || args.IsDash)
return;
EnemyData enemy = EnemyInfo[sender.NetworkId];
lock (enemy.m_lock)
{
if (args.Path.Length < 2)
{
if (!enemy.IsStopped)
{
enemy.StopTick = Environment.TickCount;
enemy.LastWaypointTick = Environment.TickCount;
enemy.IsStopped = true;
enemy.Count = 0;
enemy.AvgTick = 0;
enemy.AvgPathLenght = 0;
}
}
else
{
List<Vector2> wp = args.Path.Select(p => p.To2D()).ToList();
if (!enemy.LastWaypoints.SequenceEqual(wp))
{
if (!enemy.IsStopped)
{
enemy.AvgTick = (enemy.Count * enemy.AvgTick + (Environment.TickCount - enemy.LastWaypointTick)) / ++enemy.Count;
enemy.AvgPathLenght = ((enemy.Count - 1) * enemy.AvgPathLenght + wp.PathLength()) / enemy.Count;
}
enemy.LastWaypointTick = Environment.TickCount;
enemy.IsStopped = false;
enemy.LastWaypoints = wp;
if (!enemy.IsWindupChecked)
{
if (Environment.TickCount - enemy.LastAATick < 300)
enemy.AvgOrbwalkTime = (enemy.AvgOrbwalkTime * enemy.OrbwalkCount + (enemy.LastWaypointTick - enemy.LastWindupTick)) / ++enemy.OrbwalkCount;
enemy.IsWindupChecked = true;
}
}
}
EnemyInfo[sender.NetworkId] = enemy;
}
}
示例14: Obj_AI_Base_OnProcessSpellCast
/// <summary>
/// OnProcessSpellCast Event which detects targeted spells to me
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="args">The args.</param>
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if(OnDetected != null && sender.IsChampion() && !sender.IsMe)
{
var spells = SpellDatabase.TargetedSpells.Where(p => p.ChampionName == (sender as Obj_AI_Hero).ChampionName);
if(spells != null && spells.Count() > 0)
{
var spell = spells.Where(p => p.SpellName == args.SData.Name).FirstOrDefault();
if (spell != null)
{
if ((spell.IsTargeted && args.Target != null && args.Target.IsMe) ||
(!spell.IsTargeted && sender.Distance(ObjectManager.Player.ServerPosition) <= spell.Radius))
OnDetected(new DetectedTargetedSpellArgs { Caster = sender, SpellData = spell, SpellCastArgs = args });
}
}
}
}
示例15: Obj_AI_Base_OnProcessSpellCast
private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (sender == null || args == null || !r.IsReady() || r.Instance.ToggleState != 0
|| !player.GetEnemiesInRange(r.Range).Any() || args.Slot != SpellSlot.R || !sender.IsChampion()
|| !sender.IsEnemy || !zedMenu.GetParamBool("koreanzed.miscmenu.rdodge.user")
|| !zedMenu.CheckMenuItem("koreanzed.miscmenu.rdodge." + args.SData.Name.ToLowerInvariant()))
{
return;
}
if (((args.Target != null && args.Target.IsMe)
|| player.Distance(args.End) < Math.Max(args.SData.BounceRadius, args.SData.LineWidth))
&& zedMenu.GetParamBool("koreanzed.miscmenu.rdodge." + args.SData.Name.ToLowerInvariant()))
{
int delay = (int) Math.Truncate((double)(player.Distance(sender) / args.SData.MissileSpeed)) - 1;
Utility.DelayAction.Add(delay, () => { r.Cast(TargetSelector.GetTarget(r.Range, r.DamageType)); });
}
}