Que tal comunidad, estoy editando un mapa y encontré esta habilidad en Hive que tiene la función de que cada vez que una unidad muere dentro del área de efecto, el 100% de su vida se reparte entre los aliados y el héroe. Sin embargo, esta demasiado rota por el hecho de que roba vida a las unidades aliadas e incluso a los edificios. Si algún alma caritativa me puede ayudar lo agradecería
Primer detonador:
[gui]AA Preload
Events
Map initialization
Conditions
Actions
For each (Integer AA_PreLoop) from 1 to 4, do (Actions)
Loop - Actions
Set VariableSet AA_Percent[AA_PreLoop] = (5.00 / (5.00 x (Real(AA_PreLoop))))[/gui]
Segundo detonador:
[gui]AA Effect
Events
Unit - A unit Dies
Conditions
Actions
Set VariableSet AA_Loc[1] = (Position of (Triggering unit))
Set VariableSet AA_Cstr_Group = (Units within 700.00 of AA_Loc[1] matching (((Level of Expoliar ejecución for (Matching unit)) Greater than 0) and (((Matching unit) is alive) Equal to Verdadero)).)
Unit Group - Pick every unit in AA_Cstr_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AA_Cstr_Group is empty) Equal to Falso
Then - Actions
Set VariableSet AA_E_HP = (Max life of (Triggering unit))
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
Special Effect - Destroy (Last created special effect)
Set VariableSet AA_Loc[2] = (Position of (Picked unit))
Set VariableSet AA_A_Group = (Units within 700.00 of AA_Loc[2] matching ((((Matching unit) belongs to an ally of (Owner of (Picked unit)).) Equal to Verdadero) and (((Matching unit) is alive) Equal to Verdadero)).)
Set VariableSet AA_HPcount = ((AA_E_HP / AA_Percent[(Level of Expoliar ejecución for (Picked unit))]) / (Real((Number of units in AA_A_Group))))
Unit Group - Pick every unit in AA_A_Group and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + AA_HPcount)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_AA_Loc[2])
Custom script: call DestroyGroup (udg_AA_A_Group)
Else - Actions
Custom script: call RemoveLocation (udg_AA_Loc[1])
Custom script: call DestroyGroup (udg_AA_Cstr_Group)[/gui]