Stat Steal
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) is A ground unit) Equal to True
((Attacking unit) has buff Attack Speed Transfer ) Equal to True
Actions
Set Berserk_Caster = (Attacking unit)
Set Berserk_Ability_Level = (Level of Attack Speed Transfer for Berserk_Caster)
Set Berserk_Owner = (Owner of Berserk_Caster)
Set Berserk_Caster_Location = (Position of (Attacking unit))
Set Berserk_Enemy = (Attacked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Berserk_Enemy has buff Attack Speed Loss ) Equal to False
Then - Actions
Set Beserker_Total_Level = Berserk_Ability_Level
Set Berserk_Incrementor = 0
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Berserk_Enemy has buff Attack Speed Loss ) Equal to True
Beserker_Total_Level Less than (Berserk_Ability_Level x 4)
Then - Actions
Set Berserk_Incrementor = (Berserk_Incrementor + 1)
Set Beserker_Total_Level = (Berserk_Ability_Level + Berserk_Incrementor)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Berserk_Enemy has buff Attack Speed Loss ) Equal to True
Beserker_Total_Level Equal to (Berserk_Ability_Level x 4)
Then - Actions
Set Beserker_Total_Level = (Berserk_Ability_Level + Berserk_Incrementor)
Else - Actions
Unit - Create 1 Dummy for Berserk_Owner at Berserk_Caster_Location facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Attack_Speed_Subtract to (Last created unit)
Unit - Set level of Attack_Speed_Subtract for (Last created unit) to Beserker_Total_Level
Unit - Order (Last created unit) to Undead Necromancer - Cripple Berserk_Enemy
Unit - Create 1 Dummy for Berserk_Owner at Berserk_Caster_Location facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Attack_Speed_Bonus to (Last created unit)
Unit - Set level of Attack_Speed_Bonus for (Last created unit) to Beserker_Total_Level
Unit - Order (Last created unit) to Undead Necromancer - Cripple Berserk_Caster
Custom script: call RemoveLocation(udg_Berserk_Caster_Location)