Alternatively, you could do something like setting the level of Forked Lightning to a factor of the related stat.
Of course, there's limits to this if you have heroes with obscene amounts of stats.
For Example:
In my map, the maximum intelligence a hero can have is 90.
I chose to increase the damage of any spell with every 5 points of a stat. In other words: the maximum ability level for Forked Lightning is 18.
- (side note: I don't recommend going over 20 levels for any ability... it causes epic object data lag and greatly increased map loading times)
Finally, I made a trigger that changes the level of Forked Lightning whenever the hero levels up or picks up an item with +stats.