event
unit - a unit finishes casting an ability
condition
(ability being cast) is equal to quickstrike
event
set quickstrikesVariable = level of quickstrike for (triggering unit)
add quickstrike speed attack to (triggering unit) //this is another ability that is actually passive, just have it increase the speed of the unit by as much as you can.there is only going to be one level to this ability
issue (triggering unit) an order to attack (targetted unit)
for each (integer A) from 1-4 do:
if (all conditions are true) then do (then actions) else do (else actions)
if
quickstrikesVariable is less than or equal to 0
then
remove quickstrike speed attack from (triggering unit)
else
set quickstrikesVariable = (quickstrikesVariable) - 1
wait .5 seconds //game time or lag will affect this time. this tell it to wait .5 seconds between removing points from the variable we made to count.
unfortunately i really dunno how to make that stupid thing count attacks for a specific unit with a specific ability. BUT with some tuning between the atk rate increase from the passive ability given and taken, and then the seconds it counts down... you CAN limit the attacks per level. only real problem with this method is if you have multiple people casting it at the same time... one person could end up attacking with that ubered out attack speed for the rest of the game... so if you plan to have multiple charactors with this ability the easiest (though longest) way to fix is set it so that theres a trigger like this with the first condition including something like "(owner of(triggering unit)) = player 1 (red)" then down the list for the rest of the playable slots as well...
but its really good for like an arena where a hero can only be picked once, as long as only that hero can cast this spell.
it can be annoying sometimes setting up spells into triggers... if anyone has a better or easier way please post it