コード例 #1
0
ファイル: UsableAbility.cs プロジェクト: senzdota/Ensage
        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
ファイル: DarkRift.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: UsableAbility.cs プロジェクト: IdcNoob/Ensage
        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
ファイル: DarkRift.cs プロジェクト: tyljeff9408/Ensage
 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
ファイル: PhaseShift.cs プロジェクト: IdcNoob/Ensage
        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
ファイル: ArmletOfMordiggian.cs プロジェクト: IdcNoob/Ensage
        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
ファイル: SearingChains.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: Snowball.cs プロジェクト: tyljeff9408/Ensage
 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
ファイル: Replicate.cs プロジェクト: IdcNoob/Ensage
 public Replicate(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #18
0
ファイル: SearingChains.cs プロジェクト: Fluffy322/Ensage-1
 public SearingChains(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #19
0
ファイル: SleightOfFist.cs プロジェクト: IdcNoob/Ensage
 //todo: improve
 public SleightOfFist(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #20
0
ファイル: FortunesEnd.cs プロジェクト: IdcNoob/Ensage
 public FortunesEnd(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #21
0
ファイル: NotTargetable.cs プロジェクト: IdcNoob/Ensage
 public NotTargetable(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #22
0
ファイル: FireRemnant.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: BallLightning.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: EchoSlam.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: NotTargetable.cs プロジェクト: senzdota/Ensage
 public NotTargetable(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #32
0
ファイル: FortunesEnd.cs プロジェクト: ihatevim/Ensage-2
 public FortunesEnd(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #33
0
ファイル: Snowball.cs プロジェクト: Fluffy322/Ensage-1
 public Snowball(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #34
0
ファイル: LinkensSphere.cs プロジェクト: Fluffy322/Ensage-1
 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
ファイル: TargetBlink.cs プロジェクト: ihatevim/Ensage-2
 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
ファイル: TargetTree.cs プロジェクト: senzdota/Ensage
 public TargetTree(Ability ability, AbilityType type, AbilityCastTarget target)
     : base(ability, type, target)
 {
 }
コード例 #39
0
ファイル: Bloodstone.cs プロジェクト: IdcNoob/Ensage
 public Bloodstone(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
     Game.OnUpdate += OnUpdate;
 }
コード例 #40
0
ファイル: ForceStaff.cs プロジェクト: Fluffy322/Ensage-1
 public ForceStaff(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #41
0
ファイル: Snowball.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: Supernova.cs プロジェクト: IdcNoob/Ensage
 public Supernova(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #44
0
ファイル: BlinkAbility.cs プロジェクト: IdcNoob/Ensage
 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
ファイル: FireRemnant.cs プロジェクト: Fluffy322/Ensage-1
 public FireRemnant(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }
コード例 #47
0
ファイル: LinkensSphere.cs プロジェクト: IdcNoob/Ensage
 public LinkensSphere(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self)
     : base(ability, type, target)
 {
 }