示例#1
0
 public static bool HasBuff(IObjAiBase unit, string b)
 {
     return(unit.HasBuff(b));
 }
 public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
 {
     ((IChampion)unit).SetSpell("YasuoQ2W", 0, true);
 }
示例#3
0
        public Buff(Game game, string buffName, float duration, int stacks, ISpell originspell, IObjAiBase onto, IObjAiBase from, bool infiniteDuration = false)
        {
            if (duration < 0)
            {
                throw new ArgumentException("Error: Duration was set to under 0.");
            }

            _infiniteDuration = infiniteDuration;
            _game             = game;
            _remove           = false;
            _scriptEngine     = game.ScriptEngine;

            _buffGameScript = _scriptEngine.CreateObject <IBuffGameScript>(buffName, buffName);

            BuffAddType = _buffGameScript.BuffAddType;
            if (BuffAddType == (BuffAddType.STACKS_AND_OVERLAPS | BuffAddType.STACKS_AND_RENEWS) && _buffGameScript.MaxStacks < 2)
            {
                throw new ArgumentException("Error: Tried to create Stackable Buff, but MaxStacks was less than 2.");
            }

            BuffType = _buffGameScript.BuffType;
            Duration = duration;
            IsHidden = _buffGameScript.IsHidden;
            if (_buffGameScript.MaxStacks > 254 && !(BuffType == BuffType.COUNTER))
            {
                MaxStacks = 254;
            }
            else
            {
                MaxStacks = _buffGameScript.MaxStacks;
            }
            Name        = buffName;
            OriginSpell = originspell;
            if (onto.HasBuff(Name) && BuffAddType == BuffAddType.STACKS_AND_OVERLAPS)
            {
                // Put parent buff data into children buffs
                StackCount = onto.GetBuffWithName(Name).StackCount;
                Slot       = onto.GetBuffWithName(Name).Slot;
            }
            else
            {
                StackCount = stacks;
                Slot       = onto.GetNewBuffSlot(this);
            }
            SourceUnit  = from;
            TimeElapsed = 0;
            TargetUnit  = onto;
        }
示例#4
0
        public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
        {
            var time = 11f - ownerSpell.Level * 1f;

            AddParticleTarget(owner, "Yasuo_base_E_timer1.troy", unit);
        }
 public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
 }
示例#6
0
 public NewPathEventArgs(IObjAiBase objAiBase, IEnumerable <Vector3> path)
 {
     ObjAiBase = objAiBase;
     Path      = path;
 }
 public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
 {
     StatsModifier.MoveSpeed.PercentBonus = 0.3f;
     unit.AddStatModifier(StatsModifier);
 }
示例#8
0
 public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
     //projectile.SetToRemove();
 }
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, "Kassadin_Base_cas.troy", owner, 1, "L_HAND");
 }
 public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     spell.AddProjectileTarget("CaitlynAceintheHoleMissile", target);
 }
示例#11
0
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, pcastname, owner);
 }
示例#12
0
        public static IBuff AddBuff(string buffName, float duration, byte stacks, ISpell originspell, IObjAiBase onto, IObjAiBase from, bool infiniteduration = false)
        {
            IBuff buff;

            try
            {
                buff = new Buff(_game, buffName, duration, stacks, originspell, onto, from, infiniteduration);
            }
            catch (ArgumentException exception)
            {
                _logger.Error(exception);
                return(null);
            }

            onto.AddBuff(buff);
            return(buff);
        }
示例#13
0
        public static IParticle AddParticleTarget(IObjAiBase unit, string particle, ITarget target, float size = 1.0f, string bone = "")
        {
            var p = new Particle(_game, unit, target, particle, size, bone);

            return(p);
        }
示例#14
0
 public static void RemoveBuff(IObjAiBase target, string buff)
 {
     target.RemoveBuffsWithName(buff);
 }
示例#15
0
 public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     AddParticleTarget(owner, "ezreal_bow_yellow.troy", owner, 1, "L_HAND");
 }
 public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
 {
     spell.AddProjectileTarget("NullLance", target, true);
 }
 public BuffRemoveEventArgs(IObjAiBase objAiBase, IBuff buff)
 {
     ObjAiBase = objAiBase;
     Buff      = buff;
 }
示例#18
0
 public void OnActivate(IObjAiBase owner)
 {
     //empty
 }
示例#19
0
        public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
        {
            StatsModifier.AttackSpeed.PercentBonus = StatsModifier.AttackSpeed.PercentBonus + (0.15f + 0.05f * ownerSpell.Level);

            unit.AddStatModifier(StatsModifier);
        }
示例#20
0
 public void AddListener(object owner, IObjAiBase unit, Action<IAttackableUnit, bool> callback)
 {
     var listenerTuple = new Tuple<object, IObjAiBase, Action<IAttackableUnit, bool>>(owner, unit, callback);
     listeners.Add(listenerTuple);
 }
 public void OnDeactivate(IObjAiBase unit)
 {
     unit.RemoveStatModifier(StatsModifier);
 }
示例#22
0
 public void RemoveListener(object owner, IObjAiBase unit)
 {
     listeners.RemoveAll((listener) => listener.Item1 == owner && listener.Item2 == unit);
 }
示例#23
0
 public void OnDeactivate(IObjAiBase unit)
 {
 }
示例#24
0
 public void OnActivate(IObjAiBase unit, ISpell ownerSpell)
 {
     _visualBuff = AddBuffHudVisual("KatarinaRSound", 2.5f, 1, BuffType.AURA, unit);
 }
 public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
 }
示例#26
0
 public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell)
 {
     unit.ApplyCrowdControl(_crowd);
 }
示例#27
0
 public void OnDeactivate(IObjAiBase unit)
 {
     RemoveBuffHudVisual(_visualBuff);
     unit.RemoveStatModifier(_statMod);
 }
示例#28
0
 public void OnDeactivate(IObjAiBase unit)
 {
     unit.RemoveCrowdControl(_crowd);
 }
示例#29
0
 public void OnDeactivate(IObjAiBase owner)
 {
 }
示例#30
0
 public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
 {
     target.TakeDamage(owner, 200f + spell.Level * 100f + owner.Stats.AbilityPower.Total * 0.75f,
                       DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false);
 }