public bool Execute() { if (!ItemHelper.CanBeCasted(BaseManta)) { return(false); } if (LocalHero.Distance2D(TargetManager.CurrentTarget) > Extensions.GetAttackRange()) { return(false); } BaseManta.Cast(); return(true); }
public bool Execute() { if (!ItemHelper.CanBeCasted(BaseNullfier)) { return(false); } Hero target = TargetManager.CurrentTarget; var unitState = target.UnitState; if ((unitState & UnitState.Stunned) == UnitState.Stunned || (unitState & UnitState.Hexed) == UnitState.Hexed) { return(false); } BaseNullfier.Cast(target); return(true); }
public bool Execute() { if (!ItemHelper.CanBeCasted(BaseBlink)) { return(false); } Hero target = TargetManager.CurrentTarget; var attackRange = Extensions.GetAttackRange(); float distance = attackRange / 3; if (LocalHero.Distance2D(target) < attackRange + distance) { if (BaseBlink.Id == AbilityId.item_swift_blink) { BaseBlink.Cast(target.InFront(150)); return(true); } return(false); } var blinkPoint = target.InFront(distance); if (blinkPoint.Distance2D(LocalHero.Position) > 1100) { return(false); } BaseBlink.Cast(blinkPoint); return(true); }