Exemplo n.º 1
0
        static Brand()
        {
            Q = new Spell.Skillshot(SpellSlot.Q, DamageType.Magical)
            {
                AllowedCollisionCount = 0,
            };

            W = new Spell.Skillshot(SpellSlot.W, DamageType.Magical)
            {
                AllowedCollisionCount = int.MaxValue,
            };

            E = new Spell.Targeted(SpellSlot.E, 625, DamageType.Magical);

            R = new Spell.Targeted(SpellSlot.R, 750, DamageType.Magical);

            DamageIndicator.DamageDelegate = HandleDamageIndicator;

            MissileClient.OnCreate += delegate(GameObject sender, EventArgs args)
            {
                var missile = sender as MissileClient;
                if (missile != null && E.IsReady())
                {
                    var target = ObjectManager.Get <AIHeroClient>().Where(x => x.IsValidTarget() && x.IsInMissileLine(missile));
                    if (E.GetTarget(target) != null)
                    {
                        E.Cast(E.GetTarget(target));
                    }
                }
            };
        }