public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { Target ZoneCenter; Vector2 ownerLocation = new Vector2(owner.X, owner.Y); Vector2 targetLocation = new Vector2(spell.X, spell.Y); var spellData = spell.SpellData; float distance = Vector2.Distance(ownerLocation, targetLocation); if (distance > spellData.CastRange[0]) { var to = Vector2.Normalize(targetLocation - ownerLocation); var range = to * 650; var trueCoords = ownerLocation + range; ZoneCenter = new Target(trueCoords.X, trueCoords.Y); } else { ZoneCenter = new Target(spell.X, spell.Y); } Particle p = ApiFunctionManager.AddParticleTarget(owner, "Evelynn_R_cas.troy", ZoneCenter); spell.spellAnimation("SPELL4", owner); List <AttackableUnit> units = ApiFunctionManager.GetUnitsInRange(ZoneCenter, 250, true); var ap = owner.GetStats().AbilityPower.Total * 0.01f; var percentHealthDamage = ((new float[] { 0.15f, 0.20f, 0.25f })[spell.Level]) + ap; var damage = 0.0f; var monsterDamage = 0.0f; foreach (AttackableUnit unit in units) { if (unit.Team != owner.Team) { if (unit is Champion || unit is Minion) { damage = unit.GetStats().CurrentHealth *percentHealthDamage; unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); } else if (unit is Monster) { damage = unit.GetStats().CurrentHealth *percentHealthDamage; monsterDamage = Math.Max(damage, 1000); unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); } } } //TODO:Give evelynn her shield per champion hit. ApiFunctionManager.CreateTimer(2.0f, () => { ApiFunctionManager.RemoveParticle(p); }); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 1100; var trueCoords = current + range; spell.AddLaser(trueCoords.X, trueCoords.Y); spell.spellAnimation("SPELL1", owner); ApiFunctionManager.AddParticle(owner, "Lucian_Q_laser.troy", trueCoords.X, trueCoords.Y); ApiFunctionManager.AddParticleTarget(owner, "Lucian_Q_cas.troy", owner); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 3340; var trueCoords = current + range; spell.AddLaser(trueCoords.X, trueCoords.Y); ApiFunctionManager.AddParticle(owner, "LuxMaliceCannon_beam.troy", trueCoords.X, trueCoords.Y); ApiFunctionManager.FaceDirection(owner, trueCoords, false); spell.spellAnimation("SPELL4", owner); ApiFunctionManager.AddParticleTarget(owner, "LuxMaliceCannon_cas.troy", owner); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { spell.spellAnimation("SPELL2", owner); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.spellAnimation("SPELL2", owner); ApiFunctionManager.AddParticleTarget(owner, "Evelynn_W_cas.troy", owner); FrenzyBuff = owner.AddBuffGameScript("EveFrenzy", "EveFrenzy", spell, 3.0f, true); }