本文整理汇总了C#中Obj_AI_Base.HasBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.HasBuff方法的具体用法?C# Obj_AI_Base.HasBuff怎么用?C# Obj_AI_Base.HasBuff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.HasBuff方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateRendDamage
public static float CalculateRendDamage(Obj_AI_Base target)
{
var defuffer = 1f;
if (target.HasBuff("FerociousHowl") || target.HasBuff("GarenW"))
defuffer *= .7f;
if (target.HasBuff("Medidate"))
defuffer *= .5f - target.Spellbook.GetSpell(SpellSlot.E).Level*.05f;
if(target.HasBuff("gragaswself"))
defuffer *= .9f - target.Spellbook.GetSpell(SpellSlot.W).Level * .02f;
if (target.Name.Contains("Baron") && Properties.PlayerHero.HasBuff("barontarget"))
defuffer *= 0.5f;
if (target.Name.Contains("Dragon") && Properties.PlayerHero.HasBuff("s5test_dragonslayerbuff"))
defuffer *= (1 - (.07f * Properties.PlayerHero.GetBuffCount("s5test_dragonslayerbuff")));
if (Properties.PlayerHero.HasBuff("summonerexhaust"))
defuffer *= .4f;
if (!target.IsChampion()) return (GetRendDamage(target)*defuffer);
var healthDebuffer = 0f;
var hero = (Obj_AI_Hero) target;
if (hero.ChampionName == "Blitzcrank" && !target.HasBuff("BlitzcrankManaBarrierCD") &&!target.HasBuff("ManaBarrier"))
healthDebuffer += target.Mana/2;
return (GetRendDamage(target) * defuffer) - (healthDebuffer + GetShield(target));
}
示例2: IsRendKillable
public static bool IsRendKillable(Obj_AI_Base target, float? damage = null)
{
// Validate unit
if (target == null || !target.IsValidTarget() || !target.HasRendBuff())
{
return false;
}
// Take into account all kinds of shields
var totalHealth = target.TotalShieldHealth();
var hero = target as AIHeroClient;
if (hero != null)
{
// Validate that target has no undying buff or spellshield
if (hero.HasUndyingBuff() || hero.HasSpellShield())
{
return false;
}
// Take into account Blitzcranks passive
if (hero.ChampionName == "Blitzcrank" && !target.HasBuff("BlitzcrankManaBarrierCD") && !target.HasBuff("ManaBarrier"))
{
totalHealth += target.Mana / 2;
}
}
return (damage ?? GetRendDamage(target)) > totalHealth;
}
示例3: IsImmobile
/// <summary>
/// Gets a value indicating whether a determined champion can move or not.
/// </summary>
public static bool IsImmobile(Obj_AI_Base target)
{
if (target is Obj_AI_Minion ||
target is Obj_AI_Turret)
{
return target.HasBuff("teleport_target");
}
else if (target is AIHeroClient)
{
return
target.HasBuff("rebirth") ||
target.HasBuff("zhonyasringshield") ||
target.MoveSpeed < 150 ||
(target as AIHeroClient).LSIsRecalling() ||
(target as AIHeroClient).IsCastingInterruptableSpell() ||
IsValidStun(target as AIHeroClient) ||
IsValidSnare(target as AIHeroClient) ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Suppression);
}
return false;
}
示例4: HeroReqs
public bool HeroReqs(Obj_AI_Base unit)
{
if (unit == null)
return false;
switch (Activator.Player.ChampionName)
{
case "Twitch":
if (!unit.HasBuff("twitchdeadlyvenom"))
return false;
break;
case "LeeSin":
if (!unit.HasBuff("blindmonkqonechaos"))
return false;
break;
case "Diana":
if (!unit.HasBuff("dianamoonlight"))
return false;
break;
case "Elise":
if (Activator.Player.CharData.BaseSkinName != "elisespider")
return false;
break;
}
return true;
}
示例5: WithinRange
public static bool WithinRange(Obj_AI_Base target, float range)
{
return ((range == SpellManager.Q.Range && !target.HasBuff("urgotcorrosivedebuff") && target.IsValidTarget(range))
|| (range == SpellManager.Q.Range && target.HasBuff("urgotcorrosivedebuff") && target.IsValidTarget(SpellManager.Q2.Range))
|| (range != SpellManager.Q.Range && target.IsValidTarget(range)))
&& ((range == SpellManager.Q.Range && !target.HasBuff("urgotcorrosivedebuff") && target.IsInRange(Champion, range))
|| (range == SpellManager.Q.Range && target.HasBuff("urgotcorrosivedebuff") && target.IsInRange(Champion, SpellManager.Q2.Range))
|| (range != SpellManager.Q.Range && target.IsInRange(Champion, range)));
}
示例6: CastQ
// Cast Methods
public static void CastQ(Obj_AI_Base target)
{
if (target == null) return;
if (!target.HasBuff("urgotcorrosivedebuff"))
if (Q.IsReady())
Q.Cast(target);
if (target.HasBuff("urgotcorrosivedebuff"))
if (Q2.IsReady())
Q2.Cast(target.Position);
}
示例7: CanKill
public static bool CanKill(Obj_AI_Base e)
{
if (e.HasBuffOfType(BuffType.PhysicalImmunity) || e.HasBuffOfType(BuffType.SpellImmunity) || e.IsZombie
|| e.IsInvulnerable || e.HasBuffOfType(BuffType.Invulnerability) || e.HasBuffOfType(BuffType.SpellShield)
|| e.HasBuff("deathdefiedbuff") || e.HasBuff("Undying Rage") || e.HasBuff("Chrono Shift"))
{
return false;
}
else
{
return true;
}
}
示例8: Passivedamage
public static float Passivedamage(Obj_AI_Base target)
{
float dmg = 0;
if (!target.HasBuff("twitchdeadlyvenom")) return 0;
if (Player.Instance.Level < 5)
{
dmg = 2;
}
if (Player.Instance.Level < 9)
{
dmg = 3;
}
if (Player.Instance.Level < 13)
{
dmg = 4;
}
if (Player.Instance.Level < 17)
{
dmg = 5;
}
if (Player.Instance.Level == 18)
{
dmg = 6;
}
return dmg*EStacks(target)*PassiveTime(target) - target.HPRegenRate*PassiveTime(target);
}
示例9: GetKillStealDamage
public static float GetKillStealDamage(Obj_AI_Base e, Spell spell)
{
var dmg = spell.GetDamage(e);
if (Tw_AIO.Player.HasBuff("summonerexhaust"))
dmg = dmg * 0.6f;
if (e.HasBuff("ferocioushowl"))
dmg = dmg * 0.7f;
if (e is Obj_AI_Hero)
{
var champion = (Obj_AI_Hero)e;
if (champion.ChampionName == "Blitzcrank" && !champion.HasBuff("BlitzcrankManaBarrierCD") && !champion.HasBuff("ManaBarrier"))
{
dmg -= champion.Mana / 2f;
}
}
var extraHP = e.Health - LeagueSharp.Common.HealthPrediction.GetHealthPrediction(e, 500);
dmg += extraHP;
dmg -= e.HPRegenRate;
dmg -= e.PercentLifeStealMod * 0.005f * e.FlatPhysicalDamageMod;
return dmg;
}
示例10: GetRendDamage
public static float GetRendDamage(Obj_AI_Base target)
{
if (!IsNotInvulnerable(target))
{
return 0f;
}
var spells = Variables.CurrentChampion.GetSpells();
var baseDamage = spells[SpellSlot.E].GetDamage(target);
var reductionList = GetReductionList();
foreach (var t in reductionList)
{
switch (t.Item3)
{
case ReductionType.Player:
if (ObjectManager.Player.HasBuff(t.Item1))
{
baseDamage *= t.Item2;
}
break;
case ReductionType.Target:
if (target.HasBuff(t.Item1))
{
baseDamage *= t.Item2;
}
break;
}
}
return baseDamage;
}
示例11: 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;
}
示例12: Interrupter_OnInterruptableSpell
private static void Interrupter_OnInterruptableSpell(Obj_AI_Base sender,
Interrupter.InterruptableSpellEventArgs e)
{
if (!Menu.Misc.InterruptR || !Spells.R.IsReady() || !sender.IsEnemy || sender.HasBuff("xenzhaointimidate"))
{
return;
}
if (sender.IsValidTarget(Spells.R.Range))
{
Utility.Debug(string.Format("Used R on {0} (OnInterruptableSpell).",
((AIHeroClient) sender).ChampionName));
Spells.R.Cast(sender.Position);
}
else
{
var erManaCost = Spells.E.Handle.SData.Mana + Spells.R.Handle.SData.Mana;
if (Spells.E.IsReady() && sender.IsValidTarget(Spells.E.Range) && Player.Instance.Mana >= erManaCost)
{
Utility.Debug(string.Format("Used E on {0} (OnInterruptableSpell).",
((AIHeroClient) sender).ChampionName));
Spells.E.Cast(sender);
}
}
}
示例13: 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;
}
示例14: GetActualDamage
public static float GetActualDamage(Obj_AI_Base target)
{
if (!SpellManager.Spell[SpellSlot.E].IsReady() || !target.HasRendBuff()) return 0f;
var damage = GetRendDamage(target);
if (target.Name.Contains("Baron"))
{
// Buff Name: barontarget or barondebuff
// Baron's Gaze: Baron Nashor takes 50% reduced damage from champions he's damaged in the last 15 seconds.
damage = EloBuddy.Player.Instance.HasBuff("barontarget")
? damage * 0.5f
: damage;
}
else if (target.Name.Contains("Dragon"))
{
// DragonSlayer: Reduces damage dealt by 7% per a stack
damage = EloBuddy.Player.Instance.HasBuff("s5test_dragonslayerbuff")
? damage * (1 - (.07f * EloBuddy.Player.Instance.GetBuffCount("s5test_dragonslayerbuff")))
: damage;
}
if (EloBuddy.Player.Instance.HasBuff("summonerexhaust"))
{
damage = damage * 0.6f;
}
if (target.HasBuff("FerociousHowl"))
{
damage = damage * 0.7f;
}
return damage;
}
示例15: GetKsDamage
public static float GetKsDamage(Obj_AI_Base t, Spell QWER)
{
var totalDmg = QWER.GetDamage(t);
if (Player.HasBuff("summonerexhaust"))
totalDmg = totalDmg * 0.6f;
if (t.HasBuff("ferocioushowl"))
totalDmg = totalDmg * 0.7f;
if (t is Obj_AI_Hero)
{
var champion = (Obj_AI_Hero)t;
if (champion.ChampionName == "Blitzcrank" && !champion.HasBuff("BlitzcrankManaBarrierCD") && !champion.HasBuff("ManaBarrier"))
{
totalDmg -= champion.Mana / 2f;
}
}
var extraHP = t.Health - HealthPrediction.GetHealthPrediction(t, 500);
totalDmg += extraHP;
totalDmg -= t.HPRegenRate;
totalDmg -= t.PercentLifeStealMod * 0.005f * t.FlatPhysicalDamageMod;
return totalDmg;
}