本文整理汇总了C#中AIHeroClient.HasBuff方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.HasBuff方法的具体用法?C# AIHeroClient.HasBuff怎么用?C# AIHeroClient.HasBuff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.HasBuff方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TwoChainsActive
public static void TwoChainsActive(AIHeroClient target)
{
//string t = "";
//if (target.IsValidTarget())
//{
// foreach (var x in target.Buffs)
// {
// t += ", " + x.Name;
// }
// Game.PrintChat(t);
//}
R2.SetSkillshot(0.25f, 70, 1600, true, SkillshotType.SkillshotLine);
Orbwalker.MoveTo(Game.CursorPos);
if (target != null && target.LSIsValidTarget(Program.Q.Range) && (Program.Rstate != 3 || !R2.IsReady()))
{
Program.Q.Cast(target);
}
if (target != null && target.LSIsValidTarget(Program.E.Range) && Program.E.IsReady() && !ObjectManager.Player.LSIsDashing()
&& !target.HasBuff("LeblancSoulShackleM") && Environment.TickCount - LastChainM >= 1500 + Game.Ping)
{
Program.E.Cast(target);
LastChain = Environment.TickCount;
}
if (target != null && target.LSIsValidTarget(Program.E.Range) && Program.R.IsReady() && !ObjectManager.Player.LSIsDashing() && Program.Rstate == 3
&& !target.HasBuff("LeblancSoulShackle") && Environment.TickCount - LastChain >= 1500 + Game.Ping)
{
R2.Cast(target);
LastChainM = Environment.TickCount;
}
if (target.LSIsValidTarget(Program.W.Range) && Program.getCheckBoxItem(Program.spellMenu, "Wcombo") && (Program.Rstate != 3 || !R2.IsReady()))
{
Program.CastW(target);
}
}
示例2: EnemyHasShield
public static bool EnemyHasShield(AIHeroClient target)
{
var status = false;
if (target.HasBuff("blackshield"))
{
status = true;
}
if (target.HasBuff("sivire"))
{
status = true;
}
if (target.HasBuff("nocturneshroudofdarkness"))
{
status = true;
}
if (target.HasBuff("bansheesveil"))
{
status = true;
}
return status;
}
示例3: IsKillableR
public static bool IsKillableR(AIHeroClient target)
{
if (HoolaMenu.BoolValue(HoolaMenu.ComboMenu, "RKillable") && target.IsValidTarget() &&
(totaldame(target) >= target.Health
&& basicdmg(target) <= target.Health) ||
Player.CountEnemiesInRange(900) >= 2 &&
(!target.HasBuff("kindrednodeathbuff") && !target.HasBuff("Undying Rage") &&
!target.HasBuff("JudicatorIntervention")))
{
return true;
}
return false;
}
示例4: Check
public static bool Check(AIHeroClient target, DamageType damageType = DamageType.True, bool ignoreShields = true)
{
try
{
if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
{
return true;
}
foreach (var invulnerable in Items)
{
if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
{
if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
{
if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
{
return true;
}
if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
{
return true;
}
}
}
}
return false;
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
return false;
}
示例5: DmgCalc
public static float DmgCalc(AIHeroClient target)
{
var damage = 0f;
if (Program.E.IsReady() && target.IsValidTarget(2000))
if (!target.HasBuff("TristanaECharge"))
{
damage += ECalc(target);
}
if (target.HasBuff("TristanaECharge") && target.IsValidTarget(2000))
{
damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
}
if (Program.R.IsReady() && target.IsValidTarget(Program.R.Range))
damage += RCalc(target);
return damage;
}
示例6: GetDamage
public override float GetDamage(AIHeroClient enemy)
{
var baseDamage = base.GetDamage(enemy);
return enemy.HasBuff("brandablaze") || _brandE.CanBeCast() && enemy.LSDistance(ObjectManager.Player) < 650
? baseDamage*1.25f
: baseDamage;
}
示例7: dangerousAA
private static bool dangerousAA(AIHeroClient attacker)
{
if (attacker.ChampionName == "Leona" && attacker.HasBuff("LeonaShieldOfDaybreak"))
{
return true;
}
if (attacker.ChampionName == "Udyr" && attacker.HasBuff("UdyrBearStance"))
{
return true;
}
if (attacker.ChampionName == "Nautilus" && attacker.HasBuff("NautilusStaggeringBlow"))
{
return true;
}
if (attacker.ChampionName == "Renekton" && attacker.HasBuff("RenektonRuthlessPredator"))
{
return true;
}
return false;
}
示例8: GetKsDamage
public static float GetKsDamage(AIHeroClient t, SpellSlot QWER)
{
var totalDmg = ObjectManager.Player.GetSpellDamage(t, QWER);
totalDmg -= t.HPRegenRate;
if (totalDmg > t.Health)
{
if (Player.HasBuff("summonerexhaust"))
totalDmg = totalDmg*0.6f;
if (t.HasBuff("ferocioushowl"))
totalDmg = totalDmg*0.7f;
if (t.BaseSkinName == "Blitzcrank" && !t.HasBuff("BlitzcrankManaBarrierCD") && !t.HasBuff("ManaBarrier"))
{
totalDmg -= t.Mana/2f;
}
}
totalDmg += (float) GetIncomingDamage(t);
return totalDmg;
}
示例9: IsImmobile
/// <summary>
/// Gets a value indicating whether a determined champion can move or not.
/// </summary>
public static bool IsImmobile(AIHeroClient target)
{
return
target.HasBuff("zhonyasringshield") ||
target.IsChannelingImportantSpell() ||
target.HasBuffOfType(BuffType.Stun) ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Snare) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Suppression);
}
示例10: MyDamage
/// <summary>
/// Calculates our hero's damage.
/// </summary>
/// <param name="myHero">Reference to AIHeroClient -- ourselves</param>
/// <param name="target">Reference to AIHeroClient -- the target</param>
/// <param name="useQ">Consider Q damage</param>
/// <param name="useW">Consider W damage</param>
/// <param name="useE">Consider E damage</param>
/// <param name="useMark">Consider mark damage (if any)</param>
/// <returns>float of the damage</returns>
public static float MyDamage(AIHeroClient myHero, AIHeroClient target, bool useQ, bool useW, bool useE, bool useMark = true)
{
float calculation = 0;
if(useQ) calculation += myHero.GetSpellDamage(target, SpellSlot.Q);
if(useW) calculation += myHero.GetSpellDamage(target, SpellSlot.W);
if(useE) calculation += myHero.GetSpellDamage(target, SpellSlot.E);
if(useMark) calculation += target.HasBuff("katarinaqmark") ? myHero.GetSpellDamage(target, SpellSlot.Q) : 0;
// Consider ignite damage
/*var ignite = new Spell.Targeted(Katakomba.IgniteSlot, 600);
calculation += ignite.IsReady() ? myHero.GetSpellDamage(target, Katakomba.IgniteSlot) : 0;*/
return calculation;
}
示例11: ECharge
//E
public static float ECharge(AIHeroClient target)
{
var damage = 0f;
if (Program.E.IsReady() && target.IsValidTarget(Program.E.Range))
if (!target.HasBuff("TristanaECharge"))
{
damage += ECalc(target);
}
else
{
damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
}
//if (Program.E.IsReady() && target.IsValidTarget(Program.E.Range) && target.HasBuff("TristanaECharge"))
//damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
damage += _Player.GetAutoAttackDamage(target, true) * 2;
return damage;
}
示例12: Execute
public override void Execute(AIHeroClient target)
{
if (
_brandQWE.Any(
spell =>
spell.Instance.State == SpellState.Ready ||
spell.Instance.CooldownExpires > Game.Time &&
spell.Instance.CooldownExpires - Game.Time < spell.Instance.Cooldown/2f) ||
_w.Instance.Cooldown - (_w.Instance.CooldownExpires - Game.Time) < 1)
{
if ((!target.HasBuff("brandablaze") || target.GetBuff("brandablaze").EndTime - Game.Time < Delay) &&
!Provider.IsMarked(target) &&
!(ObjectManager.Player.GetSpellDamage(target, Instance.Slot) +
ObjectManager.Player.GetAutoAttackDamage(target, true) > target.Health))
return;
}
Cast(target);
}
示例13: GetDeathmarkDamage
private static float GetDeathmarkDamage(AIHeroClient target)
{
double totalDamage = 0;
if (Zed._spells[SpellSlot.R].IsReady() || target.HasBuff("zedulttargetmark"))
{
totalDamage += Zed._spells[SpellSlot.R].GetDamage(target);
switch (Zed._spells[SpellSlot.R].Level)
{
case 1:
totalDamage += totalDamage*1.2;
break;
case 2:
totalDamage += totalDamage*1.35;
break;
case 3:
totalDamage += totalDamage*1.5;
break;
}
}
return (float) totalDamage;
}
示例14: CheckBuffs
private bool CheckBuffs(AIHeroClient enemy)
{
if (enemy.ChampionName == "Anivia")
{
if (enemy.HasBuff("rebirthcooldown"))
{
return false;
}
else
{
return true;
}
}
if (enemy.ChampionName == "Aatrox")
{
if (enemy.HasBuff("aatroxpassiveready"))
{
return true;
}
}
return false;
}
示例15: Combo
private static void Combo(AIHeroClient target)
{
if (target != null && target.IsVisible && target.IsHPBarRendered)
{
var overkill = _player.LSGetSpellDamage(target, SpellSlot.Q) + _player.LSGetSpellDamage(target, SpellSlot.E) + _player.LSGetAutoAttackDamage(target, true) * 2;
var doubleu = _player.Spellbook.GetSpell(SpellSlot.W);
if (getCheckBoxItem(comboMenu, "UseUlt") && UltStage == UltCastStage.First && (overkill < target.Health || (!_w.IsReady() && doubleu.Cooldown > 2f && _player.LSGetSpellDamage(target, SpellSlot.Q) < target.Health && target.LSDistance(_player.Position) > 400)))
{
if ((target.LSDistance(_player.Position) > 700 && target.MoveSpeed > _player.MoveSpeed) || target.LSDistance(_player.Position) > 800)
{
CastW(target);
_w.Cast();
}
_r.Cast(target);
}
else
{
if (target != null && getCheckBoxItem(comboMenu, "UseIgnitecombo") && _igniteSlot != SpellSlot.Unknown &&
_player.Spellbook.CanUseSpell(_igniteSlot) == SpellState.Ready)
{
if (ComboDamage(target) > target.Health || target.HasBuff("zedulttargetmark"))
{
_player.Spellbook.CastSpell(_igniteSlot, target);
}
}
if (target != null && ShadowStage == ShadowCastStage.First && getCheckBoxItem(comboMenu, "UseWC") &&
target.LSDistance(_player.Position) > 400 && target.LSDistance(_player.Position) < 1300)
{
CastW(target);
}
if (target != null && ShadowStage == ShadowCastStage.Second && getCheckBoxItem(comboMenu, "UseWC") && target.LSDistance(WShadow.ServerPosition) < target.LSDistance(_player.Position))
{
_w.Cast();
}
CastE();
CastQ(target);
}
}
}