OOOOOOOOOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
That map is a bit large to just find one simple thing.
I suggest re-organizing and cleaning the triggers at least.
But anyway here is your trigger:
-
Carga de energia
-

Events
-


Unit - A unit Is attacked
-

Conditions
-


((Attacking unit) has buff Carga de energia ) Equal to True
-

Actions
-


Wait 0.50 seconds
-


Unit - Remove Carga de energia buff from (Attacking unit)
You use "Unit - A unit Is attacked" as the event.
The problem is that when "A unit Is attacked", the unit is not attacked YET.
Example: I want to hit you with my sword. To do that, I have to swing my sword at you. When my sword hits you, you gain damage.
Start swinging sword = A unit Is attacked
Sword hits you = A unit Takes damage
(Time difference = Unit - Combat - Attack X - Animation Damage Point (udpX) - real)
(Object editor - Units)
You check if the target has a buff that it will gain in a few moment of time.
You have to use the event "A unit Takes damage". For that you need a DDS (Damage Detection System) to be able to use the event.
In this case you don't need anything specific so it is very simple.
I have a system that you can use and is not very hard to implement. (see attached file)
You can also use
this system, but I don't know how it works so I can't help you with that.
For the other things in your map... idc what you have XD
But you should indeed, as Nichilus said, clean everything up.