示例#1
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);
        }
示例#2
0
 public DarkRift(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     fountain =
         ObjectManager.GetEntities<Unit>()
             .First(x => x.ClassID == ClassID.CDOTA_Unit_Fountain && x.Team == HeroTeam);
 }
示例#3
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);
        }
示例#4
0
 public DarkRift(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     fountain =
         ObjectManager.GetEntities <Unit>()
         .First(x => x.ClassId == ClassId.CDOTA_Unit_Fountain && x.Team == HeroTeam);
 }
示例#5
0
 public TimeWalk(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     talent = Hero.GetAbilityById(AbilityId.special_bonus_unique_faceless_void);
     if (talent != null)
     {
         bonus = talent.AbilitySpecialData.First(x => x.Name == "value").Value;
     }
 }
示例#6
0
        public ArmletOfMordiggian(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
            : base(ability, type, target)
        {
            attacking   = new MultiSleeper();
            attackStart = new MultiSleeper();

            Game.OnUpdate         += OnUpdate;
            Player.OnExecuteOrder += OnExecuteOrder;
        }
示例#7
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;
            }
        }
示例#8
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;
            }
        }
示例#9
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;
        }
示例#10
0
        public ArmletOfMordiggian(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
            : base(ability, type, target)
        {
            armletEnabled = Hero.Modifiers.Any(x => x.Name == ArmletModifierName);

            Game.OnUpdate                += OnUpdate;
            Player.OnExecuteOrder        += OnExecuteOrderId;
            Drawing.OnDraw               += OnDraw;
            ObjectManager.OnRemoveEntity += OnRemoveEntity;
            Entity.OnAnimationChanged    += OnAnimationChanged;
            Unit.OnModifierAdded         += OnModifierAdded;
            Unit.OnModifierRemoved       += OnModifierRemoved;
        }
示例#11
0
 public SearingChains(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#12
0
文件: Enrage.cs 项目: senzdota/Ensage
 public Enrage(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#13
0
 public OrbAbility(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     Unit.OnModifierAdded   += OnModifierAdded;
     Unit.OnModifierRemoved += OnModifierRemoved;
 }
示例#14
0
 public Snowball(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     grabRadius = Ability.AbilitySpecialData.First(x => x.Name == "snowball_grab_radius").Value;
 }
示例#15
0
 public MedallionOfCourage(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#16
0
 public ElectricVortex(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#17
0
 public Replicate(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#18
0
 public SearingChains(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#19
0
 //todo: improve
 public SleightOfFist(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#20
0
 public FortunesEnd(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#21
0
 public NotTargetable(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#22
0
 public FireRemnant(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#23
0
 public Doppelganger(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#24
0
 public BladeMail(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#25
0
 public TreeDance(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     fountain = ObjectManager.GetEntities <Unit>()
                .First(x => x.NetworkName == "CDOTA_Unit_Fountain" && x.Team == HeroTeam);
 }
示例#26
0
 public Bloodstone(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     Game.OnUpdate += OnUpdate;
 }
示例#27
0
 public BallLightning(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     //todo improve
     CastPoint += 0.1f;
 }
示例#28
0
 public BallLightning(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     //todo improve
 }
示例#29
0
 public EchoSlam(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     aftershockRadius = Hero.FindSpell("earthshaker_aftershock").GetRadius();
 }
示例#30
0
 public Replicate(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#31
0
 public NotTargetable(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#32
0
 public FortunesEnd(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#33
0
 public Snowball(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#34
0
 public LinkensSphere(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#35
0
 public EchoSlam(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     aftershockRadius = Hero.FindSpell("earthshaker_aftershock").GetRadius();
 }
示例#36
0
 public TargetBlink(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#37
0
 public Supernova(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#38
0
 public TargetTree(Ability ability, AbilityType type, AbilityCastTarget target)
     : base(ability, type, target)
 {
 }
示例#39
0
 public Bloodstone(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     Game.OnUpdate += OnUpdate;
 }
示例#40
0
 public ForceStaff(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#41
0
 public Snowball(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     grabRadius = Ability.AbilitySpecialData.First(x => x.Name == "snowball_grab_radius").Value;
 }
示例#42
0
 //todo: improve
 public SleightOfFist(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#43
0
 public Supernova(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#44
0
 public BlinkAbility(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#45
0
 public BlindingLight(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#46
0
 public FireRemnant(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
示例#47
0
 public LinkensSphere(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }