public void OnUpdate(double diff) { if (_owningChampion == null) { return; } if (_owningSpell == null) { _owningSpell = _owningChampion.GetSpell(14); if (_owningSpell == null) { return; } } _currentTime += diff; if (_currentTime >= (_lastTakenDamage + 5000)) // if damage has not been taken in 5 seconds, and Strut is not active, activate Strut. { if (!_strutIsActive) { ApiFunctionManager.LogInfo("Miss Fortune has not been damaged in 5 seconds. Activating Strut."); StrutBuff = _owningChampion.AddBuffGameScript("MFStrut", "MFStrut", _owningSpell, -1, true); _strutIsActive = true; } else { StrutBuff.UpdateBuff(diff); } } }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var ad = (owner.GetStats().AttackDamage.Total - owner.GetStats().AttackDamage.BaseValue) * 0.5f; var ap = owner.GetStats().AbilityPower.Total * 0.5f; var damage = ((new float[] { 35, 55, 75, 95, 115 }[spell.Level - 1]) + ad + ap) / 2; target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); RavageBuff = owner.AddBuffGameScript("EveRavage", "EveRavage", spell, 3.0f, true); }
public void AddBuffGameScript(string buffNamespace, string buffClass, ISpell ownerSpell, float removeAfter = -1f, bool isUnique = false) { if (isUnique) { RemoveBuffGameScriptsWithName(buffNamespace, buffClass); } var buffController = new BuffGameScriptController(_game, this, buffNamespace, buffClass, (Spell)ownerSpell, removeAfter); BuffGameScriptControllers.Add(buffController); buffController.ActivateBuff(); // TODO: should handle the controllers in the class, and don't pass them outside }
public BuffGameScriptController AddBuffGameScript(String buffNamespace, String buffClass, Spell ownerSpell, float removeAfter = -1f, bool isUnique = false) { if (isUnique) { RemoveBuffGameScriptsWithName(buffNamespace, buffClass); } BuffGameScriptController buffController = new BuffGameScriptController(this, buffNamespace, buffClass, ownerSpell, duration: removeAfter); BuffGameScriptControllers.Add(buffController); buffController.ActivateBuff(); return(buffController); }
public void OnUpdate(double diff) { //TODO:Enable this when a way to give speed stacks is found /*if (!_frenzyLearned) * { * if (_frenzy.Level >= 1) * { * _frenzyLearned = true; * } * } * * if (_frenzyLearned) * { * FrenzyBuff = _owningChampion.AddBuffGameScript("EveSpeed", "EveSpeed", _frenzy, -1, true); * }*/ if (_owningChampion == null) { return; } if (_owningSpell == null) { _owningSpell = _owningChampion.GetSpell(14); if (_owningSpell == null) { return; } } _currentTime += diff; if (_currentTime >= (_lastTakenDamage + 6000)) { if (!_invisActive) { ApiFunctionManager.LogInfo("Evelynn hasn't been damaged in the last 6 second. Shadow Walk activated."); InvisBuff = _owningChampion.AddBuffGameScript("EveInvis", "EveInvis", _owningSpell, -1, true); _invisActive = true; } else { InvisBuff.UpdateBuff(diff); } } }
public void RemoveBuffGameScript(BuffGameScriptController buffController) { buffController.DeactivateBuff(); BuffGameScriptControllers.Remove(buffController); }
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); }