Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static float RDamage(AIBaseClient hero)
- {
- var target = hero as AIHeroClient;
- if (target == null)
- {
- return 0;
- }
- var rLevel = R.Level;
- var rCastDelay = 3.25f + EnetClient.Ping / 1000f;
- var tLevel = target.Level();
- var rDamage = LocalPlayer.Instance.CalculateDamage(target,
- DamageType.Magical,
- RBaseDamage[rLevel] +
- 0.75f * LocalPlayer.Instance.TotalAbilityDamage());
- if (Components.KillStealMenu.Healbool.Enabled)
- {
- var healSlot = target.Spellbook.GetSpell(SpellSlot.Summoner1).SpellData.Name == "SummonerHeal"
- ? SpellSlot.Summoner1
- : target.Spellbook.GetSpell(SpellSlot.Summoner2).SpellData.Name == "SummonerHeal"
- ? SpellSlot.Summoner2
- : SpellSlot.Unknown;
- if (healSlot != SpellSlot.Unknown)
- {
- if (target.Spellbook.GetSpell(healSlot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage -= target.HasBuff("grievouswound") &&
- target.GetBuff("grievouswound").ExpireTime - Game.ClockTime >= 3f
- ? (75f + 15f * tLevel) *
- 0.6f
- : 75f + 15f * tLevel;
- }
- }
- }
- if (Components.KillStealMenu.Barrierbool.Enabled)
- {
- var barrierSlot = target.Spellbook.GetSpell(SpellSlot.Summoner1).SpellData.Name == "SummonerBarrier"
- ? SpellSlot.Summoner1
- : target.Spellbook.GetSpell(SpellSlot.Summoner2).SpellData.Name == "SummonerBarrier"
- ? SpellSlot.Summoner2
- : SpellSlot.Unknown;
- if (barrierSlot != SpellSlot.Unknown)
- {
- if (target.Spellbook.GetSpell(barrierSlot).CooldownExpires - Game.ClockTime <=
- rCastDelay)
- {
- rDamage -= 95f + 20f * tLevel;
- }
- }
- }
- if (Components.KillStealMenu.Hexbool.Enabled)
- {
- var slotHex = target.GetItem(ItemID.Hexdrinker);
- var slotMaw = target.GetItem(ItemID.MawofMalmortius);
- var slotPhantom = target.GetItem(ItemID.PhantomDancer);
- if (slotHex != null && slotHex.IsValid && target.Spellbook.GetSpell(slotHex.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage -= Hexdrinker[tLevel];
- }
- if (slotMaw != null && slotMaw.IsValid && target.Spellbook.GetSpell(slotMaw.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage -= 350f;
- }
- if (slotPhantom != null && slotPhantom.IsValid && target.Spellbook.GetSpell(slotPhantom.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage -= PhantomHp[tLevel];
- }
- }
- if (Components.KillStealMenu.Sorakabool.Enabled)
- {
- var soraka = ObjectCache.EnemyHeroes.Where(s => !s.IsDead && s.CharName == "Soraka");
- if (soraka == null)
- {
- }
- }
- if (Components.KillStealMenu.SpellReducebool.Enabled)
- {
- if (target.GetChampion() == Champion.Alistar && !target.HasBuff("FerociousHowl"))
- {
- var slotR = target.Spellbook.GetSpell(SpellSlot.R);
- if (slotR.IsValid && slotR.Level >= 1 && slotR.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - Alistar[slotR.Level];
- }
- }
- if (target.GetChampion() == Champion.Garen && !target.HasBuff("GarenW"))
- {
- var slotW = target.Spellbook.GetSpell(SpellSlot.W);
- if (slotW.IsValid && slotW.Level >= 1 && slotW.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 0.4f;
- }
- }
- if (target.GetChampion() == Champion.MasterYi && !target.HasBuff("Meditate"))
- {
- var slotW = target.Spellbook.GetSpell(SpellSlot.W);
- if (slotW.IsValid && slotW.Level >= 1 && slotW.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - MasterYi[slotW.Level];
- }
- }
- if (target.GetChampion() == Champion.Annie && !target.HasBuff("AnnieE"))
- {
- var slotE = target.Spellbook.GetSpell(SpellSlot.E);
- if (slotE.IsValid && slotE.Level >= 1 && slotE.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - Annie[slotE.Level];
- }
- }
- if (target.GetChampion() == Champion.Galio && !target.HasBuff("GalioW"))
- {
- var slotW = target.Spellbook.GetSpell(SpellSlot.W);
- if (slotW.IsValid && slotW.Level >= 1 && slotW.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - Galio[slotW.Level];
- }
- }
- if (target.GetChampion() == Champion.Warwick && !target.HasBuff("WarwickE"))
- {
- var slotE = target.Spellbook.GetSpell(SpellSlot.E);
- if (slotE.IsValid && slotE.Level >= 1 && slotE.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - Warwick[slotE.Level];
- }
- }
- if (target.GetChampion() == Champion.Gragas && !target.HasBuff("gragaswself"))
- {
- var slotW = target.Spellbook.GetSpell(SpellSlot.W);
- if (slotW.IsValid && slotW.Level >= 1 && slotW.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage *= 1f - Gragas[slotW.Level];
- }
- }
- }
- if (Components.KillStealMenu.GAbool.Enabled)
- {
- var slotGA = target.GetItem(ItemID.GuardianAngel);
- if (slotGA != null && slotGA.IsValid && target.Spellbook.GetSpell(slotGA.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- }
- if (Components.KillStealMenu.Zhonyasbool.Enabled)
- {
- var slotZh = target.GetItem(ItemID.ZhonyasHourglass);
- var slotZhO = target.GetItem(ItemID.ZhonyasHourglassOrnn);
- var slotStop = target.GetItem(ItemID.Stopwatch);
- var slotStopC = target.GetItem(ItemID.CommencingStopwatch);
- if (slotZh != null && slotZh.IsValid && target.Spellbook.GetSpell(slotZh.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- if (slotZhO != null && slotZhO.IsValid && target.Spellbook.GetSpell(slotZhO.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- if (slotStop != null && slotStop.IsValid && target.Spellbook.GetSpell(slotStop.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- if (slotStopC != null && slotStopC.IsValid && target.Spellbook.GetSpell(slotStopC.Slot).CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- }
- if (Components.KillStealMenu.Revivebool.Enabled)
- {
- if (target.GetChampion() == Champion.Anivia && target.PassiveCooldownEndTime - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- if (target.GetChampion() == Champion.Zac && target.PassiveCooldownEndTime - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- if (target.GetChampion() == Champion.Zilean)
- {
- var slotR = target.Spellbook.GetSpell(SpellSlot.R);
- if (slotR.IsValid && slotR.Level >= 1 && slotR.CooldownExpires - Game.ClockTime <= rCastDelay)
- {
- rDamage = 0f;
- }
- }
- }
- return rDamage;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement