本文整理汇总了C#中Spell.CastIfHitchanceEquals方法的典型用法代码示例。如果您正苦于以下问题:C# Spell.CastIfHitchanceEquals方法的具体用法?C# Spell.CastIfHitchanceEquals怎么用?C# Spell.CastIfHitchanceEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spell
的用法示例。
在下文中一共展示了Spell.CastIfHitchanceEquals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastSpell
public static void CastSpell(Spell QWER, Obj_AI_Base target)
{
if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 1)
{
Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;
bool aoe2 = false;
if (QWER.Type == SkillshotType.SkillshotCircle)
{
CoreType2 = Core.SkillshotType.SkillshotCircle;
aoe2 = true;
}
if (QWER.Width > 80 && !QWER.Collision)
aoe2 = true;
var predInput2 = new Core.PredictionInput
{
Aoe = aoe2,
Collision = QWER.Collision,
Speed = QWER.Speed,
Delay = QWER.Delay,
Range = QWER.Range,
From = Player.ServerPosition,
Radius = QWER.Width,
Unit = target,
Type = CoreType2
};
var poutput2 = Core.Prediction.GetPrediction(predInput2);
//var poutput2 = QWER.GetPrediction(target);
if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
return;
if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
{
if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
QWER.Cast(poutput2.CastPosition);
else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= Core.HitChance.High)
{
QWER.Cast(poutput2.CastPosition);
}
}
else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
{
if (poutput2.Hitchance >= Core.HitChance.High)
QWER.Cast(poutput2.CastPosition);
}
else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 2)
{
if (poutput2.Hitchance >= Core.HitChance.Medium)
QWER.Cast(poutput2.CastPosition);
}
if (Game.Time - DrawSpellTime > 0.5)
{
DrawSpell = QWER;
DrawSpellTime = Game.Time;
}
DrawSpellPos = poutput2;
}
else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 0)
{
if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
{
QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
return;
}
else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
{
QWER.CastIfHitchanceEquals(target, HitChance.High);
return;
}
else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
{
QWER.CastIfHitchanceEquals(target, HitChance.Medium);
return;
}
}
else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 2 )
{
if (target is Obj_AI_Hero && target.IsValid)
{
var t = target as Obj_AI_Hero;
if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
{
QWER.SPredictionCast(t, HitChance.VeryHigh);
return;
}
else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
{
QWER.SPredictionCast(t, HitChance.High);
return;
}
else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
{
//.........这里部分代码省略.........