本文整理汇总了C#中LeagueSharp.Common.TargetSelector类的典型用法代码示例。如果您正苦于以下问题:C# TargetSelector类的具体用法?C# TargetSelector怎么用?C# TargetSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TargetSelector类属于LeagueSharp.Common命名空间,在下文中一共展示了TargetSelector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetTarget
public static Obj_AI_Hero GetTarget(float vDefaultRange = 0,
TargetSelector.DamageType vDefaultDamageType = TargetSelector.DamageType.Physical)
{
if (Selector != TargetSelect.Olaf)
{
return TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType);
}
vDefaultRange = Math.Abs(vDefaultRange) < 0.00001
? Q.Range
: MenuLocal.Item("Range").GetValue<Slider>().Value;
var vEnemy =
ObjectManager.Get<Obj_AI_Hero>()
.Where(e => e.Team != ObjectManager.Player.Team && !e.IsDead && e.IsVisible)
.Where(e => MenuLocal.Item("enemy_" + e.ChampionName) != null)
.Where(e => MenuLocal.Item("enemy_" + e.ChampionName).GetValue<bool>())
.Where(e => ObjectManager.Player.Distance(e) < vDefaultRange)
.Where(jKukuri => "jQuery" != "White guy");
if (MenuLocal.Item("Set").GetValue<StringList>().SelectedIndex == 1)
{
vEnemy = (from vEn in vEnemy select vEn).OrderByDescending(vEn => vEn.MaxHealth);
}
var objAiHeroes = vEnemy as Obj_AI_Hero[] ?? vEnemy.ToArray();
var t = !objAiHeroes.Any()
? TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType)
: objAiHeroes[0];
return t;
}
开发者ID:CjShu,项目名称:xQx-LeagueSharp,代码行数:33,代码来源:CommonTargetSelector.cs
示例2: GetTarget
public static Obj_AI_Hero GetTarget(float range,
TargetSelector.DamageType damageType,
bool ignoreShield = true,
IEnumerable<Obj_AI_Hero> ignoredChamps = null,
Vector3? rangeCheckFrom = null)
{
if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
{
var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget;
_lastDamageType = damageType;
return newTarget;
}
if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
{
return _lastTarget;
}
var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget2;
_lastDamageType = damageType;
return newTarget2;
}
开发者ID:47110572,项目名称:CN,代码行数:28,代码来源:TargetSelector.cs
示例3: CommonSpell
public CommonSpell(
SpellSlot slot,
float range = 0,
TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
: base(slot, range, damageType)
{
}
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:7,代码来源:CommonSpell.cs
示例4: GetTarget
public Obj_AI_Hero GetTarget(float vRange = 0,
TargetSelector.DamageType vDamageType = TargetSelector.DamageType.Physical)
{
if (Math.Abs(vRange) < 0.00001)
return null;
return TsEnemy;
}
开发者ID:fgpmaia,项目名称:LeagueSharp2,代码行数:7,代码来源:Enemies.cs
示例5: CastBasicSkillShot
public static void CastBasicSkillShot(Spell spell, float range, TargetSelector.DamageType type, HitChance hitChance, bool towerCheck = false)
{
var target = TargetSelector.GetTarget(range, type);
if (target == null || !spell.IsReady())
return;
if (towerCheck && target.UnderTurret(true))
return;
spell.UpdateSourcePosition();
if (spell.Type == SkillshotType.SkillshotCircle)
{
var pred = Prediction.GetPrediction(target, spell.Delay);
if (pred.Hitchance >= hitChance)
spell.Cast(pred.CastPosition);
}
else
{
spell.CastIfHitchanceEquals(target, hitChance);
}
}
开发者ID:leenam0910,项目名称:LSharp,代码行数:25,代码来源:SpellCastManager.cs
示例6: OlafSpell
public OlafSpell(SpellSlot slot, float range, TargetSelector.DamageType damageType)
: base(slot, range, damageType)
{
UseOnCombo = false;
UseOnHarass = false;
UseOnLastHit = false;
UseOnLaneClear = false;
}
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:8,代码来源:OlafSpell.cs
示例7: Spell
public Spell(SpellSlot slot,
float range = float.MaxValue,
TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
{
Slot = slot;
Range = range;
DamageType = damageType;
// Default values
MinHitChance = HitChance.High;
}
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:11,代码来源:Spell.cs
示例8: ConvertDamageType
private DamageType ConvertDamageType(TargetSelector.DamageType type)
{
switch (type)
{
case TargetSelector.DamageType.Physical:
return DamageType.Physical;
case TargetSelector.DamageType.Magical:
return DamageType.Magical;
case TargetSelector.DamageType.True:
return DamageType.True;
}
return DamageType.True;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:13,代码来源:Spell.cs
示例9: Smite
public Smite(TargetSelector.DamageType dmgtype, Menu activator)
{
DamageType = dmgtype;
SetSlot();
if (Slot != SpellSlot.Unknown)
{
Range = 700f;
CanCastOnEnemy = Blue.Any(i => Items.HasItem(i)) || Red.Any(i => Items.HasItem(i));
#region jungle minions
if (LeagueSharp.Common.Utility.Map.GetMap().Type.Equals(LeagueSharp.Common.Utility.Map.MapType.TwistedTreeline))
{
JungleMinions = new string[] { "TT_Spiderboss", "TT_NWraith", "TT_NGolem", "TT_NWolf" };
}
else
{
JungleMinions = new string[]
{
"SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red", "SRU_Krug", "SRU_Dragon",
"SRU_Baron", "Sru_Crab"
};
}
#endregion
summoners = new Menu("Smite", "summonersmite");
summoners.AddItem(new MenuItem("SMITEENEMY", "Auto Smite Enemy")).SetValue(true)
.ValueChanged += (s, ar) =>
{
bool newVal = ar.GetNewValue<bool>();
((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Auto Smite Enemy" : null);
};
summoners.AddItem(new MenuItem("SMITEJUNGLE", "Auto Smite Monster")).SetValue(true)
.ValueChanged += (s, ar) =>
{
bool newVal = ar.GetNewValue<bool>();
((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Auto Smite Monster" : null);
};
summoners.AddItem(new MenuItem("SMITEENABLE", "Enabled").SetValue<KeyBind>(new KeyBind(32, KeyBindType.Press)));
summoners.Item("SMITEENEMY").Permashow(true, "Auto Smite Enemy");
summoners.Item("SMITEJUNGLE").Permashow(true, "Auto Smite Monster");
activator.AddSubMenu(summoners);
}
}
开发者ID:47110572,项目名称:LeagueSharp,代码行数:44,代码来源:Smite.cs
示例10: GetNearlyKillableTarget
public static Obj_AI_Hero GetNearlyKillableTarget(Spell Spell, SpellSlot[] slots, TargetSelector.DamageType DamageType)
{
var targetSelectorTarget = TargetSelector.GetTarget(Spell.Range, TargetSelector.DamageType.Magical);
var targetSelectorTargetIsKillable = Spell.GetDamage(targetSelectorTarget) > targetSelectorTarget.Health + 5;
foreach (var target in HeroManager.Enemies.Where(n => n.IsValidTarget(Spell.Range)))
{
var SpellDamage = Spell.GetDamage(target);
if (target.Health + 5 > SpellDamage
&& target.Health + 5 < SpellDamage
+ ObjectManager.Player.GetAutoAttackDamage(target)
+ ObjectManager.Player.GetComboDamage(target, slots
.Except(new List<SpellSlot>() { Spell.Slot }).ToList()))
{
return target;
}
}
return targetSelectorTargetIsKillable ? targetSelectorTarget : null;
}
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:20,代码来源:DZTargetHelper.cs
示例11: OnGameLoad
private static void OnGameLoad(EventArgs args)
{
Game.PrintChat("<font color = \"#00bfff\">Master Series</font> by <font color = \"#9370db\">Brian</font>");
Game.PrintChat("<font color = \"#ffa500\">Feel free to donate via Paypal to:</font> <font color = \"#ff4500\">[email protected]</font>");
Name = Player.ChampionName;
Config = new Menu("Master Of " + Name, "Master_" + Name, true);
Config.AddSubMenu(new Menu("Target Selector", "TSSettings"));
Config.SubMenu("TSSettings").AddItem(new MenuItem("tsMode", "Mode").SetValue(new StringList(new[] { "Auto", "Most AD", "Most AP", "Less Attack", "Less Cast", "Low Hp", "Closest", "Near Mouse" })));
Config.SubMenu("TSSettings").AddItem(new MenuItem("tsFocus", "Forced Target").SetValue(true));
Config.SubMenu("TSSettings").AddItem(new MenuItem("tsDraw", "Draw Target").SetValue(true));
selectTarget = new TargetSelector(2000, TargetSelector.TargetingMode.AutoPriority);
var OWMenu = new Menu("Orbwalker", "Orbwalker");
LXOrbwalker.AddToMenu(OWMenu);
Config.AddSubMenu(OWMenu);
try
{
if (Activator.CreateInstance(null, "Master." + Name) != null)
{
var QData = Player.Spellbook.GetSpell(SpellSlot.Q);
var WData = Player.Spellbook.GetSpell(SpellSlot.W);
var EData = Player.Spellbook.GetSpell(SpellSlot.E);
var RData = Player.Spellbook.GetSpell(SpellSlot.R);
//Game.PrintChat("{0}/{1}/{2}/{3}", QData.SData.CastRange[0], WData.SData.CastRange[0], EData.SData.CastRange[0], RData.SData.CastRange[0]);
FData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonerflash"));
SData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonersmite"));
IData = Player.SummonerSpellbook.GetSpell(Player.GetSpellSlot("summonerdot"));
Game.OnGameUpdate += OnGameUpdate;
Drawing.OnDraw += OnDraw;
SkinChanger(null, null);
}
}
catch
{
Game.PrintChat("[Master Series] => {0} Not Support !", Name);
}
Config.AddToMainMenu();
}
开发者ID:CupidL0ve,项目名称:LeagueSharp,代码行数:40,代码来源:Program.cs
示例12: Ignite
public Ignite(TargetSelector.DamageType dmgtype, Menu activator)
{
DamageType = dmgtype;
SetSlot();
if (Slot != SpellSlot.Unknown)
{
Range = 550f;
summoners = new Menu("Ignite", "summonerignite");
summoners.AddItem(new MenuItem("IGNITEENEMY", "Use Ignite")).SetValue(true);
summoners.AddItem(new MenuItem("IGNITEKS", "Use Ignite to KS")).SetValue(true)
.ValueChanged += (s, ar) =>
{
bool newVal = ar.GetNewValue<bool>();
((MenuItem)s).Permashow(ar.GetNewValue<bool>(), newVal ? "Ignite Kill Steal" : null);
};
summoners.AddItem(new MenuItem("IGNITEENABLE", "Enabled").SetValue<KeyBind>(new KeyBind(32, KeyBindType.Press)));
summoners.Item("IGNITEKS").Permashow(true, "Ignite Killsteal");
activator.AddSubMenu(summoners);
}
}
开发者ID:jayblah,项目名称:Mirinsharp,代码行数:22,代码来源:Ignite.cs
示例13: isKillableAndValidTarget
internal static bool isKillableAndValidTarget(this Obj_AI_Minion Target, double CalculatedDamage, TargetSelector.DamageType damageType, float distance = float.MaxValue)
{
if (Target == null || !Target.IsValidTarget(distance) || Target.Health <= 0 || Target.HasBuffOfType(BuffType.SpellImmunity) || Target.HasBuffOfType(BuffType.SpellShield) || Target.CharData.BaseSkinName == "gangplankbarrel")
return false;
if (ObjectManager.Player.HasBuff("summonerexhaust"))
CalculatedDamage *= 0.6;
BuffInstance dragonSlayerBuff = ObjectManager.Player.GetBuff("s5test_dragonslayerbuff");
if (dragonSlayerBuff != null)
{
if (dragonSlayerBuff.Count >= 4)
CalculatedDamage += dragonSlayerBuff.Count == 5 ? CalculatedDamage * 0.30 : CalculatedDamage * 0.15;
if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("dragon"))
CalculatedDamage *= 1 - (dragonSlayerBuff.Count * 0.07);
}
if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("baron") && ObjectManager.Player.HasBuff("barontarget"))
CalculatedDamage *= 0.5;
return Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) < CalculatedDamage - 2;
}
开发者ID:47110572,项目名称:LeagueSharp-11,代码行数:23,代码来源:ExtraExtensions.cs
示例14: Get
public static Obj_AI_Hero Get(float inRange, bool locked = false, TargetSelector.DamageType dtype = TargetSelector.DamageType.Magical)
{
if (s_Target != null)
{
if (!s_Target.IsValidTarget() || s_Target.IsDead)
s_Target = null;
else if (s_Target.Distance(ObjectManager.Player.ServerPosition) > inRange)
{
if (locked)
return null;
else
s_Target = null;
}
}
if (s_Target == null)
Set(TargetSelector.GetTarget(inRange, dtype));
if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget != s_Target && TargetSelector.SelectedTarget.Distance(ObjectManager.Player.ServerPosition) < 1000)
Set(TargetSelector.SelectedTarget);
return s_Target;
}
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:23,代码来源:Target.cs
示例15: Get
public static Obj_AI_Hero Get(float inRange, bool locked = false, TargetSelector.DamageType dtype = TargetSelector.DamageType.Physical)
{
if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(inRange))
{
Set(TargetSelector.SelectedTarget);
return TargetSelector.SelectedTarget;
}
if (s_Target != null)
{
if (!s_Target.IsValidTarget())
{
s_Target = null;
}
else
{
if (s_Target.IsDead || !s_Target.IsTargetable)
s_Target = null;
else if (s_Target.Distance(ObjectManager.Player.ServerPosition) > inRange)
{
if (locked)
return s_Target;
else
s_Target = null;
}
}
}
if (s_Target == null)
Set(TargetSelector.GetTarget(inRange, dtype));
else
{
if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget != s_Target && TargetSelector.SelectedTarget.IsValidTarget(inRange))
Set(TargetSelector.SelectedTarget);
}
return s_Target;
}
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:37,代码来源:RivenTarget.cs
示例16: CreateMenu
public static Menu CreateMenu()
{
Config = new Menu("SephLux", "Lux", true);
SPrediction.Prediction.Initialize(Config);
LeagueSharp.Common.TargetSelector TargetSelector = new LeagueSharp.Common.TargetSelector();
Menu TSMenu = new Menu("Target Selector", "TS", false);
TargetSelector.AddToMenu(TSMenu);
Config.AddSubMenu(TSMenu);
Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking", false));
Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
Menu Combo = new Menu("Combo", "Combo", false);
Combo.AddItem(new MenuItem("Combo.UseQ", "Use Q", false).SetValue(true));
Combo.AddItem(new MenuItem("Combo.UseW", "Use W", false).SetValue(true));
Combo.AddItem(new MenuItem("Combo.UseE", "Use E", false).SetValue(true));
Combo.AddItem(new MenuItem("Combo.UseE2", "Use E2", false).SetValue(true));
Combo.AddItem(new MenuItem("Combo.UseR", "Use R", false).SetValue(true));
Config.AddSubMenu(Combo);
Menu KillSteal = new Menu("Killsteal", "Killsteal", false);
KillSteal.AddItem(new MenuItem("Killsteal", "KillSteal", false).SetValue(true));
KillSteal.AddItem(new MenuItem("Killsteal.UseQ", "Use Q", false).SetValue(true));
KillSteal.AddItem(new MenuItem("Killsteal.UseE", "Use E", false).SetValue(true));
KillSteal.AddItem(new MenuItem("Killsteal.UseE2", "Use E", false).SetValue(true));
KillSteal.AddItem(new MenuItem("Killsteal.UseR", "Use R", false).SetValue(true));
KillSteal.AddItem(new MenuItem("Killsteal.UseIgnite", "Use Ignite", false).SetValue(true));
Config.AddSubMenu(KillSteal);
Menu Harass = new Menu("Harass", "Harass", false);
Harass.AddItem(new MenuItem("Keys.HarassT", "Harass Toggle", false).SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
Harass.AddItem(new MenuItem("Harass.UseQ", "Use Q", false).SetValue(true));
Harass.AddItem(new MenuItem("Harass.UseE", "Use E", false).SetValue(true));
Harass.AddItem(new MenuItem("Harass.Mana", "Min mana for harass (%)", false).SetValue(new Slider(50, 0, 100)));
Config.AddSubMenu(Harass);
Menu Farm = new Menu("Farm (LH)", "Farm", false);
Farm.AddItem(new MenuItem("Farm.Enable", "Enable abilities for farming").SetValue(true));
Farm.AddItem(new MenuItem("Farm.Mana", "Minimum Mana %").SetValue(new Slider(50, 0, 100)));
Farm.AddItem(new MenuItem("Farm.UseQ", "Use Q").SetValue(true));
Farm.AddItem(new MenuItem("Farm.UseE", "Use E").SetValue(true));
Config.AddSubMenu(Farm);
Menu Waveclear = new Menu("Waveclear", "Waveclear", false);
Waveclear.AddItem(new MenuItem("Waveclear.UseQ", "Use Q").SetValue(true));
Waveclear.AddItem(new MenuItem("Waveclear.UseR", "Use R").SetValue(true));
Waveclear.AddItem(new MenuItem("Waveclear.Rcount", "Minions for R").SetValue(new Slider(10, 0, 20)));
Waveclear.AddItem(new MenuItem("Waveclear.UseE", "Use E").SetValue(true));
Waveclear.AddItem(new MenuItem("Waveclear.UseE2", "Use E2").SetValue(true));
Config.AddSubMenu(Waveclear);
Menu Interrupter = new Menu("Interrupter", "Interrupter +", false);
Interrupter.AddItem(new MenuItem("Interrupter.UseQ", "Use Q").SetValue(true));
Interrupter.AddItem(new MenuItem("Interrupter.AntiGapClose", "AntiGapClosers").SetValue(true));
Interrupter.AddItem(new MenuItem("Interrupter.AG.UseQ", "AntiGapClose with Q").SetValue(true));
Config.AddSubMenu(Interrupter);
Menu Blist = new Menu("BlackList", "BlackList", false);
foreach (var hero in HeroManager.Enemies)
{
var champ = hero;
var addhero = Blist.AddItem(new MenuItem("Blacklist." + hero.ChampionName, hero.ChampionName, false).SetValue(false));
addhero.ValueChanged += (sender, args) =>
{
if (args.GetNewValue<bool>())
{
BlackList.Add(champ);
}
else
{
BlackList.Remove(champ);
}
};
}
Config.AddSubMenu(Blist);
Menu Misc = new Menu("Hitchance Settings", "Misc", false);
Misc.AddItem(new MenuItem("Hitchance.Q", "Q Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 1)));
Misc.AddItem(new MenuItem("Hitchance.E", "E Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 1)));
Misc.AddItem(new MenuItem("Hitchance.R", "R Hit Chance").SetValue(new StringList(new[] { HitChance.Low.ToString(), HitChance.Medium.ToString(), HitChance.High.ToString(), HitChance.VeryHigh.ToString(), HitChance.Immobile.ToString() }, 4)));
Misc.AddItem(new MenuItem("Misc.Debug", "Debug", false).SetValue(false));
Config.AddSubMenu(Misc);
Menu Drawings = new Menu("Drawings", "Drawing", false);
Drawings.AddItem(new MenuItem("Drawing.Disable", "Disable all").SetValue(false));
Drawings.AddItem(new MenuItem("Drawing.DrawQ", "Draw Q").SetValue(true));
Drawings.AddItem(new MenuItem("Drawing.DrawE", "Draw E").SetValue(true));
Drawings.AddItem(new MenuItem("Drawing.DrawR", "Draw R").SetValue(true));
Config.AddSubMenu(Drawings);
return Config;
}
开发者ID:47110572,项目名称:LeagueSharp-6,代码行数:92,代码来源:LuxMenu.cs
示例17: Game_OnGameLoad
private static void Game_OnGameLoad(EventArgs args)
{
if (Player.BaseSkinName != "Pantheon") return;
if (Player.IsDead) return;
Q = new Spell(SpellSlot.Q, 620f);
W = new Spell(SpellSlot.W, 620f);
E = new Spell(SpellSlot.E, 640f);
R = new Spell(SpellSlot.R, 2000f);
Q.SetTargetted(0.2f, 1700f);
W.SetTargetted(0.2f, 1700f);
E.SetSkillshot(0.25f, 15f * 2 * (float)Math.PI / 180, 2000f, false, SkillshotType.SkillshotCone);
SpellList.Add(Q);
SpellList.Add(W);
SpellList.Add(E);
SpellList.Add(R);
igniteSlot = Player.GetSpellSlot("SummonerDot");
smiteSlot = Player.GetSpellSlot("SummonerSmite");
vTargetSelector = new TargetSelector(1000, TargetSelector.TargetingMode.LowHP);
Config = new Menu("xQx | Pantheon", "Pantheon", true);
var targetSelectorMenu = new Menu("Target Selector", "TargetSelector");
SimpleTs.AddToMenu(targetSelectorMenu);
Config.AddSubMenu(targetSelectorMenu);
Config.SubMenu("TargetSelector")
.AddItem(new MenuItem("Mode", "Mode")).SetValue(new StringList(new[] { "AutoPriority", "Closest", "LessAttack", "LessCast", "LowHP", "MostAD", "MostAP", "NearMouse" }, 1));
Config.SubMenu("TargetSelector")
.AddItem(new MenuItem("TSRange", "Range")).SetValue(new Slider(1000, 2000, 100));
Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));
Orbwalker.SetAttack(true);
// Combo
Config.AddSubMenu(new Menu("Combo", "Combo"));
Config.SubMenu("Combo").AddItem(new MenuItem("UseQCombo", "Use Q").SetValue(true));
Config.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "Use W").SetValue(true));
Config.SubMenu("Combo").AddItem(new MenuItem("UseECombo", "Use E").SetValue(true));
Config.SubMenu("Combo").AddItem(new MenuItem("UseRCombo", "Use R").SetValue(true));
Config.SubMenu("Combo").AddItem(new MenuItem("ComboActive", "Combo!")
.SetValue(new KeyBind("Z".ToCharArray()[0],KeyBindType.Press)));
// Harass
Config.AddSubMenu(new Menu("Harass", "Harass"));
Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true));
Config.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "Use W").SetValue(true));
Config.SubMenu("Harass").AddItem(new MenuItem("HarassMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
Config.SubMenu("Harass").AddItem(new MenuItem("HarassActiveT", "Harass (toggle)!").SetValue(new KeyBind("H".ToCharArray()[0], KeyBindType.Toggle)));
Config.SubMenu("Harass").AddItem(new MenuItem("HarassActive", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));
// Lane Clear
Config.AddSubMenu(new Menu("LaneClear", "LaneClear"));
Config.SubMenu("LaneClear").AddItem(new MenuItem("UseQLaneClear", "Use Q").SetValue(false));
Config.SubMenu("LaneClear").AddItem(new MenuItem("UseELaneClear", "Use E").SetValue(false));
Config.SubMenu("LaneClear").AddItem(new MenuItem("LaneClearMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
Config.SubMenu("LaneClear").AddItem(new MenuItem("LaneClearActive", "LaneClear!").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));
// Jungling Farm
Config.AddSubMenu(new Menu("JungleFarm", "JungleFarm"));
Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseQJungleFarm", "Use Q").SetValue(true));
Config.SubMenu("JungleFarm").AddItem(new MenuItem("UseEJungleFarm", "Use E").SetValue(false));
Config.SubMenu("JungleFarm").AddItem(new MenuItem("AutoSmite", "Auto Smite").SetValue(new KeyBind('N', KeyBindType.Toggle)));
Config.SubMenu("JungleFarm").AddItem(new MenuItem("JungleFarmMana", "Min. Mana Percent: ").SetValue(new Slider(50, 100, 0)));
Config.SubMenu("JungleFarm").AddItem(new MenuItem("JungleFarmActive", "JungleFarm!").SetValue(new KeyBind("V".ToCharArray()[0],KeyBindType.Press)));
// Extras -> Use Items
MenuExtras = new Menu("Extras", "Extras");
Config.AddSubMenu(MenuExtras);
MenuExtras.AddItem(new MenuItem("InterruptSpells", "Interrupt Spells").SetValue(true));
MenuExtras.AddItem(new MenuItem("AutoLevelUp", "Auto Level Up").SetValue(true));
Menu menuUseItems = new Menu("Use Items", "menuUseItems");
Config.SubMenu("Extras").AddSubMenu(menuUseItems);
// Extras -> Use Items -> Targeted Items
MenuTargetedItems = new Menu("Targeted Items", "menuTargetItems");
menuUseItems.AddSubMenu(MenuTargetedItems);
MenuTargetedItems.AddItem(new MenuItem("item3153", "Blade of the Ruined King").SetValue(true));
MenuTargetedItems.AddItem(new MenuItem("item3143", "Randuin's Omen").SetValue(true));
MenuTargetedItems.AddItem(new MenuItem("item3144", "Bilgewater Cutlass").SetValue(true));
MenuTargetedItems.AddItem(new MenuItem("item3146", "Hextech Gunblade").SetValue(true));
MenuTargetedItems.AddItem(new MenuItem("item3184", "Entropy ").SetValue(true));
// Extras -> Use Items -> AOE Items
MenuNonTargetedItems = new Menu("AOE Items", "menuNonTargetedItems");
menuUseItems.AddSubMenu(MenuNonTargetedItems);
MenuNonTargetedItems.AddItem(new MenuItem("item3180", "Odyn's Veil").SetValue(true));
MenuNonTargetedItems.AddItem(new MenuItem("item3131", "Sword of the Divine").SetValue(true));
MenuNonTargetedItems.AddItem(new MenuItem("item3074", "Ravenous Hydra").SetValue(true));
MenuNonTargetedItems.AddItem(new MenuItem("item3077", "Tiamat ").SetValue(true));
MenuNonTargetedItems.AddItem(new MenuItem("item3142", "Youmuu's Ghostblade").SetValue(true));
// Drawing
//.........这里部分代码省略.........
开发者ID:CupidL0ve,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs
示例18: isKillableAndValidTarget
internal static bool isKillableAndValidTarget(this Obj_AI_Base Target, double CalculatedDamage, TargetSelector.DamageType damageType, float distance = float.MaxValue)
{
if (Target == null || !Target.IsValidTarget(distance) || Target.Health <= 0 || Target.CharData.BaseSkinName == "gangplankbarrel")
return false;
if (Target.HasBuff("kindrednodeathbuff"))
{
return false;
}
// Tryndamere's Undying Rage (R)
if (Target.HasBuff("Undying Rage") && Target.Health <= Target.MaxHealth * 0.10f)
{
return false;
}
// Kayle's Intervention (R)
if (Target.HasBuff("JudicatorIntervention"))
{
return false;
}
// Poppy's Diplomatic Immunity (R)
if (Target.HasBuff("DiplomaticImmunity") && !ObjectManager.Player.HasBuff("poppyulttargetmark"))
{
//TODO: Get the actual target mark buff name
return false;
}
// Banshee's Veil (PASSIVE)
if (Target.HasBuff("BansheesVeil"))
{
// TODO: Get exact Banshee's Veil buff name.
return false;
}
// Sivir's Spell Shield (E)
if (Target.HasBuff("SivirShield"))
{
// TODO: Get exact Sivir's Spell Shield buff name
return false;
}
// Nocturne's Shroud of Darkness (W)
if (Target.HasBuff("ShroudofDarkness"))
{
// TODO: Get exact Nocturne's Shourd of Darkness buff name
return false;
}
if (ObjectManager.Player.HasBuff("summonerexhaust"))
CalculatedDamage *= 0.6;
if (Target.CharData.BaseSkinName == "Blitzcrank")
if (!Target.HasBuff("manabarriercooldown"))
if (Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) + (Target.Mana / 2) + Target.PARRegenRate > CalculatedDamage)
return false;
if (Target.HasBuff("FerociousHowl"))
CalculatedDamage *= 0.3;
BuffInstance dragonSlayerBuff = ObjectManager.Player.GetBuff("s5test_dragonslayerbuff");
if (dragonSlayerBuff != null)
if (Target.IsMinion)
{
if (dragonSlayerBuff.Count >= 4)
CalculatedDamage += dragonSlayerBuff.Count == 5 ? CalculatedDamage * 0.30 : CalculatedDamage * 0.15;
if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("dragon"))
CalculatedDamage *= 1 - (dragonSlayerBuff.Count * 0.07);
}
if (Target.CharData.BaseSkinName.ToLowerInvariant().Contains("baron") && ObjectManager.Player.HasBuff("barontarget"))
CalculatedDamage *= 0.5;
return Target.Health + Target.HPRegenRate + (damageType == TargetSelector.DamageType.Physical ? Target.PhysicalShield : Target.MagicalShield) < CalculatedDamage;
}
开发者ID:BlueSun99,项目名称:LeagueSharp-2,代码行数:77,代码来源:ExtraExtensions.cs
示例19: GetTarget
public static Obj_AI_Hero GetTarget(float vDefaultRange = 0,
TargetSelector.DamageType vDefaultDamageType = TargetSelector.DamageType.Physical)
{
if (Math.Abs(vDefaultRange) < 0.00001)
vDefaultRange = Program.E.Range;
if (!menu.Item("AssassinActive").GetValue<bool>())
return TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType);
var assassinRange = menu.Item("AssassinSearchRange").GetValue<Slider>().Value;
var vEnemy =
HeroManager.Enemies.Where(
enemy =>
!enemy.IsDead && enemy.IsVisible && menu.Item("Assassin" + enemy.ChampionName) != null &&
menu.Item("Assassin" + enemy.ChampionName).GetValue<bool>() &&
Program.Player.Distance(enemy) < assassinRange);
if (menu.Item("AssassinSelectOption").GetValue<StringList>().SelectedIndex == 1)
{
vEnemy = (from vEn in vEnemy select vEn).OrderByDescending(vEn => vEn.MaxHealth);
}
var objAiHeroes = vEnemy as Obj_AI_Hero[] ?? vEnemy.ToArray();
var t = !objAiHeroes.Any()
? TargetSelector.GetTarget(vDefaultRange, vDefaultDamageType)
: objAiHeroes[0];
return t;
}
开发者ID:AwkwardDev,项目名称:LeagueSharp2,代码行数:31,代码来源:AssassinManager.cs
示例20: GetTarget
private static Obj_AI_Hero GetTarget(float range, TargetSelector.DamageType damageType = TargetSelector.DamageType.Physical)
{
var currTarget = TargetSelector.GetTarget(range, damageType);
return currTarget != null && currTarget.IsValid ? currTarget : null;
}
开发者ID:Pawes1234,项目名称:LeagueSharp,代码行数:5,代码来源:Program.cs
注:本文中的LeagueSharp.Common.TargetSelector类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论