Ejemplo n.º 1
0
        public Chronosphere(Ability ability)
            : base(ability)
        {
            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(Eul);
            CounterAbilities.Add(Manta);
            CounterAbilities.AddRange(StrongDefUltimates);
            CounterAbilities.AddRange(VsDisable);
            CounterAbilities.AddRange(VsDamage);
            CounterAbilities.AddRange(VsPhys);
            CounterAbilities.Add(SnowBall);
            CounterAbilities.Add(Armlet);
            CounterAbilities.Add(Bloodstone);

            CounterAbilities.Remove("slark_dark_pact");
            BlinkAbilities.Remove("slark_pounce");

            if (AbilityOwner.Team == Variables.HeroTeam)
            {
                // leave only blink abilities
                // if void is ally
                CounterAbilities.Clear();
                DisableAbilities.Clear();
            }

            for (var i = 0u; i < 3; i++)
            {
                duration[i] = ability.AbilitySpecialData.First(x => x.Name == "duration").GetValue(i);
            }

            ObstacleStays = true;
        }
Ejemplo n.º 2
0
        protected UsableAbility(Ability ability, AbilityType type, AbilityCastTarget target)
        {
            Sleeper = new Sleeper();
            Type = type;

            if (ability == null)
            {
                //Gold spender
                return;
            }

            Ability = ability;
            CastPoint = (float)ability.FindCastPoint();
            Name = ability.Name;
            Handle = ability.Handle;
            IsItem = ability is Item;
            ClassID = ability.ClassID;
            IgnoresLinkensSphere = ability.IsAbilityBehavior(AbilityBehavior.NoTarget)
                                   || ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect);
            PiercesMagicImmunity = ability.PiercesMagicImmunity();
            CanBeUsedOnEnemy = target.HasFlag(AbilityCastTarget.Enemy) || type == AbilityType.Disable;
            CanBeUsedOnAlly = target.HasFlag(AbilityCastTarget.Ally);

            Debugger.WriteLine("///////// UsableAbility // " + Name);
            Debugger.WriteLine("// Type: " + Type);
            Debugger.WriteLine("// Cast point: " + CastPoint);
            Debugger.WriteLine("// Cast range: " + Ability.GetRealCastRange());
            Debugger.WriteLine("// Ignores linkens sphere: " + IgnoresLinkensSphere);
            Debugger.WriteLine("// Pierces magic immunity: " + PiercesMagicImmunity);
            Debugger.WriteLine("// Can be used on ally: " + CanBeUsedOnAlly);
            Debugger.WriteLine("// Can be used on enemy: " + CanBeUsedOnEnemy);
        }
Ejemplo n.º 3
0
        public PhaseShift(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
            : base(ability, type, target)
        {
            sleeper = new Sleeper();
            Player.OnExecuteOrder += PlayerOnExecuteOrder;

            for (var i = 0u; i < shiftDuration.Length; i++)
            {
                shiftDuration[i] = Ability.AbilitySpecialData.First(x => x.Name == "duration").GetValue(i) * 1000;
            }
        }
Ejemplo n.º 4
0
        public ArmletOfMordiggian(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
            : base(ability, type, target)
        {
            attacking = new MultiSleeper();
            attackStart = new MultiSleeper();
            delay = new Sleeper();

            delay.Sleep(1000);

            Game.OnUpdate += OnUpdate;
            Player.OnExecuteOrder += OnExecuteOrder;
        }
Ejemplo n.º 5
0
        protected EvadableAbility(Ability ability)
        {
            AbilityOwner = (Unit)ability.Owner;
            OwnerHandle = AbilityOwner.Handle;
            Handle = ability.Handle;
            Ability = ability;
            CastPoint = (float)ability.FindCastPoint();
            Name = ability.Name;
            OwnerClassID = AbilityOwner.ClassID;
            IsDisable = ability.IsDisable() || ability.IsSilence();
            PiercesMagicImmunity = ability.PiercesMagicImmunity();
            CreateTime = Game.RawGameTime;

            if (IsDisable)
            {
                DisableAbilities.AddRange(DisableAbilityNames);
                BlinkAbilities.AddRange(BlinkAbilityNames);
            }
            Debugger.WriteLine("///////// Evadable ability // " + GetType().Name + " (" + Name + ")");
            Debugger.WriteLine("// Cast point: " + CastPoint);
            Debugger.WriteLine("// Owner: " + AbilityOwner.GetName());
            Debugger.WriteLine("// Is disable: " + IsDisable);
            Debugger.WriteLine("// Pierces Magic Immunity: " + PiercesMagicImmunity);
        }
Ejemplo n.º 6
0
 public BlinkAbility(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
Ejemplo n.º 7
0
 public BallLightning(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     //todo improve
     CastPoint += 0.1f;
 }
Ejemplo n.º 8
0
 public Bloodstone(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     Game.OnUpdate += OnUpdate;
 }
Ejemplo n.º 9
0
 public LinkensSphere(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }