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); } } }
private void SelfWasDamaged() { _lastTakenDamage = _currentTime; if (_invisActive && (InvisBuff != null)) { _owningChampion.RemoveBuffGameScript(InvisBuff); } _invisActive = false; ApiFunctionManager.LogInfo("Evelynn took damage. Invisibility removed."); }
private void SelfWasDamaged() { _lastTakenDamage = _currentTime; if (_strutIsActive && (StrutBuff != null)) { _owningChampion.RemoveBuffGameScript(StrutBuff); } _strutIsActive = false; ApiFunctionManager.LogInfo("Miss Fortune was damaged. Deactivating Strut."); }
public Spell GetSpell(byte slot) { if (Spells.ContainsKey(slot)) { return(Spells[slot]); } else { ApiFunctionManager.LogInfo("There is no spell in slot " + slot + ". Using empty spell in its place."); return(new Spell(this, "BaseSpell", slot)); } }
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 OnUpdate(double diff) { _currentTime += diff; if (_currentTime >= (_lastUpdate + 1000)) { //1% max mana per second ApiFunctionManager.LogInfo("Trying to regenerate Evelynn's mana"); var manaRegenerated = _ownerUnit.GetStats().ManaPoints.Total / 100; var maxMana = _ownerUnit.GetStats().ManaPoints.Total; var newMana = _ownerUnit.GetStats().CurrentMana + manaRegenerated; if (maxMana >= newMana) { _ownerUnit.GetStats().CurrentMana = newMana; } else { _ownerUnit.GetStats().CurrentMana = maxMana; } _lastUpdate = _currentTime; } }
public void OnActivate(Champion owner) { ApiFunctionManager.LogInfo("Ezreal Passive OnActivate"); ApiEventManager.OnChampionDamageTaken.AddListener(this, owner, SelfWasDamaged); }
private void SelfWasDamaged() { ApiFunctionManager.LogInfo("Ezreal was damaged"); }