本文整理汇总了C#中Obj_AI_Base类的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base类的具体用法?C# Obj_AI_Base怎么用?C# Obj_AI_Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Obj_AI_Base类属于命名空间,在下文中一共展示了Obj_AI_Base类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ProcessSpell_TwitchSprayandPrayAttack
private void ProcessSpell_TwitchSprayandPrayAttack(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs)
{
if (spellData.spellName == "TwitchSprayandPrayAttack")
{
spellData.spellDelay = hero.AttackCastDelay * 1000;
}
}
开发者ID:aikoy,项目名称:ezEvade,代码行数:7,代码来源:Twitch.cs
示例2: Obj_AI_Hero_OnAggro
private void Obj_AI_Hero_OnAggro(Obj_AI_Base sender, GameObjectAggroEventArgs args)
{
if (sender.IsEnemy && args.NetworkId == player.NetworkId && !aggroList.Contains(sender.NetworkId))
{
aggroList.Add(sender.NetworkId);
}
}
开发者ID:koolkaracter,项目名称:LeagueSharp,代码行数:7,代码来源:MonkeyKing.cs
示例3: GetAARange
/// <summary>
/// Gets auto attack range of given unit
/// </summary>
/// <param name="_unit">Unit to get aa range</param>
/// <returns>Auto attack range of unit</returns>
public static float GetAARange(Obj_AI_Base _unit = null)
{
Obj_AI_Base unit = CorrectUnit(_unit);
if (unit.CharData.BaseSkinName == "Azir")
return 1000f;
return unit.AttackRange + unit.BoundingRadius;
}
开发者ID:JelloBeans,项目名称:SAC,代码行数:12,代码来源:Utility.cs
示例4: Contains
public static bool Contains(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs args)
{
var name = unit.CharData.BaseSkinName;
var slot = unit.GetSpellSlot(args);
if (!List.ContainsKey(name) || !Program.Menu.Item(name).IsActive())
{
return false;
}
var correctSlot = List[name].Equals(slot);
if (args.SData.IsAutoAttack())
{
if (name.Equals("Blitzcrank")) {}
}
if (name.Equals("Jayce"))
{
correctSlot = correctSlot && unit.CharData.BaseSkinName.Equals("JayceHammerForm");
}
if (name.Equals("LeBlanc"))
{
correctSlot = args.SData.Name.Equals("LeblancChaosOrbM");
}
if (name.Equals("Lissandra"))
{
//correctSlot = spellslot 48
}
//Game.PrintChat("{0} {1} {2}", name, slot, active);
return correctSlot;
}
开发者ID:y1n,项目名称:LeagueSharp,代码行数:35,代码来源:SpellBlock.cs
示例5: GetSpellDamage
public static float GetSpellDamage(this SpellSlot slot, Obj_AI_Base target, int typeOfDamage = 1)
{
if (target != null)
{
var level = Util.MyHero.Spellbook.GetSpell(slot).Level;
switch (slot)
{
case SpellSlot.Q:
return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, 1.1f * Util.MyHero.TotalAttackDamage);
case SpellSlot.W:
return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, 10f + 50f * level + 1.4f * Util.MyHero.TotalAttackDamage);
case SpellSlot.E:
return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Magical, 25f + 55f * level + 1f * Util.MyHero.TotalMagicalDamage);
case SpellSlot.R:
var percentMod = Math.Min((int)(Vector3.Distance(target.ServerPosition, Util.MyHero.ServerPosition) / 100f) * 6f + 10f, 100f) / 100f;
float rawDamage;
if (typeOfDamage == 2)
{
rawDamage = 0.8f * percentMod * (200f + 50f * level + Util.MyHero.TotalAttackDamage + (0.25f + 0.05f * level) * (target.MaxHealth - target.Health));
}
else
{
rawDamage = percentMod * (200f + 50f * level + Util.MyHero.TotalAttackDamage + (0.25f + 0.05f * level) * (target.MaxHealth - target.Health));
}
return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, rawDamage);
}
}
return Util.MyHero.GetSpellDamage(target, slot);
}
开发者ID:chienhao10,项目名称:Elobuddy-10,代码行数:29,代码来源:Damage.cs
示例6: SpellCast
public static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (!sender.IsMe) return;
if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) &&
Manager.MenuManager.UseQLC && Variables._Player.ManaPercent >= Manager.MenuManager.UseQLCMana) &&
Manager.SpellManager.Q.IsReady())
{
if (Orbwalker.CanAutoAttack)
{
return;
}
foreach (var minion in EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
Variables._Player.ServerPosition, Variables._Player.GetAutoAttackRange()))
{
if (minion == null) return;
var dmg = Variables._Player.GetSpellDamage(minion, SpellSlot.Q) +
Variables._Player.GetAutoAttackDamage(minion);
if (Prediction.Health.GetPrediction(minion, (int)(Variables._Player.AttackDelay * 1000)) <= dmg / 2 &&
(Orbwalker.LastTarget == null || Orbwalker.LastTarget.NetworkId != minion.NetworkId))
{
Player.CastSpell(SpellSlot.Q, Game.CursorPos);
}
}
}
}
开发者ID:Kysamaa,项目名称:EloBuddy,代码行数:26,代码来源:LaneClear.cs
示例7: CastSpellQShot
public static void CastSpellQShot(Obj_AI_Base target, int spellAoE)
{
var po = Q.GetPrediction(target);
if (po.CollisionObjects.Count > 0)
{
var firstCol = po.CollisionObjects.OrderBy(unit => unit.Distance(Player.ServerPosition)).First();
if (firstCol.IsValidTarget() && (/*firstCol.Distance(target.ServerPosition) < spellAoE ||*/ firstCol.Distance(po.UnitPosition) < spellAoE))
{
if(firstCol.Type == GameObjectType.obj_AI_Hero)
if (Program.Config.Item("MURAMANA").GetValue<bool>() && (Items.HasItem(ItemData.Muramana.Id) || Items.HasItem(ItemData.Muramana2.Id)))
{
if (!Player.HasBuff("Muramana"))
{
Items.UseItem(ItemData.Muramana.Id);
Items.UseItem(ItemData.Muramana2.Id);
}
}
Q.Cast(po.CastPosition);
}
}
else
{
if (Program.Config.Item("MURAMANA").GetValue<bool>() && (Items.HasItem(ItemData.Muramana.Id) || Items.HasItem(ItemData.Muramana2.Id)))
{
if (!Player.HasBuff("Muramana"))
{
Items.UseItem(ItemData.Muramana.Id);
Items.UseItem(ItemData.Muramana2.Id);
}
}
Q.Cast(po.CastPosition);
}
}
开发者ID:uio25371555,项目名称:LeagueSharp-Development,代码行数:33,代码来源:Ezreal.cs
示例8: CastQ
private static void CastQ(Obj_AI_Base unit, Vector2 unitPosition, int minTargets = 0)
{
var points = new List<Vector2>();
var hitBoxes = new List<int>();
var startPoint = ObjectManager.Player.ServerPosition.To2D();
var originalDirection = Q.Range*(unitPosition - startPoint).Normalized();
foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>())
{
if (enemy.IsValidTarget() && enemy.NetworkId != unit.NetworkId)
{
var pos = Q.GetPrediction(enemy);
if (pos.HitChance >= Prediction.HitChance.LowHitchance)
{
points.Add(pos.Position.To2D());
hitBoxes.Add((int) enemy.BoundingRadius);
}
}
}
var posiblePositions = new List<Vector2>();
for (var i = 0; i < 3; i++)
{
if (i == 0) posiblePositions.Add(unitPosition + originalDirection.Rotated(0));
if (i == 1) posiblePositions.Add(startPoint + originalDirection.Rotated(Qangle));
if (i == 2) posiblePositions.Add(startPoint + originalDirection.Rotated(-Qangle));
}
if (startPoint.Distance(unitPosition) < 900)
{
for (var i = 0; i < 3; i++)
{
var pos = posiblePositions[i];
var direction = (pos - startPoint).Normalized().Perpendicular();
var k = (2/3*(unit.BoundingRadius + Q.Width));
posiblePositions.Add(startPoint - k*direction);
posiblePositions.Add(startPoint + k*direction);
}
}
var bestPosition = new Vector2();
var bestHit = -1;
foreach (var position in posiblePositions)
{
var hits = CountHits(position, points, hitBoxes);
if (hits > bestHit)
{
bestPosition = position;
bestHit = hits;
}
}
if (bestHit + 1 <= minTargets)
return;
Q.Cast(bestPosition.To3D(), true);
}
开发者ID:,项目名称:,代码行数:60,代码来源:
示例9: CastE
protected bool CastE(Obj_AI_Base target)
{
var collision = E.GetPrediction(target).CollisionObjects;
if (collision != null && collision.Length == 1)
{
var distance1 = target.Distance(Player.Instance);
var distance2 =
E.GetPrediction(target)
.CollisionObjects.OrderBy(x => x.Distance(Player.Instance))
.FirstOrDefault()
.Distance(Player.Instance);
if (distance1 - distance2 > 50)
{
return false;
}
E.Cast(E.GetPrediction(target).CastPosition);
}
else if (E.GetPrediction(target).HitChance >= HitChance.High)
{
E.Cast(target);
}
else
{
return false;
}
Orbwalker.ResetAutoAttack();
Player.IssueOrder(GameObjectOrder.AttackUnit, target);
return true;
}
开发者ID:Enochen,项目名称:EloBuddy,代码行数:30,代码来源:ModeBase.cs
示例10: EvadeData
public EvadeData(Vector2 v, bool bl1, bool bl2, Obj_AI_Base obj)
{
Position = v;
IsTargetted = bl1;
IsSelfCast = bl2;
Target = obj;
}
开发者ID:47110572,项目名称:LeagueSharp,代码行数:7,代码来源:Evader.cs
示例11: getComboDamage
static float getComboDamage(Obj_AI_Base enemy)
{
if (enemy != null)
{
float damage = 0;
if (_Q.IsReady())
if (_R.IsReady() || _W.IsReady() || _E.IsReady())
{
damage += (_Q.GetDamage(enemy) * 2);
}
else
{
damage += _Q.GetDamage(enemy);
}
if (_W.IsReady())
damage += _W.GetDamage(enemy);
if (_E.IsReady())
damage += (_E.GetDamage(enemy));
if (_R.IsReady())
if (_Q.IsReady())
{
damage += (_Q.GetDamage(enemy) * 1.5f * 2f);
}
else
{
damage += _R.GetDamage(enemy);
}
if (!Player.IsWindingUp)
damage += (float)Player.GetAutoAttackDamage(enemy, true);
return damage;
}
return 0;
}
开发者ID:OGNSharp,项目名称:FreshSharp,代码行数:34,代码来源:OnEndScene.cs
示例12: CalculateDamage
/// <summary>
/// Gets the calculated damage based on the given damage type onto the target from source.
/// </summary>
/// <param name="source">
/// The source
/// </param>
/// <param name="target">
/// The target
/// </param>
/// <param name="damageType">
/// The damage type
/// </param>
/// <param name="amount">
/// The amount
/// </param>
/// <returns>
/// The estimated damage from calculations.
/// </returns>
public static double CalculateDamage(
this Obj_AI_Base source,
Obj_AI_Base target,
DamageType damageType,
double amount)
{
var damage = 0d;
switch (damageType)
{
case DamageType.Magical:
damage = source.CalculateMagicDamage(target, amount);
break;
case DamageType.Physical:
damage = source.CalculatePhysicalDamage(target, amount);
break;
case DamageType.Mixed:
damage = source.CalculateMixedDamage(target, damage / 2, damage / 2);
break;
case DamageType.True:
damage = Math.Max(Math.Floor(amount), 0);
break;
}
return damage;
}
开发者ID:CONANLXF,项目名称:Berb.Common,代码行数:43,代码来源:Damage.cs
示例13: Obj_AI_Base_OnProcessSpellCast
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
/*if (args.Target.Equals(Player))
{
args.SData.
}*/
}
开发者ID:AlrikSharp,项目名称:LeagueSharp,代码行数:7,代码来源:J4.cs
示例14: GetComboDamage
private static float GetComboDamage(Obj_AI_Base enemy)
{
var damage = 0d;
if (spells[Spells.Q].IsReady())
{
damage += Player.GetSpellDamage(enemy, SpellSlot.Q);
}
if (spells[Spells.W].IsReady())
{
damage += Player.GetSpellDamage(enemy, SpellSlot.W);
}
if (spells[Spells.E].IsReady())
{
damage += Player.GetSpellDamage(enemy, SpellSlot.E);
}
if (spells[Spells.R].IsReady())
{
//damage += Player.GetSpellDamage(enemy, SpellSlot.R);
damage += enemy.Buffs.Where(buff => buff.Name == "dariushemo").Sum(buff => Player.GetSpellDamage(enemy, SpellSlot.R, 1) * (1 + buff.Count / 5) - 1);
}
return (float)damage;
}
开发者ID:459896686,项目名称:ElBundle,代码行数:28,代码来源:Darius.cs
示例15: GetDragonReduction
public static float GetDragonReduction(Obj_AI_Base target)
{
return Player.HasBuff("s5test_dragonslayerbuff")
? SpellManager.E.GetDamage(target)
* (1 - (.07f * Player.GetBuffCount("s5test_dragonslayerbuff")))
: SpellManager.E.GetDamage(target);
}
开发者ID:Marco727,项目名称:Project-Kalista,代码行数:7,代码来源:Damages.cs
示例16: GetTotalDamage
public static float GetTotalDamage(Obj_AI_Base target)
{
// Auto attack damage
double damage = Player.GetAutoAttackDamage(target);
// Q damage
if (SpellManager.Q.IsReady())
{
damage += Player.GetSpellDamage(target, SpellSlot.Q);
}
// E stack damage with ally ult on enemy
if (SpellManager.E.IsReady() && target.HasBuff("FerociousHowl"))
{
damage += SpellManager.E.GetDamage(target) * 0.7;
}
// E stack damage with exhaust on player
if (SpellManager.E.IsReady() && Player.HasBuff("summonerexhaust"))
{
damage += SpellManager.E.GetDamage(target) * 0.4;
}
// E stack damage
if (SpellManager.E.IsReady())
{
damage += SpellManager.E.GetDamage(target);
}
return (float)damage;
}
开发者ID:Marco727,项目名称:Project-Kalista,代码行数:31,代码来源:Damages.cs
示例17: doAfterAttack
public override void doAfterAttack(Obj_AI_Base minion)
{
if (minion is Obj_AI_Minion)
{
UseQ((Obj_AI_Minion)minion);
}
}
开发者ID:Merc491,项目名称:GoodGuyJodu,代码行数:7,代码来源:Shyvana.cs
示例18: GetComboDamage
private float GetComboDamage(Obj_AI_Base target)
{
float damage = 0f;
if (GeassLib.Functions.Calculations.Damage.CheckNoDamageBuffs((Obj_AI_Hero)target))return damage;
//if (!Champion.Player.IsWindingUp) // can auto attack
// if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
// damage += (float)Champion.Player.GetAutoAttackDamage(target) - 50;
if (Champion.GetSpellR.IsReady())
if (Champion.Player.Distance(target) < Champion.GetSpellR.Range)
damage += Champion.GetSpellR.GetDamage(target);
if (target.HasBuff("tristanaecharge"))
{
int count = target.GetBuffCount("tristanaecharge");
if (!Champion.Player.IsWindingUp)
if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
count++;
damage += (float)(Champion.GetSpellE.GetDamage(target) * (count * 0.30)) + Champion.GetSpellE.GetDamage(target);
return damage;
}
if (Champion.GetSpellE.IsReady())
if (Champion.Player.Distance(target) < Champion.GetSpellE.Range)
damage += (float)(Champion.GetSpellE.GetDamage(target) * 0.30) + Champion.GetSpellE.GetDamage(target); // 1 auto charge
return damage;
}
开发者ID:KallenStadtfeldGeass,项目名称:KallenSharp,代码行数:32,代码来源:Damage.cs
示例19: SpellCast
internal static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (!Helper.GetBool("Evade.WTS", YasuoMenu.EvadeM) || sender.IsAlly || !SpellSlot.W.IsReady() || (!Helper.GetBool("Evade.FOW", YasuoMenu.EvadeM) && !sender.IsVisible))
{
return;
}
if (args.SData.Name.Equals("MissFortuneBulletTime"))
{
var ssdata = GetSpell(args.SData.Name);
if (ssdata.IsEnabled)
{
var end = args.Start.LSTo2D().LSExtend(args.End.LSTo2D(), 1400);
EvadeA.Geometry.Rectangle rect = new EvadeA.Geometry.Rectangle(args.Start.LSTo2D(), end, args.SData.LineWidth);
var topoly = rect.ToPolygon();
var newls = new LittleStruct { poly = topoly, argss = args, RealEndPos = end, StartTick = YasuoEvade.TickCount, data = ssdata };
DetectedPolygons.Add(newls);
LeagueSharp.Common.Utility.DelayAction.Add(3000, () => DetectedPolygons.Clear());
}
}
if (!args.Target.IsMe)
{
return;
}
//Console.WriteLine(args.SData.Name + " " + sender.BaseSkinName);
var sdata = GetSpell(args.SData.Name);
if (sdata != null && sdata.IsEnabled)
{
var castpos = Helper.Yasuo.ServerPosition.LSExtend(args.Start, 50);
LeagueSharp.Common.Utility.DelayAction.Add((int)sdata.delay, () => Helper.Spells[Helper.W].Cast(castpos));
}
}
开发者ID:Xelamats,项目名称:PortAIO,代码行数:31,代码来源:TargettedDanger.cs
示例20: FocusW
private static void FocusW(Obj_AI_Base target)
{
if (Player.Instance.Mana < 5)
{
if (Spells.E.IsReady() && Spells.E.IsInRange(target))
{
var ePredict = Spells.E.GetPrediction(target);
if (ePredict.HitChancePercent >= 70)
{
Spells.E.Cast(ePredict.CastPosition);
}
}
if (Spells.Q.IsReady() && Player.Instance.IsInAutoAttackRange(target))
{
Spells.Q.Cast();
}
if (Spells.W.IsReady() && Player.Instance.IsInAutoAttackRange(target))
{
Spells.W.Cast(target);
}
}
else
{
if (Spells.W.IsReady() && Player.Instance.IsInAutoAttackRange(target))
{
Spells.W.Cast(target);
}
}
}
开发者ID:himrengod,项目名称:Elobuddy-1,代码行数:31,代码来源:LaneClear.cs
注:本文中的Obj_AI_Base类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论