You can sort of backdoor it.
First things first though...a unit's attack speed limit can be no faster than the backswing point (an Animation property which you can change).
Otherwise the attack speed is equal to the unit's base attack speed + an additional (2% attack speed/point of agility <-- This is a constant you can EDIT) + attack speed bonuses (Abilities or items) up to a maximum of 500%.
[Wait for an edit - Will do testing]
Did some thorough tested and have found out how to calculate attack speed and max attack speed.
Test values used:
Animation Backswing Point - 0.000
Animation Damage Point - 0.000
Range - 0.000
Range Motion Buffer - 0.000
Gameplay Constant: Attack Speed Bonus / Point of agility = 1%
Base Attack Speed - 4.000 seconds and 1.000 seconds
Other Attack Speed Modifiers Used - Gloves of Haste; Bloodlust
Conclusions:
-Attack speed bonuses NEVER stack, they add (10% + 15% + 20% = 45% bonus; it does not equal a 10%*15%*20% = 51.8% bonus)
-Attack speed DEBUFFS also DO NOT STACK and subtract linearly. (15% gloves of haste + -25% slow = -10% bonus)
-Attack speeds come in static multiples of 1/32 of a second (0.03125 seconds).
-MINIMUM BASE ATTACK SPEED is .125 seconds, setting it lower will bump it to said attack speed. It can be increased up to .03125 second through the use of attack speed increase buffs or abilities and agility.
To find attack speed, you do the following:
Take base attack speed.
We'll call this the
Base.
Next, find the
Attack Speed Bonus using the below formula.
(1 + Hero's agility * (% attack speed bonus / point of agility) + any other attack speed bonuses from items or abilities).
Attack speed = (
Base /
Attack Speed Bonus)
rounded up to the nearest 1/32 of a second.
EX 1: 1.000 seconds is a multiple of 0.03125 seconds. If you have 0 agility and no attack speed bonus (100% of normal attack speed), you will get (1.000 seconds / 100%) = 1.000 seconds. BUT! Even though 1.000 seconds is a multiple of 1/32 of a second, you still round up to nearest 1/32. So it would become 1.03125 seconds = your attack speed. If you however had 1 point of agility, it would be (1.000 seconds / 101%) which rounded up would be 1.000 seconds.
EX 2: 2.56 seconds = base attack speed. You have 25 agility (1% attack speed per point of agility), 15% gloves of haste and bloodlust (40%).
Attack speed = (2.56 / 1+.25+.15+.4) = (2.56 / 1.8) = 1.4222222 = (Rounded up to nearest 1/32...) = 1.4375 seconds.
What does all this mean?
Well, for starters, it means that even though the max attack speed bonus is 500%, you don't need all of the 500% bonus to cap your max attack speed.
Example 1: If your base attack speed is 4.000 seconds, your max attack speed is .8125 seconds (492.31%) which will be at 393 agility at 1%/point of agility
Example 2: If your base attack speed is 1.000 seconds, your max attack speed is 0.21875 seconds (457.14%) which will be at 358 agility at 1%/point of agility
It also means that most DPS calculations are INACCURATE!
It also means that the minimum attack speed is 1/32 of a second (.03125 seconds) which means attack speeds less than that are rounded up to it.
So, next time you're playing a TD and you're wondering which to buy...
25 damage / 0.03 seconds <-- 300 gold, super tower
20 damage / 0.01 seconds <-- 650 gold, ultimate tower
Guess what...the super tower is better dps.
Attack Speed Calculator
Attachment:
attackspeed.xls