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);
         }
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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
        }
Exemplo n.º 4
0
        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);
                }
            }
        }
Exemplo n.º 6
0
 public void RemoveBuffGameScript(BuffGameScriptController buffController)
 {
     buffController.DeactivateBuff();
     BuffGameScriptControllers.Remove(buffController);
 }
Exemplo n.º 7
0
 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);
 }