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); }
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; }
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) { }
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); }
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); }
public void OnStartCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, pcastname, owner); }
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); }
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); }
public static void RemoveBuff(IObjAiBase target, string buff) { target.RemoveBuffsWithName(buff); }
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; }
public void OnActivate(IObjAiBase owner) { //empty }
public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell) { StatsModifier.AttackSpeed.PercentBonus = StatsModifier.AttackSpeed.PercentBonus + (0.15f + 0.05f * ownerSpell.Level); unit.AddStatModifier(StatsModifier); }
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); }
public void RemoveListener(object owner, IObjAiBase unit) { listeners.RemoveAll((listener) => listener.Item1 == owner && listener.Item2 == unit); }
public void OnDeactivate(IObjAiBase unit) { }
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) { }
public void OnActivate(IObjAiBase unit, IBuff buff, ISpell ownerSpell) { unit.ApplyCrowdControl(_crowd); }
public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); }
public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowd); }
public void OnDeactivate(IObjAiBase owner) { }
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); }