hmmm making this only work while attacking is tricky. Here is what I would do:
Make the real ability a 75% evasion ability.
now make a dummy ability with all the same art and stats, only change the chance to dodge to 0%.
Make sure you keep everything the same!! only change Data - Chance to evade! you will want this field set to 75% on the real ability, and 0% on the dummy. Also, make the editor prefix of the dummy ability " (dummy)". this is so you can tell them apart.
you will need 3 total triggers:
- 1 for the 25 energy drain.
- 2 for the enableing only when attacking.
Energy Drain Trig:
-
Events
-

Unit - A unit is Attacked
-
Conditions
-

Unit-Type of (attacking unit) Equal to YourDude
-
Actions
-

Unit - Set mana of (attacked unit) to (mana of (attacked unit) - 25.00)
-

Special Effect - create a special effect attached to the origin of (Attacked Unit) using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
-

Floating Text - create Floating Text that reads -25 above (attacked unit) with Z offset 50.00, using font size 8, color (65.00%, 100.00%, 15.00%), and 0.00% transparency
-

Floating Text - Set the velocity of (last created floating text) to 64.00 towards 90.00 degrees
-

Floating Text - Change the Lifespan of (last created floating text) to 2.00 seconds
-

Floating Text - Change the Fading age of (last created floating text) to 1.00 seconds
-

Floating Text - Change (last created floating text): Disable Permanence
that will do the mana.
now for the tricky one:
-
Events
-

Unit - A Unit is Attacked
-
Conditions
-

Unit-Type of (attacking unit) Equal to YourDude
-
Actions
-

Set FBcaster = (attacking unit)
-

Unit - Remove Flashing Blade (dummy) from (attacking unit)
-

Unit - Add Flashing Blade to (attacking unit)
-

Timer - Start FlashingBladeCD as a one-shot timer that will expire in 5.00 seconds
-
Events
-

Timer - FlashingBladeCD expires
-
Conditions
-
Actions
-

Unit - Remove Flashing Blade from FBcaster
-

Unit - Add Flashing Blade (dummy) to caster
**WARNING** I did not include memory leak removal in these, so please add them. This will make your unit have a 75% evasion for 5 seconds after it attacks, and this will not stack. so If it attacks every second for 10 seconds, then stops attacking, It will keep its 75% evasion for the duration of its attack, and for 5 seconds after it stops. To lower that duration, simply shange the duration of the one shot timer FlashingBladeCD.
I hope this helps!!!