public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { var ad = owner.GetStats().AttackDamage.Total * 1.1f; var ap = owner.GetStats().AbilityPower.Total * 0.4f; var damage = 15 + spell.Level * 20 + ad + ap; target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_ATTACK, false); spell.LowerCooldown(0, 1); spell.LowerCooldown(1, 1); spell.LowerCooldown(2, 1); spell.LowerCooldown(3, 1); projectile.setToRemove(); }
public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { var ap = owner.GetStats().AbilityPower.Total * 0.8f; var damage = 45 + spell.Level * 35 + ap; if (target != null && !ApiFunctionManager.IsDead(target)) { target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); if (target.IsDead) { spell.LowerCooldown(0, spell.getCooldown()); float manaToRecover = 55 + spell.Level * 5; var newMana = owner.GetStats().CurrentMana + manaToRecover; var maxMana = owner.GetStats().ManaPoints.Total; if (newMana >= maxMana) { owner.GetStats().CurrentMana = maxMana; } else { owner.GetStats().CurrentMana = newMana; } } } projectile.setToRemove(); }