Hey y'all. So i took a long break from creating and now I'm completely useless... I'm trying to create a spell based off of critical strike (for the never miss option) which doesnt actually do bonus damage but instead, the hero which has the passive spell (called Chevalier) has a chance to go into a state of maximum attack speed for a couple seconds. For some reason my hero never gets the speed bonus. There is also supposed to be a 5 second buffer time between casts. Please take a look and tell me my error!
Code:
Chevalier
Events
Unit - A unit Is attacked
Conditions
((Unit-type of (Attacking unit)) Equal to Highland Archer) and (chevalierlearned Equal to True)
Actions
Set chevalierrandomint = (Random integer number between 1 and 100)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
chevaliertimeelapsed Equal to True
chevalierrandomint Less than or equal to (20 + (5 x (Level of Chevalier for chevaliercaster)))
Then - Actions
Unit - Create 1 dummy for (Owner of chevaliercaster) at (Position of chevaliercaster) facing Default building facing degrees
Unit - Add dummychevalierfrenzy to (Last created unit)
Unit - Set level of dummychevalierfrenzy for (Last created unit) to (Level of Chevalier for chevaliercaster)
Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy chevaliercaster
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Set chevaliertimeelapsed = False
Wait 5.00 seconds
Set chevaliertimeelapsed = True
Else - Actions
Do nothing