Hey there, The_Holy_Raider!
I see Utha has already provided a helpful solution to your problem, and I thank him for doing so. However, I would just like to add one of my own, just in case it's the unit's base damage itself that you want to enhance with the attribute.
It involves creating a 'pseudo-ability' (an ability that exists in the editor, but can't be seen in-game. It does, however, still have an effect in-game). This 'pseudo-ability' would be a constant passive ability - such as command aura (abilities such as auras and attribute bonuses are examples of passive abilities) - but would only apply to the hero itself. It will have many levels - say about 50. Why? Because each level represents the amount of attribute points. What do I mean? Let's say the hero's strength is 20, and you want his damage to be increased by 20. You'd make that pseudo-ability level 20, since that's how many strength points the hero has.
So the first thing you can do is: Create a new ability in the object editor, based on a passive, damage-increasing ability, such as command aura. Then, make it so that there are about 50 or so levels. Then, make it so that the ability affects only the hero. Do this by making the 'targets allowed' field only contain 'self'. Then, make it so that the damage enhancement is proportional to the ability's level. (e.g: Level 1 gives +1 damage, level 2 gives +2 damage, level 3 gives +3 damage, and so on)
Then, be sure to make sure the player can't see the pseudo-ability. You can do this by removing its icons and so on, making the ability 'invisible' in the interface. Don't worry about in-game descriptions and all that other nonsense - the player shouldn't see it, so simply leave those fields blank. Of course, if you want, you can also remove and buffs or other graphic effects, too.
(The only restriction with this method is that the unit has to have 'space' for another ability.)
Once the ability has been created, now it's time for some triggering.
What you want to do is add that pseudo-ability whenever the REAL ability (the one that causes the damage to be increased) is cast.
Here's the solution in simple GUI (I'll explain it subsequently):
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to <YourSpell>
-
Actions
-
Unit - Add <Pseudo-Ability> to (Casting Unit)
-
Unit - Set level of <Pseudo-Ability> for (Casting unit) to (Strength of (Casting Unit)(Exclude bonuses))
After that, just create a trigger that removes the pseudo-ability once the REAL ability has worn off. This can be accomplished with a simple timer that is proportional to the amount of time the REAL ability is active.
Voila! This should work, but I haven't tested it, so, please, if you do try it, please do provide feedback. If you encounter any problems, please send me a PM, or simply post in this thread, and I, or any other helpful modder, will be sure to assist you.
Remember, "nothing is impossible!"