本文整理汇总了C#中Obj_AI_Base.GetDamageSpell方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.GetDamageSpell方法的具体用法?C# Obj_AI_Base.GetDamageSpell怎么用?C# Obj_AI_Base.GetDamageSpell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.GetDamageSpell方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProcessSpellCast
private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (!args.Target.IsMe) return;
if (!sender.IsEnemy || sender.Type != GameObjectType.obj_AI_Hero || !E.IsReady()) return;
var percent = Config.Item("percent").GetValue<Slider>().Value * .01;
var dmg = sender.GetDamageSpell(Player, args.SData.Name);
if (args.SData.TargettingType != SpellDataTargetType.SelfAndUnit &&
args.SData.TargettingType != SpellDataTargetType.Unit &&
args.SData.TargettingType != SpellDataTargetType.SelfAoe) return;
if (!(dmg.CalculatedDamage >= percent*Player.Health)) return;
E.Cast(Game.CursorPos);
}
示例2: ObjAiBaseOnProcessSpellCast
private void ObjAiBaseOnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
if (sender.IsAlly && !sender.IsMe && !sender.IsMinion)
{
foreach (Obj_AI_Hero enemy in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero != null && hero.IsValid && hero.IsVisible && !hero.IsDead && hero.IsEnemy))
{
if (enemy.Distance(V2E(args.Start, args.End, enemy.Distance(sender.Position))) <=
(200))
{
Allydamage = sender.GetDamageSpell(enemy, args.SData.Name);
if ((Config.Item("SKSQ").GetValue<bool>()))
{
Mydamage = Player.GetDamageSpell(enemy, SpellSlot.Q);
if ((enemy.Distance(Player) <= _Q.Range) && (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) > enemy.Health &&
Allydamage.CalculatedDamage < enemy.Health)
{
Game.PrintChat("enemy health: " + enemy.Health + " Total damage : " + (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) + "health after : " + (enemy.Health - (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage)) + " " + args.SData.Name);
var output = Prediction.GetPrediction(enemy, _Q.Delay, _Q.Width, _Q.Speed);
_Q.Cast(output.UnitPosition, true);
}
}
if ((Config.Item("SKSW").GetValue<bool>()))
{
Mydamage = Player.GetDamageSpell(enemy, SpellSlot.W);
if ((enemy.Distance(Player) <= _W.Range) && (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) > enemy.Health &&
Allydamage.CalculatedDamage < enemy.Health)
{
var output = Prediction.GetPrediction(enemy, _W.Delay, _W.Width, _W.Speed);
_W.Cast(output.UnitPosition, true);
}
}
if ((Config.Item("SKSE").GetValue<bool>()))
{
Mydamage = Player.GetDamageSpell(enemy, SpellSlot.E);
if ((enemy.Distance(Player) <= _E.Range) && (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) > enemy.Health &&
Allydamage.CalculatedDamage < enemy.Health)
{
var output = Prediction.GetPrediction(enemy, _E.Delay, _E.Width, _E.Speed);
_E.Cast(output.UnitPosition, true);
}
}
}
}
}
}
示例3: Obj_AI_Hero_OnProcessSpellCast
private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
var enemy = TargetSelector.GetTarget(E.Range + 425, DamageType.Magical);
var userdie = getCheckBoxItem(rMenu, "UseRifDie");
var danger = getCheckBoxItem(rMenu, "UseRDangerous");
if (sender.IsMe && args.SData.Name == "EkkoE")
{
// make sure orbwalker doesnt mess up after casting E
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
{
if (enemy == null)
return;
Utility.DelayAction.Add((int)(Math.Ceiling(Game.Ping / 2f) + 350), () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, enemy));
}
}
if (args.Target == null)
return;
if (R.IsReady() && args.End.LSDistance(Player.Position) < 150 && args.SData.Name == "ViR" && danger)
{
Utility.DelayAction.Add(250, () => R.Cast());
}
if (R.IsReady() && sender.IsEnemy && args.Target.IsMe && userdie)
{
var dmg = sender.GetDamageSpell(Player, args.SData.Name);
if (dmg.CalculatedDamage >= Player.Health - 50)
{
Utility.DelayAction.Add(0, () => R.Cast());
}
}
}
示例4: ObjAiBaseOnProcessSpellCast
public void ObjAiBaseOnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
{
var spellData = SpellDatabase.GetByName(args.SData.Name);
if (sender.IsAlly && !sender.IsMinion && !sender.IsAutoAttacking && !sender.IsMe)
{
string[] spelllist = {"EzrealTrueshotBarrage", "LuxMaliceCannon", "UFSlash", "InfernalGuardian", "EnchantedCrystalArrow", "DravenRCast", "FizzMarinerDoom", "GravesChargeShot",
"LeonaSolarFlare", "RivenFengShuiEngine", "SejuaniGlacialPrisonStart", "shyvanatransformcast", "SonaCrescendo", "XerathArcaneBarrageWrapper", "ZiggsR",
"CaitlynAceintheHole", "JinxRWrapper"};
for (int i = 0; i <= spelllist.Length; i++)
{
if (args.SData.Name == spelllist[i])
{
//var spellData = SpellDatabase.GetByName(args.SData.Name);
if (spellData.ChampionName == "Caitlyn")
{
var diab = (Obj_AI_Base)args.Target;
Allydamage = sender.GetDamageSpell(diab, args.SData.Name);
Mydamage = Player.GetDamageSpell(diab, SpellSlot.R);
if (Config.Item("Killable").GetValue<bool>())
{
if ((Mydamage.CalculatedDamage + Allydamage.CalculatedDamage) < diab.Health || Allydamage.CalculatedDamage > diab.Health)
{
return;
}
}
Game.PrintChat("Spell Detected: " + args.SData.Name + " By: " + sender.BaseSkinName +
" Ally Casted it On : " + diab.BaseSkinName); //Checks..
if (diab.Distance(Player.Position) < 3200 && diab.Distance(Player.Position) <= R.Range)
{
if (R.IsSkillshot)
{
R.Cast(diab, true);
}
else
{
R.CastOnUnit(diab, true);
}
}
}
else
{
foreach (Obj_AI_Hero enemy in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero != null && hero.IsValid && hero.IsVisible && !hero.IsDead && hero.IsEnemy))
{
// PredictionOutput allyOutput = Prediction.GetPrediction(enemy, 500, args.SData.LineWidth, args.SData.MissileSpeed);
/*
Game.PrintChat(sender.BaseSkinName + " Ultimate Damage is : " + Allydamage.CalculatedDamage);
Game.PrintChat("My Ultimate Damage is : " + Mydamage.CalculatedDamage);
Game.PrintChat("Total damage is : " + (Allydamage.CalculatedDamage + Mydamage.CalculatedDamage));
*/
if (Config.Item("Killable").GetValue<bool>())
{
Allydamage = sender.GetDamageSpell(enemy, args.SData.Name);
Mydamage = Player.GetDamageSpell(enemy, SpellSlot.R);
if ((Allydamage.CalculatedDamage + Mydamage.CalculatedDamage) < enemy.Health && Allydamage.CalculatedDamage > enemy.Health)
{
return;
}
}
if (enemy.Distance(V2E(args.Start, args.End, enemy.Distance(sender.Position))) <= (spellData.Radius - 50))
{
Game.PrintChat("SkillShot Detected: " + args.SData.Name + " By: " + sender.BaseSkinName +
" Ally Casted it right.. On : " + enemy.BaseSkinName); //Checks..
if (enemy.Distance(Player.Position) < 3200 && enemy.Distance(Player.Position) <= R.Range)
{
if (Player.BaseSkinName == "Riven")
{
R.Cast(false);
}
if (!R.IsSkillshot) // Casting for targetable spells
{
R.CastOnUnit(enemy, true);
}
else
{
R.Cast(enemy, true);
}
}
}
}
}
}
}
}
}