/// <summary> /// Returns the damage a spell will deal to target. /// </summary> /// <param name="target"> /// The <see cref="AIHeroClient" /> target. /// </param> /// <param name="stage"> /// The <see cref="Damage.DamageStage" /> of the spell. /// </param> /// <returns> /// The damage value to target unit. /// </returns> public float GetDamage(AIBaseClient target, Damage.DamageStage stage = Damage.DamageStage.Default) { return((float)GameObjects.Player.GetSpellDamage(target, this.Slot, stage)); }
/// <summary> /// Returns if a spell can kill a target. /// </summary> /// <param name="unit">The Target</param> /// <param name="stage"> /// The <see cref="Damage.DamageStage" /> of the spell. /// </param> /// <returns>Can spell kill target</returns> public bool CanKill(AIBaseClient unit, Damage.DamageStage stage = Damage.DamageStage.Default) { return(unit.IsValidTarget() && this.GetDamage(unit, stage) > unit.Health); }