本文整理汇总了C#中Obj_AI_Base.GetBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.GetBuff方法的具体用法?C# Obj_AI_Base.GetBuff怎么用?C# Obj_AI_Base.GetBuff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.GetBuff方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRemainingCassDamage
public float GetRemainingCassDamage(Obj_AI_Base target)
{
var buff = target.GetBuff("cassiopeianoxiousblastpoison");
float damage = 0;
if (buff != null)
damage += (float)(((int)(buff.EndTime - Game.Time)) * (ObjectManager.Player.GetSpellDamage(target, SpellSlot.Q) / 3));
buff = target.GetBuff("cassiopeiamiasmapoison");
if (buff != null)
{
damage += (float)(((int)(buff.EndTime - Game.Time)) * (ObjectManager.Player.GetSpellDamage(target, SpellSlot.W)));
}
return damage;
}
示例2: PassiveTime
public static float PassiveTime(Obj_AI_Base target)
{
if (target.HasBuff("twitchdeadlyvenom"))
{
return Math.Max(0, target.GetBuff("twitchdeadlyvenom").EndTime) - Game.Time;
}
return 0;
}
示例3: EStacks
public static int EStacks(Obj_AI_Base target)
{
var buff = target.GetBuff("TristanaECharge");
if (buff == null)
{
return 0;
}
else
{
return buff.Count;
}
}
示例4: GetBlazeRemainingDamage
public static float GetBlazeRemainingDamage(Obj_AI_Base unit)
{
var buff = unit.GetBuff("BrandAblaze");
if (buff == null)
{
return 0;
}
return Player.Instance.CalculateDamageOnUnit(unit, DamageType.Magical,
unit.MaxHealth*0.02f*(float) Math.Floor(buff.EndTime - Game.Time));
}
示例5: GetEdamage
public static float GetEdamage(Obj_AI_Base target)
{
var buff = target.GetBuff("KalistaExpungeMarker");
if (buff != null)
{
var dmg =
(float)
((new double[] { 20, 30, 40, 50, 60 }[Program.E.Level - 1] +
0.6 * (Program.Player.BaseAttackDamage + Program.Player.FlatPhysicalDamageMod)) +
((buff.Count - 1) *
(new double[] { 10, 14, 19, 25, 32 }[Program.E.Level - 1] +
new double[] { 0.2, 0.225, 0.25, 0.275, 0.3 }[Program.E.Level - 1] *
(Program.Player.BaseAttackDamage + Program.Player.FlatPhysicalDamageMod))));
if (Program.Player.HasBuff("summonerexhaust"))
{
dmg *= 0.6f;
}
if (Program.Player.HasBuff("urgotcorrosivedebuff"))
{
dmg *= 0.85f;
}
if (target.HasBuff("FerociousHowl"))
{
dmg *= 0.3f;
}
if (target.HasBuff("vladimirhemoplaguedebuff"))
{
dmg *= 1.15f;
}
if (target.Name.Contains("Baron") && Program.Player.HasBuff("barontarget"))
{
dmg *= 0.5f;
}
if (target.Name.Contains("Dragon") && Program.Player.HasBuff("s5test_dragonslayerbuff"))
{
dmg *= (1f - (0.07f * Program.Player.GetBuffCount("s5test_dragonslayerbuff")));
}
return
(float)
Program.Player.CalcDamage(target, LeagueSharp.Common.Damage.DamageType.Physical, dmg + target.FlatHPRegenMod);
}
return 0;
}
示例6: GetComboDamage
private float GetComboDamage(Obj_AI_Base enemy)
{
float damage = 0;
if (!ObjectManager.Player.IsWindingUp)
{
damage += (float)ObjectManager.Player.GetAutoAttackDamage(enemy, true);
}
var buff = enemy.GetBuff("vaynesilvereddebuff");
if (buff != null)
if (buff.Caster.IsMe)
if (buff.Count == 2)
damage += W.GetDamage(enemy) + (float)ObjectManager.Player.GetAutoAttackDamage(enemy);
if (Q.isReadyPerfectly())
{
damage += Q.GetDamage(enemy) + (float)ObjectManager.Player.GetAutoAttackDamage(enemy);
}
if (ObjectManager.Player.HasBuff("vaynetumblebonus"))
{
damage += Q.GetDamage(enemy) + (float)ObjectManager.Player.GetAutoAttackDamage(enemy);
}
return 0;
}
示例7: LaneClear
/** TODO
public static void LaneClear()
{
Chat.Print("FUI CHAMADO!!!");
if (MenuX.FarmMenu["useWFarm"].Cast<CheckBox>().CurrentValue && Program.Spells[SpellSlot.W].IsReady())
{
var localtion =
ObjectManager.Get<Obj_AI_Minion>()
.Where(x => x.IsMinion());
if (!localtion.Any())
{
Chat.Print("Achei nenhum!!!!");
return;
}
else
{
Chat.Print("Achei alguns aeHO!!!!");
}
}
// if (MenuX.FarmMenu["useEAmmo"].Cast<CheckBox>().CurrentValue && minion.IsEnemy)
//&&
//MenuX.FarmMenu["useEFarm"].Cast<Slider>().CurrentValue >= minion.CountEnemiesInRange(Program.Spells[SpellSlot.E].Range))
}
**/
#endregion
#region Calcs OP
public static float GetRemainingPoisonDamageMinusRegeneration(Obj_AI_Base target)
{
var buff = target.GetBuff("twitchdeadlyvenom");
if (buff == null) return 0f;
return (float)(ObjectManager.Player.CalculateDamageOnUnit(target, DamageType.True, ((int)(buff.EndTime - Game.Time) + 1) * GetPoisonTickDamage() * buff.Count)) - ((int)(buff.EndTime - Game.Time)) * target.HPRegenRate;
}
示例8: RTime
private static float RTime(Obj_AI_Base target)
{
if (target.HasBuff("bantamtrapslow"))
{
return Math.Max(0, target.GetBuff("bantamtrapslow").EndTime) - Game.Time;
}
return 0;
}
示例9: GetEdamageToMini
private static float GetEdamageToMini(Obj_AI_Base target, int Count)
{
var buff = target.GetBuff("KalistaExpungeMarker");
if (buff != null)
{
Count = buff.Count - 1;
}
var dmg =
(float)
((new double[] { 20, 30, 40, 50, 60 }[E.Level - 1] +
0.6 * (Player.BaseAttackDamage + Player.FlatPhysicalDamageMod)) +
(Count *
(new double[] { 10, 14, 19, 25, 32 }[E.Level - 1] +
new double[] { 0.2, 0.225, 0.25, 0.275, 0.3 }[E.Level - 1] *
(Player.BaseAttackDamage + Player.FlatPhysicalDamageMod))));
return (float) (Player.CalculateDamage(target, DamageType.Physical, dmg));
}
示例10: DamageReductionMod
/// <summary>
/// Gets the damage reduction modifier.
/// </summary>
/// <param name="source">The source.</param>
/// <param name="target">The target.</param>
/// <param name="amount">The amount.</param>
/// <param name="damageType">Type of the damage.</param>
/// <returns></returns>
private static double DamageReductionMod(
Obj_AI_Base source,
Obj_AI_Base target,
double amount,
DamageType damageType)
{
if (source is Obj_AI_Hero)
{
// Exhaust:
// + Exhausts target enemy champion, reducing their Movement Speed and Attack Speed by 30%, their Armor and Magic Resist by 10, and their damage dealt by 40% for 2.5 seconds.
if (source.HasBuff("Exhaust"))
{
amount *= 0.6d;
}
// Lament
// + Phantom Dancer reduces all damage dealt to attacker (if he's attack you) by 12%
if (source.HasBuff("itemphantomdancerdebuff"))
{
var caster = source.GetBuff("itemphantomdancerdebuff").Caster;
if (caster.NetworkId == target.NetworkId)
{
amount *= 0.88d;
}
}
}
var targetHero = target as Obj_AI_Hero;
if (targetHero != null)
{
//Damage Reduction Masteries
//DAMAGE REDUCTION 2 %, increasing to 8 % when near at least one allied champion
//IN THIS TOGETHER 8 % of the damage that the nearest allied champion would take is dealt to you instead.This can't bring you below 15% health.
Mastery BondofStones = targetHero.GetMastery(Resolve.BondofStones);
if (BondofStones != null && BondofStones.IsActive())
{
bool closebyenemies = HeroManager.Enemies.Any(x => x.NetworkId != target.NetworkId && x.Distance(target) <= 500); //500 is not the real value
if (closebyenemies)
{
amount *= 0.92d;
}
else
{
amount *= 0.98d;
}
}
// Items:
// Doran's Shield
// + Blocks 8 damage from single target attacks and spells from champions.
if (Items.HasItem(1054, targetHero))
{
amount -= 8;
}
// Passives:
// Unbreakable Will
// + Alistar removes all crowd control effects from himself, then gains additional attack damage and takes 70% reduced physical and magic damage for 7 seconds.
if (target.HasBuff("Ferocious Howl"))
{
amount *= 0.3d;
}
// Tantrum
// + Amumu takes reduced physical damage from basic attacks and abilities.
if (target.HasBuff("Tantrum") && damageType == DamageType.Physical)
{
amount -= new[] { 2, 4, 6, 8, 10 }[target.Spellbook.GetSpell(SpellSlot.E).Level - 1];
}
// Unbreakable
// + Grants Braum 30% / 32.5% / 35% / 37.5% / 40% damage reduction from oncoming sources (excluding true damage and towers) for 3 / 3.25 / 3.5 / 3.75 / 4 seconds.
// + The damage reduction is increased to 100% for the first source of champion damage that would be reduced.
if (target.HasBuff("BraumShieldRaise"))
{
amount -= amount
* new[] { 0.3d, 0.325d, 0.35d, 0.375d, 0.4d }[
target.Spellbook.GetSpell(SpellSlot.E).Level - 1];
}
// Idol of Durand
// + Galio becomes a statue and channels for 2 seconds, Taunt icon taunting nearby foes and reducing incoming physical and magic damage by 50%.
if (target.HasBuff("GalioIdolOfDurand"))
{
amount *= 0.5d;
}
//.........这里部分代码省略.........
示例11: CanQ2
private static bool CanQ2(Obj_AI_Base target, bool isClear = false)
{
var buff = target.GetBuff("BlindMonkSonicWave");
return buff != null && buff.EndTime - Game.Time < (isClear ? 0.2 : 0.3) * (buff.EndTime - buff.StartTime);
}
示例12: GetRemainingIgniteDamage
private static float GetRemainingIgniteDamage(Obj_AI_Base target)
{
var ignitebuff = target.GetBuff("summonerdot");
if (ignitebuff == null) return 0;
return (float)ObjectManager.Player.CalcDamage(target, Damage.DamageType.True, ((int)(ignitebuff.EndTime - Game.Time) + 1) * GetIgniteDamage(ignitebuff.Caster as Obj_AI_Hero) / 5);
}
示例13: GetBuffEndTime
public float GetBuffEndTime(Obj_AI_Base target, string buffname)
{
return Math.Max(0, target.GetBuff(buffname).EndTime) - Game.Time;
}
示例14: EDmg
private static float EDmg(Obj_AI_Base hero)
{
if (!hero.HasBuff("tristanaechargesound") || !Root.Item("efinish").GetValue<bool>())
{
return 0f;
}
var b = hero.HasBuff("tristanaecharge") ? hero.GetBuff("tristanaecharge").Count + 1 : 1;
if (b < Root.Item("mine").GetValue<Slider>().Value)
{
return 0f;
}
var physdmg = Player.CalcDamage(hero, Damage.DamageType.Physical,
new[] { 47, 57, 70, 80, 90 } [E.Level - 1] +
(new[] { 0.5, 0.65, 0.80, 0.95, 1.1 } [E.Level - 1] * Player.FlatPhysicalDamageMod));
var physbonus = Player.CalcDamage(hero, Damage.DamageType.Physical,
new[] { 14.1, 17.1, 21, 24, 27 } [E.Level - 1] +
(new[] { 0.15, 0.195, 0.24, 0.285, 0.33 } [E.Level - 1] * Player.FlatPhysicalDamageMod));
return (float) (physdmg + (physbonus * b));
}
示例15: EAgain
private static bool EAgain(Obj_AI_Base target)
{
var buff = target.GetBuff("BlindMonkTempest");
return buff != null && buff.EndTime - Game.Time <= 0.5f;
}