Champion yasuo = ObjectManager.Player; AIHeroClient target = TargetSelector.GetTarget(yasuo.GetAutoAttackRange(), TargetSelector.DamageType.Physical); double damage = yasuo.GetItemDamage(target, Damage.DamageItems.Tiamat); if (damage > target.Health) { yasuo.Spellbook.CastSpell(SpellSlot.Item1); yasuo.Attack(target); // code to execute if kill was successful }
AIHeroClient player = ObjectManager.Player; float damage = player.GetItemDamage(target, Damage.DamageItems.Ignite); if (damage > target.Health) { player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target); // code to execute if kill was successful }This code example is used to calculate the amount of damage that the player's Ignite summoner spell will inflict on an enemy champion. If the damage is greater than the enemy's remaining health, it will execute a code to use the spell and kill the target. This example is likely part of a larger package library used for game development.