I'm not sure if this is suitable to post it here.
I'd got a threat system made myself for my map, but I'm not sure if it is leakless. Maker will get +rep and given credits.
Some info about this trigger:
1)This trigger is made to: To make the boss attack the hero(total of 3) with the highest threat value when they are fighting it.
2)Important Point:
*This is only made for 3 unit to use.
*There is only 3 boss also which will be fought separately.
*Please help me check if is is compatible for it's uses.
I'd got a threat system made myself for my map, but I'm not sure if it is leakless. Maker will get +rep and given credits.
Some info about this trigger:
1)This trigger is made to: To make the boss attack the hero(total of 3) with the highest threat value when they are fighting it.
2)Important Point:
*This is only made for 3 unit to use.
*There is only 3 boss also which will be fought separately.
*Please help me check if is is compatible for it's uses.
-
Attack Threat
-

Events
-


Unit - A unit Is attacked
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Attacking unit) Equal to Threater[1]
-
-



Then - Actions
-




Set ThreatValue[1] = (ThreatValue[1] + ((Hero level of Threater[1]) x 2))
-
-



Else - Actions
-
-


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



If - Conditions
-




(Attacking unit) Equal to Threater[2]
-
-



Then - Actions
-




Set ThreatValue[2] = (ThreatValue[2] + ((Hero level of Threater[2]) x 2))
-
-



Else - Actions
-
-


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



If - Conditions
-




(Attacking unit) Equal to Threater[3]
-
-



Then - Actions
-




Set ThreatValue[3] = (ThreatValue[3] + ((Hero level of Threater[3]) x 2))
-
-



Else - Actions
-
-
-
-
Casting Threat
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Triggering unit) Equal to Threater[1]
-
-



Then - Actions
-




Set ThreatValue[1] = (ThreatValue[1] + ((Level of (Ability being cast) for (Triggering unit)) x 7))
-
-



Else - Actions
-
-


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



If - Conditions
-




(Triggering unit) Equal to Threater[2]
-
-



Then - Actions
-




Set ThreatValue[2] = (ThreatValue[2] + ((Level of (Ability being cast) for (Triggering unit)) x 7))
-




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





If - Conditions
-






(Triggering unit) Equal to Threater[3]
-
-





Then - Actions
-






Set ThreatValue[3] = (ThreatValue[3] + ((Level of (Ability being cast) for (Triggering unit)) x 7))
-
-





Else - Actions
-
-
-



Else - Actions
-
-
-
-
Force Attack
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


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



If - Conditions
-




And - All (Conditions) are true
-





Conditions
-






ThreatValue[1] Greater than ThreatValue[2]
-






ThreatValue[1] Greater than ThreatValue[3]
-
-
-
-



Then - Actions
-




Unit - Order Boss to Attack Threater[1]
-
-



Else - Actions
-
-


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



If - Conditions
-




And - All (Conditions) are true
-





Conditions
-






ThreatValue[2] Greater than ThreatValue[1]
-






ThreatValue[2] Greater than ThreatValue[3]
-
-
-
-



Then - Actions
-




Unit - Order Boss to Attack Threater[2]
-
-



Else - Actions
-
-


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



If - Conditions
-




And - All (Conditions) are true
-





Conditions
-






ThreatValue[3] Greater than ThreatValue[1]
-






ThreatValue[3] Greater than ThreatValue[2]
-
-
-
-



Then - Actions
-




Unit - Order Boss to Attack Threater[3]
-
-



Else - Actions
-
-
-



