I would try to use a lightweight "Damage Engine". Bribe's system is fantastic but the fact that it covers EVERYTHING comes at the cost of performance. I know whenever I use it I only ever need 3-4 of the variables, 90% of the features go unused. The recursion protection is really the best feature in there but even that can be unneeded if you design your triggers around it. So if possible, ditch the jack of all trades approach and have a tightly focused system that only runs logic when it's necessary, tailored to your map's needs.
I attached a map with
a very barebones example of this. Note that I can't promise that this will improve performance, it would really depend on how many Damage Events + complex Conditions you have running all of the time in your current setup. My design works like this:
At any time you can register a unit-type + trigger(s) to run whenever that unit-type deals damage.
Then you have one central trigger for when "damage is taken" which handles running those registered triggers:
-
SDE Damage Event
-

Events
-


Unit - A unit Takes damage
-

Conditions
-

Actions
-


Set VariableSet SDE_Source = (Damage source)
-


Custom script: set udg_SDE_Source_ID = GetUnitTypeId(udg_SDE_Source)
-


Set VariableSet SDE_Trigger_Count = (Load SDE_KEY_COUNT of SDE_Source_ID from SDE_Hash.)
-


-------- --------
-


-------- Skip if unregistered: --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




SDE_Trigger_Count Equal to 0
-



Then - Actions
-



Else - Actions
-


-------- --------
So you set three variables, do a hashtable lookup, and a basic If Then Else that exits the trigger early if it fails to find a trigger to run. Pretty lightweight.
If the unit is registered with the system then the rest of the trigger will continue and handle the more complex execution logic:
-
-------- Continue if registered: --------
-
Set VariableSet SDE_Target = (Damage Target)
-
Set VariableSet SDE_Damage_Amount = (Damage taken)
-
-------- --------
-
-------- Run registered damage triggers (turn this off to avoid infinite loops): --------
-
Trigger - Turn off SDE Damage Event <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

If - Conditions
-


SDE_Trigger_Count Equal to 1
-

Then - Actions
-


Trigger - Run (Load SDE_Trigger_Count of SDE_Source_ID in SDE_Hash.) (checking conditions)
-

Else - Actions
-


For each (Integer SDE_Loop) from 1 to SDE_Trigger_Count, do (Actions)
-



Loop - Actions
-




Trigger - Run (Load SDE_Loop of SDE_Source_ID in SDE_Hash.) (checking conditions)
-
Trigger - Turn on SDE Damage Event <gen>
So this design reduces the complexity when you have say 10+ triggers using the "A unit Takes damage" Event with a sum of 100+ Conditions all varying in complexity. Instead, you use one central trigger that will filter out any unwanted units early, avoiding the need of asking a bunch of impossible questions.
Then moving onto the trigger(s) that run in response to dealing damage, you would use
SDE_Source,
SDE_Target, and
SDE_Damage_Amount which are automatically Set for you. Note that
SDE_Damage_Amount is just a reference to a value, unlike in Bribe's system where it's used by the system to update the final damage dealt.
-
Paladin Deals Damage
-

Events
-

Conditions
-


(Unit-type of SDE_Target) Equal to Footman
-


(Owner of SDE_Target) Equal to Player 1 (Red)
-

Actions
-


-------- Note: This trigger was registered to run whenever any Paladin deals damage. --------
-


-------- You could modify the system to use specific unit handles instead of unit-type id! --------
-


-------- --------
-


Game - Display to (All players) for 5.00 seconds the text: (Damage dealer: + (Name of SDE_Source))
-


Game - Display to (All players) for 5.00 seconds the text: (Damage taker: + (Name of SDE_Target))
-


Game - Display to (All players) for 5.00 seconds the text: (Damage: + (String(SDE_Damage_Amount)))
-


-------- --------
-


Special Effect - Create a special effect attached to the weapon of SDE_Source using Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
-


Special Effect - Destroy (Last created special effect)
-


-------- --------
-


Special Effect - Create a special effect attached to the origin of SDE_Target using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-


Special Effect - Destroy (Last created special effect)
Note how we don't have to check if the Paladin was the (Damage source), that's already been confirmed or this trigger wouldn't be running in the first place.