本文整理汇总了C#中UltimateModeType类的典型用法代码示例。如果您正苦于以下问题:C# UltimateModeType类的具体用法?C# UltimateModeType怎么用?C# UltimateModeType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UltimateModeType类属于命名空间,在下文中一共展示了UltimateModeType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RLogic
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo)
{
try
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0 &&
UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true)))
{
R.Cast(pred.CastPosition);
return true;
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例2: GetDamage
public float GetDamage(Obj_AI_Hero hero, UltimateModeType mode, int hits = 5)
{
if (DamageCalculation != null)
{
try
{
var dmgMultiplicator =
_menu.Item(_menu.Name + ".ultimate.damage-percent" + (hits <= 1 ? "-single" : string.Empty))
.GetValue<Slider>()
.Value / 100;
return DamageCalculation(hero, dmgMultiplicator, mode != UltimateModeType.Flash) * dmgMultiplicator;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
return 0f;
}
示例3: CheckSingle
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
if (_menu == null || target == null || !target.IsValidTarget())
{
return false;
}
if (ShouldSingle(mode))
{
var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value;
if (Spells != null &&
!Spells.Any(
s =>
s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) &&
s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 ||
s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f))
{
minHealth = 0;
}
if (target.HealthPercent < minHealth)
{
return false;
}
var alliesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value;
var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-allies").GetValue<Slider>().Value;
var enemiesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value;
var enemiesMax =
_menu.Item(_menu.Name + ".ultimate.single.max-add-enemies").GetValue<Slider>().Value;
var pos = ObjectManager.Player.Position.Extend(
target.Position, ObjectManager.Player.Distance(target) / 2f);
var aCount =
GameObjects.AllyHeroes.Count(
h => h.IsValid && !h.IsDead && !h.IsMe && h.Distance(pos) <= alliesRange);
var eCount =
GameObjects.EnemyHeroes.Count(
h =>
h.IsValid && !h.IsDead && h.IsVisible && h.NetworkId != target.NetworkId &&
h.Distance(pos) <= enemiesRange);
if (aCount > alliesMax || eCount > enemiesMax)
{
return false;
}
if (DamageCalculation != null)
{
if (GetDamage(target, mode, 1) < target.Health)
{
return false;
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例4: IsActive
public bool IsActive(UltimateModeType mode, Obj_AI_Hero hero = null)
{
if (_menu != null)
{
if (mode == UltimateModeType.Combo)
{
return Combo && _menu.Item(_menu.Name + ".ultimate.combo.enabled").GetValue<bool>();
}
if (mode == UltimateModeType.Auto)
{
return Auto && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>();
}
if (mode == UltimateModeType.Flash)
{
return Flash && Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() &&
_menu.Item(_menu.Name + ".ultimate.flash.hotkey").GetValue<KeyBind>().Active;
}
if (mode == UltimateModeType.Assisted)
{
return Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() &&
_menu.Item(_menu.Name + ".ultimate.assisted.hotkey").GetValue<KeyBind>().Active;
}
if (mode == UltimateModeType.Interrupt)
{
return Auto && Interrupt && hero != null &&
_menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() &&
HeroListManager.Check("ultimate-interrupt", hero);
}
if (mode == UltimateModeType.Gapcloser)
{
return Auto && Gapcloser && hero != null &&
_menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() &&
HeroListManager.Check("ultimate-gapcloser", hero);
}
}
return false;
}
示例5: ShouldMove
public bool ShouldMove(UltimateModeType mode)
{
if (_menu != null)
{
var enabled = _menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, true) + ".move-cursor");
return enabled != null && enabled.GetValue<bool>();
}
return false;
}
示例6: RLogicSingle
private void RLogicSingle(UltimateModeType mode, HitChance hitChance, bool face = true)
{
try
{
if (Ultimate.ShouldSingle(mode))
{
foreach (var target in
Targets.Where(
t => (!face || t.IsFacing(Player)) && R.CanCast(t) && Ultimate.CheckSingle(mode, t)))
{
var pred = R.GetPrediction(target, true);
if (pred.Hitchance >= hitChance)
{
R.Cast(pred.CastPosition);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
示例7: RLogicSingle
private void RLogicSingle(UltimateModeType mode, HitChance hitChance)
{
try
{
if (Q.IsCharging || !_ultimate.ShouldSingle(mode))
{
return;
}
foreach (var t in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = R.GetPrediction(t);
if (pred.Hitchance >= hitChance)
{
R.Cast(pred.CastPosition);
break;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
示例8: RLogicSingle
private void RLogicSingle(UltimateModeType mode)
{
try
{
if (Ultimate.ShouldSingle(mode))
{
foreach (var target in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t)))
{
var hits = GetRHits(target);
if (hits.Item1 > 0)
{
R.Cast(hits.Item3);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}
示例9: CheckSingle
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
var modeString = GetModeString(mode);
if (_menu == null || target == null || !target.IsValidTarget())
{
return false;
}
if (ShouldSingle(mode))
{
var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value;
if (target.HealthPercent < minHealth)
{
return false;
}
var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-allies").GetValue<Slider>().Value;
var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-enemies").GetValue<Slider>().Value;
var pos = ObjectManager.Player.Position.Extend(
target.Position, ObjectManager.Player.Distance(target) / 2f);
var aCount =
GameObjects.AllyHeroes.Count(h => h.IsValid && !h.IsMe && !h.IsDead && h.Distance(pos) <= 1750);
var eCount =
GameObjects.EnemyHeroes.Count(
h => h.IsValid && !h.IsDead && h.IsVisible && h.Distance(pos) <= 1750);
if (aCount > alliesMax || eCount > enemiesMax)
{
return false;
}
if (DamageCalculation != null &&
_menu.Item(_menu.Name + ".ultimate." + modeString + ".damage-check").GetValue<bool>())
{
if (GetDamage(target) < target.Health)
{
return false;
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例10: RLogicSingle
private bool RLogicSingle(UltimateModeType mode, bool simulated = false)
{
try
{
if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) ||
!_ultimate.ShouldSingle(mode))
{
return false;
}
foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0)
{
if (!simulated)
{
R.Cast(pred.CastPosition);
if (Orbwalking.InAutoAttackRange(target))
{
Orbwalker.ForceTarget(target);
}
}
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例11: RLogic
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target)
{
try
{
if (Ultimate.IsActive(mode))
{
var hits = GetRHits(target);
if (Ultimate.Check(mode, hits.Item2))
{
R.Cast(hits.Item3);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例12: RLogic
private bool RLogic(int min, bool q, bool w, bool e, UltimateModeType mode = UltimateModeType.Combo)
{
try
{
var hits = GetHits(R);
if (UltimateManager.Check(mode, min, hits.Item2, hero => CalcComboDamage(hero, q, w, e, true)))
{
R.Cast(Player.Position);
return true;
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例13: RLogic
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target, bool simulated = false)
{
try
{
if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) ||
!Ultimate.IsActive(mode))
{
return false;
}
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits))
{
if (!simulated)
{
R.Cast(pred.CastPosition);
if (Orbwalking.InAutoAttackRange(target))
{
Orbwalker.ForceTarget(target);
}
}
return true;
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例14: RLogic
private bool RLogic(Obj_AI_Hero target,
HitChance hitChance,
int min,
bool q,
bool e,
UltimateModeType mode = UltimateModeType.Combo)
{
try
{
if (Q.IsCharging || target == null)
{
return false;
}
var pred = R.GetPrediction(target);
if (pred.Hitchance >= hitChance)
{
var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList();
if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, e, true)))
{
R.Cast(pred.CastPosition);
return true;
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例15: RLogicSingle
private void RLogicSingle(UltimateModeType mode)
{
try
{
if (_ultimate.ShouldSingle(mode))
{
foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)))
{
var pred = CPrediction.Circle(R, target, HitChance.High, false);
if (pred.TotalHits > 0)
{
R.Cast(pred.CastPosition);
break;
}
}
}
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
}