public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { var visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerDot", 5.0f, 1, (ObjAIBase)target); Particle p = ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Ignite.troy", target, 1); var damage = 10 + owner.GetStats().Level * 4; target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); ApiFunctionManager.CreateTimer(1.0f, () => { target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); }); ApiFunctionManager.CreateTimer(2.0f, () => { target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); }); ApiFunctionManager.CreateTimer(3.0f, () => { target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); }); ApiFunctionManager.CreateTimer(4.0f, () => { target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); }); }
public void OnActivate(ObjAIBase unit, Spell ownerSpell) { _currentTime = 0; _lastUpdate = 0; _ownerUnit = unit; _visualBuff = ApiFunctionManager.AddBuffHUDVisual("EveInvis", 5.0f, 5, _ownerUnit, -1); }
public void OnActivate(ObjAIBase unit, Spell ownerSpell) { _ownerUnit = unit; _currentStatMod = (new float[] { 0.30f, 0.40f, 0.50f, 0.60f, 0.70f })[ownerSpell.Level - 1]; _statMod = new ChampionStatModifier(); _statMod.MoveSpeed.PercentBonus = _currentStatMod; _ownerUnit.AddStatModifier(_statMod); _visualBuff = ApiFunctionManager.AddBuffHUDVisual("EveFrenzy", 5.0f, 5, _ownerUnit, -1); }
public void OnActivate(ObjAIBase unit, Spell ownerSpell) { _ownerUnit = unit; _currentStatMod = (new float[] { 4.0f, 8.0f, 12.0f, 16.0f, 20.0f })[ownerSpell.Level - 1]; _statMod = new ChampionStatModifier(); //TODO: Find a way to have evelynn's Q and R give speed stacks _statMod.MoveSpeed.FlatBonus = _currentStatMod * _speedMultiplier; _ownerUnit.AddStatModifier(_statMod); _visualBuff = ApiFunctionManager.AddBuffHUDVisual("EveSpeed", 5.0f, 5, _ownerUnit, -1); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { ChampionStatModifier statMod = new ChampionStatModifier(); statMod.MoveSpeed.PercentBonus = 27 / 100.0f; owner.AddStatModifier(statMod); var hasteBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerHaste", 10.0f, 1, owner, 10.0f); ApiFunctionManager.CreateTimer(10.0f, () => { owner.RemoveStatModifier(statMod); }); }
public void OnActivate(ObjAIBase unit, Spell ownerSpell) { _currentTime = 0; _lastUpdate = 0; _currentStatMod = 25; _ownerUnit = unit; _statMod = new ChampionStatModifier(); _statMod.MoveSpeed.FlatBonus = _currentStatMod; _ownerUnit.AddStatModifier(_statMod); _visualBuff = ApiFunctionManager.AddBuffHUDVisual("MissFortuneStrutStacks", 5.0f, (int)_currentStatMod, _ownerUnit, -1); }
public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { float time = 5; var visualBuff = ApiFunctionManager.AddBuffHUDVisual("ExplosiveShotDebuff", time, 5, (ObjAIBase)target); ApiFunctionManager.CreateTimer(time, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); }); projectile.setToRemove(); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var buff = ((ObjAIBase)target).AddBuffGameScript("ImpureShotsActive", "ImpureShotsActive", spell, -1, true); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("MissFortuneViciousStrikes", 5.0f, 1, owner); ApiFunctionManager.CreateTimer(6.0f, () => { owner.RemoveBuffGameScript(buff); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); }); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { var buff = ((ObjAIBase)target).AddBuffGameScript("TristanaQ", "TristanaQ", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("RapidFire", 5.0f, 1, owner); ApiFunctionManager.CreateTimer(5.0f, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { Particle p = ApiFunctionManager.AddParticleTarget(owner, "Overdrive_buf.troy", target, 1); var buff = ((ObjAIBase)target).AddBuffGameScript("Overdrive", "Overdrive", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("Overdrive", 8.0f, 1, owner); ApiFunctionManager.CreateTimer(8.0f, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); ((ObjAIBase)target).RemoveBuffGameScript(buff); }); }
public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) { Particle p = ApiFunctionManager.AddParticleTarget(owner, "Garen_Base_E_Spin.troy", owner, 1); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("GarenE", 3.0f, 1, owner); ApiFunctionManager.CreateTimer(3.0f, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); ApiFunctionManager.RemoveParticle(p); }); for (float i = 0.0f; i < 3.0; i += 0.5f) { ApiFunctionManager.CreateTimer(i, () => { ApplySpinDamage(owner, spell, target); }); } }
public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { var ap = owner.GetStats().AbilityPower.Total * 0.8f; var damage = 35 + spell.Level * 45 + ap; target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); float time = 1.25f + 0.25f * spell.Level; var buff = ((ObjAIBase)target).AddBuffGameScript("Blind", "Blind", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("Blind", time, 1, (ObjAIBase)target); ApiFunctionManager.CreateTimer(time, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); ((ObjAIBase)target).RemoveBuffGameScript(buff); }); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { ChampionStatModifier statMod = new ChampionStatModifier(); statMod.MoveSpeed.PercentBonus -= 30.0f / 100.0f; statMod.AttackSpeed.PercentBonus -= 30.0f / 100.0f; statMod.Armor.BaseBonus -= 10; statMod.MagicResist.BaseBonus -= 10; target.AddStatModifier(statMod); ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Exhaust.troy", target); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerExhaustDebuff", 2.5f, 1, (ObjAIBase)target); ApiFunctionManager.CreateTimer(2.5f, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); target.RemoveStatModifier(statMod); }); }
public void OnFinishCasting(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 * 1150; var trueCoords = current + range; spell.AddProjectile("EzrealMysticShotMissile", trueCoords.X, trueCoords.Y); var buff = owner.AddBuffGameScript("Quickdraw", "Quickdraw", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("Quickdraw", 6.0f, 0, owner); ApiFunctionManager.CreateTimer(6.0f, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); }
public void OnFinishCasting(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 * 425; var trueCoords = current + range; ApiFunctionManager.DashToLocation(owner, trueCoords.X, trueCoords.Y, 1200, false, "Spell3"); Particle p = ApiFunctionManager.AddParticleTarget(owner, "Graves_Move_OnBuffActivate.troy", owner); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("GravesSteroid", 5.0f, 90, owner); var buff = owner.AddBuffGameScript("Quickdraw", "Quickdraw", spell, -1, true); ApiFunctionManager.CreateTimer(4.0f, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); }
public void Recall(ObjAIBase owner, float timer = 8.0f) { var spawnPos = GetRespawnPosition(); IsRecalling = true; _visualBuff = ApiFunctionManager.AddBuffHUDVisual("Recall", timer, 1, this); _addParticle = ApiFunctionManager.AddParticleTarget(this, "TeleportHome.troy", this); _canRecall = true; ApiFunctionManager.CreateTimer(timer, () => { if (_canRecall) { ApiFunctionManager.RemoveBuffHUDVisual(_visualBuff); ApiFunctionManager.RemoveParticle(_addParticle); ApiFunctionManager.TeleportTo(owner, spawnPos.X, spawnPos.Y); IsRecalling = false; } }); }
public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { Champion champion = (Champion)target; float time = 1 + 0.25f * spell.Level; var buff = ((ObjAIBase)target).AddBuffGameScript("LuluWDebuff", "LuluWDebuff", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("LuluWDebuff", time, 1, (ObjAIBase)target); string model = champion.Model; ChangeModel(owner.Skin, target); Particle p = ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_polymorph_01.troy", target, 1); ApiFunctionManager.CreateTimer(time, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); ApiFunctionManager.SetChampionModel((Champion)target, model); }); projectile.setToRemove(); }
public void OnUpdate(double diff) { _currentTime += diff; if (_currentTime >= (_lastUpdate + 1000)) { if (_currentStatMod < 70) { _currentStatMod += 8; if (_currentStatMod > 70) { _currentStatMod = 70; } _ownerUnit.RemoveStatModifier(_statMod); ApiFunctionManager.RemoveBuffHUDVisual(_visualBuff); _statMod.MoveSpeed.FlatBonus = _currentStatMod; _lastUpdate = _currentTime; _ownerUnit.AddStatModifier(_statMod); _visualBuff = ApiFunctionManager.AddBuffHUDVisual("MissFortuneStrutStacks", 5.0f, (int)_currentStatMod, _ownerUnit, -1); } } }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { if (!owner.IsDead) { return; } owner.Respawn(); ChampionStatModifier statMod = new ChampionStatModifier(); statMod.MoveSpeed.PercentBonus = 125.0f / 100.0f; owner.AddStatModifier(statMod); ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Revive.troy", owner); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerReviveSpeedBoost", 12.0f, 1, owner); ApiFunctionManager.CreateTimer(12.0f, () => { ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveStatModifier(statMod); }); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { Champion champion = (Champion)target; if (champion.Team != owner.Team) { spell.AddProjectileTarget("LuluWTwo", target); } else { Particle p = ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_buf_02.troy", target, 1); ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_buf_01.troy", target, 1); float time = 2.5f + 0.5f * spell.Level; var buff = ((ObjAIBase)target).AddBuffGameScript("LuluWBuff", "LuluWBuff", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("LuluWBuff", time, 1, (ObjAIBase)target); ApiFunctionManager.CreateTimer(time, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); } }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var units = ApiFunctionManager.GetChampionsInRange(owner, 850, true); Champion mostWoundedAlliedChampion = null; float lowestHealthPercentage = 100; float maxHealth; float newHealth; for (var i = 0; i <= units.Count - 1; i++) { var value = units[i]; if (owner.Team == value.Team && i != 0) { var currentHealth = value.GetStats().CurrentHealth; maxHealth = value.GetStats().HealthPoints.Total; if (currentHealth * 100 / maxHealth < lowestHealthPercentage && owner != value) { lowestHealthPercentage = currentHealth * 100 / maxHealth; mostWoundedAlliedChampion = value; } } } if (mostWoundedAlliedChampion != null) { newHealth = mostWoundedAlliedChampion.GetStats().CurrentHealth + 75 + owner.GetStats().GetLevel() * 15; maxHealth = mostWoundedAlliedChampion.GetStats().HealthPoints.Total; if (newHealth >= maxHealth) { mostWoundedAlliedChampion.GetStats().CurrentHealth = maxHealth; } else { mostWoundedAlliedChampion.GetStats().CurrentHealth = newHealth; } ApiFunctionManager.AddBuffHUDVisual("SummonerHeal", 1.0f, 1, mostWoundedAlliedChampion, 1.0f); ChampionStatModifier statMod2 = new ChampionStatModifier(); statMod2.MoveSpeed.PercentBonus = 30 / 100.0f; mostWoundedAlliedChampion.AddStatModifier(statMod2); ApiFunctionManager.CreateTimer(1.0f, () => { mostWoundedAlliedChampion.RemoveStatModifier(statMod2); }); ApiFunctionManager.AddParticleTarget(mostWoundedAlliedChampion, "global_ss_heal_02.troy", mostWoundedAlliedChampion); ApiFunctionManager.AddParticleTarget(mostWoundedAlliedChampion, "global_ss_heal_speedboost.troy", mostWoundedAlliedChampion); } newHealth = owner.GetStats().CurrentHealth + 75 + owner.GetStats().GetLevel() * 15; maxHealth = owner.GetStats().HealthPoints.Total; if (newHealth >= maxHealth) { owner.GetStats().CurrentHealth = maxHealth; } else { owner.GetStats().CurrentHealth = newHealth; } ApiFunctionManager.AddBuffHUDVisual("SummonerHeal", 1.0f, 1, owner, 1.0f); ChampionStatModifier statMod = new ChampionStatModifier(); statMod.MoveSpeed.PercentBonus = 30 / 100.0f; owner.AddStatModifier(statMod); ApiFunctionManager.CreateTimer(1.0f, () => { owner.RemoveStatModifier(statMod); }); ApiFunctionManager.AddParticleTarget(owner, "global_ss_heal.troy", owner); ApiFunctionManager.AddParticleTarget(owner, "global_ss_heal_speedboost.troy", owner); }