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); }
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); }
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); }
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); }
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; } }
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; }
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; } }
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; }
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; }
public SearingChains(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public Enrage(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public OrbAbility(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { Unit.OnModifierAdded += OnModifierAdded; Unit.OnModifierRemoved += OnModifierRemoved; }
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; }
public MedallionOfCourage(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public ElectricVortex(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public Replicate(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
//todo: improve public SleightOfFist(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public FortunesEnd(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public NotTargetable(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public FireRemnant(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public Doppelganger(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public BladeMail(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
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); }
public Bloodstone(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { Game.OnUpdate += OnUpdate; }
public BallLightning(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { //todo improve CastPoint += 0.1f; }
public BallLightning(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { //todo improve }
public EchoSlam(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { aftershockRadius = Hero.FindSpell("earthshaker_aftershock").GetRadius(); }
public Snowball(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public LinkensSphere(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public TargetBlink(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public Supernova(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public TargetTree(Ability ability, AbilityType type, AbilityCastTarget target) : base(ability, type, target) { }
public ForceStaff(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public BlinkAbility(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }
public BlindingLight(Ability ability, AbilityType type, AbilityCastTarget target = AbilityCastTarget.Self) : base(ability, type, target) { }