本文整理汇总了C#中Obj_AI_Hero.UnderTurret方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.UnderTurret方法的具体用法?C# Obj_AI_Hero.UnderTurret怎么用?C# Obj_AI_Hero.UnderTurret使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.UnderTurret方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCombo
private static void OnCombo(Obj_AI_Hero target)
{
var pounceDistance = target.IsHunted() ? 730 : _pounce.Range;
if (_player.IsCougar())
{
/*if (_menu.Item("useTakedown").GetValue<bool>() && _takedown.IsReady() &&
_player.Distance(target.Position) <= _takedown.Range)
{
_takedown.Cast(true);
}*/
if (_pounce.IsReady() && MainMenu.Item("usePounce").GetValue<bool>())
{
if (MainMenu.Item("turretSafety").GetValue<bool>() && target.UnderTurret(true))
{
return;
}
if (MainMenu.Item("pounceHunted").GetValue<bool>())
{
if (target.IsHunted() && _player.Distance(target.ServerPosition) <= pounceDistance &&
_player.Distance(target) > _swipe.Range)
{
_pounce.Cast(target.ServerPosition);
}
if (!target.IsHunted() && _player.GetSpellDamage(target, SpellSlot.W) > target.Health + 20 &&
_player.Distance(target.ServerPosition) <= pounceDistance)
{
_pounce.Cast(target.ServerPosition);
}
}
else
{
if (_player.Distance(target) <= pounceDistance && _player.Distance(target) > _swipe.Range)
{
_pounce.Cast(target.ServerPosition);
}
}
}
if (MainMenu.Item("useSwipe").GetValue<bool>() && _swipe.IsReady() &&
_player.Distance(target.Position, true) <= _swipe.RangeSqr)
{
_swipe.Cast(target);
}
//I'd call it 0.5% ?
if (MainMenu.Item("useHuman").GetValue<bool>())
{
if (_player.Distance(target.ServerPosition) > pounceDistance && HQ < 0.5 &&
_player.Distance(target.ServerPosition) < _javelinToss.Range && CW < 0.5)
{
var prediction = _javelinToss.GetPrediction(target);
if (_aspectOfTheCougar.IsReady() && prediction.Hitchance >= HitChance.Medium)
{
_aspectOfTheCougar.Cast();
//Utility.DelayAction.Add(200, () => _javelinToss.Cast(prediction.CastPosition));
}
}
}
}
else
{
if (MainMenu.Item("useJavelin").GetValue<bool>() && _javelinToss.IsReady() &&
target.IsValidTarget(_javelinToss.Range) &&
_player.Distance(target.Position) <= MainMenu.Item("javelinRange").GetValue<Slider>().Value)
{
_javelinToss.CastIfHitchanceEquals(target, CustomHitChance);
}
if (MainMenu.Item("useBushwhack").GetValue<bool>() && _bushwhack.IsReady() &&
target.IsValidTarget(_bushwhack.Range) && _player.Distance(target.Position) <= _bushwhack.Range)
{
_bushwhack.CastIfHitchanceEquals(target, CustomHitChance);
}
if (MainMenu.Item("useCougar").GetValue<bool>() && (CW < 0.2) && (CQ < 0.2) && (CE < 0.2) &&
!_javelinToss.IsReady() && _player.Distance(target) <= pounceDistance)
{
if (MainMenu.Item("pounceHunted").GetValue<bool>()) {}
if (_aspectOfTheCougar.IsReady())
{
_aspectOfTheCougar.Cast();
}
}
}
}
示例2: Fuckingw
private static void Fuckingw(Obj_AI_Hero hero)
{
if (hero == null) return;
var qmana = _player.Spellbook.GetSpell(SpellSlot.Q).ManaCost;
var wmana = _player.Spellbook.GetSpell(SpellSlot.W).ManaCost;
var emana = _player.Spellbook.GetSpell(SpellSlot.E).ManaCost;
var rmana = _player.Spellbook.GetSpell(SpellSlot.R).ManaCost;
var diveTower = _config.Item("diveintower").GetValue<bool>();
if ((hero.UnderTurret() && !diveTower) || !_w.IsReady()) return;
var usewhE = (100 * (_player.Health / _player.MaxHealth)) > _config.Item("UseWHE").GetValue<Slider>().Value;
if (usewhE && hero.IsValidTarget(_q.Range + _w.Range) &&
hero.CountEnemiesInRange(_q.Range + _w.Range) <= _config.Item("EnemyC").GetValue<Slider>().Value &&
_player.Distance(hero) > Orbwalking.GetRealAutoAttackRange(_player))
{
if (hero.Health < (_player.GetAutoAttackDamage(hero, true) * 2))
{
_w.Cast(hero.Position);
}
else if (hero.Health < _q.GetDamage(hero) && _player.MaxMana > qmana + wmana && _q.IsReady())
{
_w.Cast(hero.Position);
}
else if (hero.Health < _e.GetDamage(hero) && _player.MaxMana > emana + wmana && _e.IsReady())
{
_w.Cast(hero.Position);
}
else if (hero.Health < _e.GetDamage(hero) + _q.GetDamage(hero) && _player.MaxMana > qmana + emana + wmana &&
_e.IsReady() && _e.IsReady())
{
_w.Cast(hero.Position);
}
else if (hero.Health < _q.GetDamage(hero) + _r.GetDamage(hero) && _q.IsReady() && _r.IsReady() &&
_player.MaxMana > qmana + wmana + rmana)
{
_w.Cast(hero.Position);
}
}
}
示例3: QPredict
private void QPredict(Obj_AI_Hero target)
{
if (Vector3.Distance(Player.ServerPosition, target.ServerPosition) < Q.Range)
{
if (myUtility.MovementImpaired(target))
{
Q.Cast(target.ServerPosition);
}
PredictionOutput pred = Q.GetPrediction(target);
if (pred.CollisionObjects.Count == 0)
{
if (target.UnderTurret(true) && !config.Item("TurretDive").GetValue<bool>()) return;
var test1 = Prediction.GetPrediction(target, Q.Instance.SData.SpellCastTime).CastPosition;
float movement = target.MoveSpeed * 100 / 1000;
if (target.Distance(test1) > movement)
{
Q.Cast(target.ServerPosition.Extend(test1, Q.Instance.SData.SpellCastTime * target.MoveSpeed));
}
else
{
if (pred.Hitchance >= QHitChance)
{
Q.Cast(pred.CastPosition);
}
}
}
}
}
示例4: Combo
public void Combo()
{
if (m_target != null && m_target.IsDead)
m_target = null;
if (Spells[Q].IsReady() && Config.Item("CUSEQ").GetValue<bool>())
{
var t = TargetSelector.GetTarget(Spells[Q].Range, TargetSelector.DamageType.Magical);
if (t != null)
Spells[Q].SPredictionCastArc(t, HitChance.High, Config.Item("QPREDTYPE").GetValue<StringList>().SelectedIndex == 0);
}
if (m_target == null)
m_target = HeroManager.Enemies.Where(p => HasMoonlight(p) && p.ServerPosition.Distance(ObjectManager.Player.ServerPosition) <= 900).OrderByDescending(q => TargetSelector.GetPriority(q)).FirstOrDefault();
if (Config.Item("CUSER").GetValue<bool>())
{
if (m_target != null && Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex != 2 && Spells[R].IsReady())
{
if (Spells[R].IsInRange(m_target) && ((m_target.UnderTurret() && !Config.Item("CUSERTOWER").GetValue<bool>()) || !m_target.UnderTurret()))
{
Spells[R].CastOnUnit(m_target);
if (!m_target.IsDead && Spells[W].IsReady() && Config.Item("CUSEW").GetValue<bool>()) //overkill check
Spells[W].Cast();
if (!m_target.IsDead) //overkill check
{
if (Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex != 1)
{
if (Spells[R].IsReady() && ((m_target.UnderTurret() && !Config.Item("CUSERTOWER").GetValue<bool>()) || !m_target.UnderTurret()))
{
Spells[R].CastOnUnit(m_target);
m_target = null;
}
}
if(Spells[E].IsReady() && Config.Item("CUSEE").GetValue<bool>())
Spells[E].Cast();
}
else
m_target = null;
return;
}
m_target = null;
}
if (m_target == null && (Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex == 2 || Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex == 0))
{
var t = TargetSelector.GetTarget(Spells[R].Range, TargetSelector.DamageType.Magical);
if (t != null)
{
if (Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex == 2 || (Config.Item("CUSERMETHOD").GetValue<StringList>().SelectedIndex == 0 && CalculateDamageR(t) >= t.Health))
{
m_target = t;
if(((m_target.UnderTurret() && !Config.Item("CUSERTOWER").GetValue<bool>()) || !m_target.UnderTurret()))
Spells[R].CastOnUnit(t);
}
}
}
}
{
var t = m_target == null ? TargetSelector.GetTarget(Spells[E].Range, TargetSelector.DamageType.Magical) : m_target;
if (t != null)
{
if (!t.IsDead)
{
if (Spells[W].IsReady() && !Spells[E].IsReady() && Spells[W].IsInRange(t) && Config.Item("CUSEW").GetValue<bool>())
Spells[W].Cast();
if (!t.IsDead && Spells[E].IsReady() && Spells[W].IsReady() && Spells[E].IsInRange(t))
{
if (Config.Item("CUSEW").GetValue<bool>())
Spells[W].Cast();
if (Config.Item("CUSEE").GetValue<bool>())
Spells[E].Cast();
}
}
m_target = null;
}
}
}
示例5: Combo
private void Combo(Obj_AI_Hero target)
{
if (target == null)
{
return;
}
var cmbDmg = ComboDamage(target);
float dist = (float)(Q.Range + player.MoveSpeed * 2.5);
if (ShacoClone && !GhostDelay && config.Item("useClone", true).GetValue<bool>())
{
var Gtarget = TargetSelector.GetTarget(dist, TargetSelector.DamageType.Physical);
switch (config.Item("ghostTarget", true).GetValue<StringList>().SelectedIndex)
{
case 0:
Gtarget = TargetSelector.GetTarget(GhostRange, TargetSelector.DamageType.Physical);
break;
case 1:
Gtarget =
ObjectManager.Get<Obj_AI_Hero>()
.Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
.OrderBy(i => i.Health)
.FirstOrDefault();
break;
case 2:
Gtarget =
ObjectManager.Get<Obj_AI_Hero>()
.Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
.OrderBy(i => player.Distance(i))
.FirstOrDefault();
break;
default:
break;
}
var clone = ObjectManager.Get<Obj_AI_Minion>().FirstOrDefault(m => m.Name == player.Name && !m.IsMe);
if (clone != null && (System.Environment.TickCount - cloneTime > 16500f || clone.HealthPercent < 10) &&
!clone.IsWindingUp)
{
var pos =
CombatHelper.PointsAroundTheTarget(clone.Position, 600)
.OrderByDescending(p => p.CountEnemiesInRange(250))
.ThenBy(p => Environment.Minion.countMinionsInrange(p, 250))
.FirstOrDefault();
if (pos.IsValid())
{
R.Cast(pos, config.Item("packets").GetValue<bool>());
}
}
if (clone != null && Gtarget.IsValid && !clone.IsWindingUp)
{
if (CanCloneAttack() || player.HealthPercent < 25)
{
R.CastOnUnit(Gtarget, config.Item("packets").GetValue<bool>());
}
else
{
var prediction = Prediction.GetPrediction(Gtarget, 2);
R.Cast(
target.Position.Extend(prediction.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget)),
config.Item("packets").GetValue<bool>());
}
GhostDelay = true;
Utility.DelayAction.Add(200, () => GhostDelay = false);
}
}
if ((config.Item("WaitForStealth", true).GetValue<bool>() && ShacoStealth && cmbDmg < target.Health) ||
!Orbwalking.CanMove(100))
{
return;
}
if (config.Item("useItems").GetValue<bool>())
{
ItemHandler.UseItems(target, config, cmbDmg);
}
if (config.Item("useq", true).GetValue<bool>() && Q.IsReady() &&
Game.CursorPos.Distance(target.Position) < 250 && target.Distance(player) < dist &&
(target.Distance(player) >= config.Item("useqMin", true).GetValue<Slider>().Value ||
(cmbDmg > target.Health && player.CountEnemiesInRange(2000) == 1)))
{
if (target.Distance(player) < Q.Range)
{
Q.Cast(target.Position, config.Item("packets").GetValue<bool>());
}
else
{
if (!CheckWalls(target) || Environment.Map.GetPath(player, target.Position) < dist)
{
Q.Cast(
player.Position.Extend(target.Position, Q.Range), config.Item("packets").GetValue<bool>());
}
}
}
bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
if (config.Item("usew", true).GetValue<bool>() && W.IsReady() && !target.UnderTurret(true) &&
target.Health > cmbDmg && player.Distance(target) < W.Range)
{
HandleW(target);
}
if (config.Item("usee", true).GetValue<bool>() && E.CanCast(target))
{
//.........这里部分代码省略.........
示例6: Drawing_OnDraw
static void Drawing_OnDraw(EventArgs args)
{
if (!Menu.Item("switch").GetValue<Boolean>())
return;
Target = TargetSelector.GetSelectedTarget() != null ? TargetSelector.GetSelectedTarget() : Player;
var buffs = string.Empty;
foreach (var buff in Target.Buffs)
{
buffs += "\n" + buff.Name + "[Count: " + buff.Count + "/Duration: " + (buff.EndTime - Game.ClockTime).ToString("0.00") +"],";
}
var Mobs = MinionManager.GetMinions(1500, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
var MobsList = string.Empty;
foreach (var Mob in Mobs)
{
MobsList += "\n" + Mob.Name + "[Skinname: " + Mob.SkinName + "/HP: " + Mob.Health + " / " + Mob.MaxHealth + "(" + Mob.HealthPercent.ToString("0.0") + "%)],";
}
Render.Circle.DrawCircle(Player.Position, 1500, Color.Red, 10);
Text.text =
//"Name: " + Target.Name + NewLine +
"ChampionName: " + Target.ChampionName + NewLine +
"SkinName: " + Target.SkinName + NewLine +
//"Gold: " + Target.Gold + NewLine +
//"Level: " + Target.Level + NewLine +
"TotalAttackDamage: " + Utility.TotalAttackDamage(Target) + NewLine +
"TotalMagicalDamage: " + Utility.TotalMagicalDamage(Target) + NewLine +
"Armor: " + Target.Armor + NewLine +
"Health: " + Target.Health + " / " + Target.MaxHealth + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine +
"Mana: " + Target.Mana + " / " + Target.MaxMana + " (" + Target.HealthPercent.ToString("0.0") + "%)" + NewLine +
"HPRegenRate: " + Target.HPRegenRate + NewLine +
"PARRegenRate: " + Target.PARRegenRate + NewLine +
"Experience: " + Target.Experience + NewLine +
"Position: " + Target.Position + NewLine +
"ServerPosition: " + Target.ServerPosition + NewLine +
"Team: " + Target.Team + NewLine +
"NetworkId: " + Target.NetworkId + NewLine +
"MoveSpeed: " + Target.MoveSpeed + NewLine +
"AttackRange: " + Target.AttackRange + NewLine +
"RealAutoAttackRange: " + Orbwalking.GetRealAutoAttackRange(Target) + NewLine +
//"DeathDuration: " + Target.DeathDuration + NewLine +
"BoundingRadius: " + Target.BoundingRadius + NewLine +
NewLine +
"Buffs: " + buffs + NewLine +
NewLine +
"IsDead: " + Target.IsDead + NewLine +
"IsImmovable: " + Target.IsImmovable + NewLine +
"IsInvulnerable: " + Target.IsInvulnerable + NewLine +
"IsMoving: " + Target.IsMoving + NewLine +
"IsPacified: " + Target.IsPacified + NewLine +
"IsTargetable: " + Target.IsTargetable + NewLine +
"IsWindingUp: " + Target.IsWindingUp + NewLine +
"IsZombie: " + Target.IsZombie + NewLine +
"IsRecalling: " + Target.IsRecalling() + NewLine +
"IsStunned: " + Target.IsStunned + NewLine +
"IsRooted: " + Target.IsRooted + NewLine +
"IsMelee: " + Target.IsMelee() + NewLine +
"IsDashing: " + Target.IsDashing() + NewLine +
"IsAlly: " + Target.IsAlly + NewLine +
"IsCanMove: " + Orbwalking.CanMove(1) + NewLine +
"UnderTurret: " + Target.UnderTurret() + NewLine +
NewLine +
"Mobs: " + MobsList + NewLine +
NewLine +
"Game_CursorPos: " + Game.CursorPos + NewLine +
"Game_ClockTime: " + Game.ClockTime + NewLine +
"Game_Time: " + Game.Time + NewLine +
"Game_Type: " + Game.Type + NewLine +
"Game_Version: " + Game.Version + NewLine +
"Game_Region: " + Game.Region + NewLine +
"Game_IP: " + Game.IP + NewLine +
"Game_Port: " + Game.Port + NewLine +
"Game_Ping: " + Game.Ping + NewLine +
"Game_Mode: " + Game.Mode + NewLine +
"Game_MapId: " + Game.MapId + NewLine +
"Game_MapName: " + Utility.Map.GetMap().Name
;
Text.OnEndScene();
}
示例7: Combo
private void Combo(Obj_AI_Hero target)
{
if (target == null)
{
return;
}
var cmbDmg = ComboDamage(target);
float dist = (float) (Q.Range + player.MoveSpeed * 2.5);
if (ShacoClone && !GhostDelay && config.Item("useClone", true).GetValue<bool>() &&
!config.Item("autoMoveClone", true).GetValue<bool>())
{
moveClone();
}
if ((config.Item("WaitForStealth", true).GetValue<bool>() && ShacoStealth && cmbDmg < target.Health) ||
!Orbwalking.CanMove(100))
{
return;
}
if (config.Item("useItems").GetValue<bool>())
{
ItemHandler.UseItems(target, config, cmbDmg);
}
if (config.Item("useq", true).GetValue<bool>() && Q.IsReady() &&
Game.CursorPos.Distance(target.Position) < 250 && target.Distance(player) < dist &&
(target.Distance(player) >= config.Item("useqMin", true).GetValue<Slider>().Value ||
(cmbDmg > target.Health && player.CountEnemiesInRange(2000) == 1)))
{
if (target.Distance(player) < Q.Range)
{
Q.Cast(Prediction.GetPrediction(target, 0.5f).UnitPosition, config.Item("packets").GetValue<bool>());
}
else
{
if (!CheckWalls(target) || Environment.Map.GetPath(player, target.Position) < dist)
{
Q.Cast(
player.Position.Extend(target.Position, Q.Range), config.Item("packets").GetValue<bool>());
}
}
}
bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
if (config.Item("usew", true).GetValue<bool>() && W.IsReady() && !target.UnderTurret(true) &&
target.Health > cmbDmg && player.Distance(target) < W.Range)
{
HandleW(target);
}
if (config.Item("usee", true).GetValue<bool>() && E.CanCast(target))
{
E.CastOnUnit(target, config.Item("packets").GetValue<bool>());
}
if (config.Item("user", true).GetValue<bool>() && R.IsReady() && !ShacoClone && target.HealthPercent < 75 &&
cmbDmg < target.Health && target.HealthPercent > cmbDmg && target.HealthPercent > 25)
{
R.Cast(config.Item("packets").GetValue<bool>());
}
if (config.Item("useIgnite").GetValue<bool>() &&
player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health && hasIgnite)
{
player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
}
}
示例8: CastSpell
public void CastSpell(Spell spell, SpellDataInst sDataInst)
{
target = GetTarget(spell);
if (target != null && spell.IsReady())
{
if (target.UnderTurret(true))
return;
var pred = spell.GetPrediction(target);
if (sDataInst.SData.IsToggleSpell)
{
if (spell.Instance.ToggleState == 1)
{
if (sDataInst.SData.TargettingType == SpellDataTargetType.Location)
spell.Cast(pred.CastPosition);
else if (sDataInst.SData.TargettingType == SpellDataTargetType.Unit)
spell.CastOnUnit(target);
else
spell.Cast();
}
}
else
{
if (spell.IsReady())
{
if (sDataInst.SData.TargettingType == SpellDataTargetType.Self)
spell.Cast();
else if (sDataInst.SData.TargettingType == SpellDataTargetType.Unit)
spell.CastOnUnit(target);
else if (pred.Hitchance >= HitChance.Medium)
{
spell.Cast(pred.CastPosition);
}
}
}
}
}
示例9: GameOnOnUpdate
private static void GameOnOnUpdate(EventArgs args)
{
JumpTarget = CommonTargetSelector.GetTarget(Q.Range*3, TargetSelector.DamageType.Physical);
if (ModeConfig.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
{
return;
}
if (!JumpTarget.IsValidTarget())
{
return;
}
if (!JumpObject.IsValidTarget(Q.Range))
{
return;
}
if (!Q.IsReady())
{
return;
}
if (!MenuLocal.Item("Jump.Enabled").GetValue<KeyBind>().Active)
{
return;
}
var jumpMode = MenuLocal.Item("Jump.Mode").GetValue<StringList>().SelectedIndex;
if (jumpMode != 0)
{
switch (jumpMode)
{
case 1:
{
Q.CastOnUnit(JumpObject);
break;
}
case 2:
{
if (JumpTarget.CanStun())
{
Q.CastOnUnit(JumpObject);
}
break;
}
case 3:
{
if (JumpTarget.Health < CommonMath.GetComboDamage(JumpTarget))
{
Q.CastOnUnit(JumpObject);
}
break;
}
case 4:
{
if (JumpTarget.CanStun() || JumpTarget.Health < CommonMath.GetComboDamage(JumpTarget))
{
Q.CastOnUnit(JumpObject);
}
break;
}
}
}
//if (!JumpTarget.IsValidTarget(Q.Range) && !JumpTarget.IsValidTarget(Q.Range + Orbwalking.GetRealAutoAttackRange(null) + 65))
//{
// ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, JumpTarget);
//}
return;
if (JumpTarget.UnderTurret(true) && MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex == 0)
{
return;
}
if (JumpTarget.UnderTurret(true)
&& MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex == 1
&& JumpTarget.Health < Common.CommonMath.GetComboDamage(JumpTarget))
{
Q.CastOnUnit(JumpObject);
}
var jumpQ = MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex;
switch (jumpQ)
{
case 0:
{
Q.CastOnUnit(JumpObject);
break;
}
case 1:
{
if (JumpTarget.CanStun())
{
Q.CastOnUnit(JumpObject);
//.........这里部分代码省略.........