- Joined
- Oct 17, 2009
- Messages
- 1,579
NVM. I've studied my triggers and found out that a couple of them can be combined. I think there will only be three left.
|
I didn't lose my map due to it, I most likely had it on my desktop which I emptied. But there's a chance it's still lurking on my computer somewhere, with a name including "asd", which is not helpfulUnless you get a better naming scheme, you'll fail in a lot of things.
Triggers
DrkC Setup
Events
Map initialization
Conditions
Actions
-------- ======================== --------
-------- D A R K C I R C L E --------
-------- By GywGod133 --------
-------- ======================== --------
-------- Config Periodic Time --------
-------- NOTE: This function helps to get the exact duration --------
Custom script: set udg_DrkC_Loop = 0.03125
Trigger - Add to DrkC Loop Main <gen> the event (Time - Every DrkC_Loop seconds of game time)
Trigger - Add to DrkC Loop Sub <gen> the event (Time - Every DrkC_Loop seconds of game time)
-------- ======================== --------
-------- Config Ability --------
-------- > Ability ID (Main) --------
Set DrkC_Ability = Dark Circle
-------- > Ability ID (Armor Reduce) --------
Set DrkC_ArmorReduce = DrkC_Armor (Press SHIFT + ENTER)
-------- ------------------------------------------------ --------
-------- Config Armor Reduce (Ability) --------
-------- > Max LvL --------
-------- NOTE: This is represent by STACKING NEGATIVE ARMOR in enemy unit --------
-------- Just check it in Object Editor --------
Set DrkC_ArmorReduce_MaxLvl = 10
-------- > Duration --------
Set DrkC_ArmorReduce_Duration[1] = 5.00
Set DrkC_ArmorReduce_Duration[2] = 5.00
Set DrkC_ArmorReduce_Duration[3] = 5.00
Set DrkC_ArmorReduce_Duration[4] = 5.00
-------- ------------------------------------------------ --------
-------- > Damage Per Second Min / Max --------
-------- NOTE: Random DPS in Min to Max --------
-------- - Min --------
Set DrkC_DPSMin[1] = 50.00
Set DrkC_DPSMin[2] = 60.00
Set DrkC_DPSMin[3] = 70.00
Set DrkC_DPSMin[4] = 80.00
-------- - Max --------
Set DrkC_DPSMax[1] = 80.00
Set DrkC_DPSMax[2] = 90.00
Set DrkC_DPSMax[3] = 100.00
Set DrkC_DPSMax[4] = 110.00
-------- ------------------------------------------------ --------
-------- > Area of Effect --------
Set DrkC_AoE[1] = 300.00
Set DrkC_AoE[2] = 300.00
Set DrkC_AoE[3] = 300.00
Set DrkC_AoE[4] = 300.00
-------- ------------------------------------------------ --------
-------- > Spell Duration --------
Set DrkC_Duration[1] = 15.00
Set DrkC_Duration[2] = 15.00
Set DrkC_Duration[3] = 15.00
Set DrkC_Duration[4] = 15.00
-------- ------------------------------------------------ --------
-------- > Attack / Damage Type --------
Set DrkC_AttackType = Spells
Set DrkC_DamageType = Normal
-------- ------------------------------------------------ --------
-------- > Special Effect --------
Set DrkC_SFX = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
-------- ------------------------------------------------ --------
-------- > Dummy --------
Set DrkC_DummyTypes[1] = DrkC_Circle (Black)
-------- Randomed Runes --------
Set DrkC_DummyTypes[2] = DrkC_Circle (Red - 1)
Set DrkC_DummyTypes[3] = DrkC_Circle (Red - 2)
Set DrkC_DummyTypes[4] = DrkC_Circle (Red - 3)
Set DrkC_DummyTypes[5] = DrkC_Circle (Red - 4)
Set DrkC_RuneCount = 4
-------- ------------------------------------------------ --------
-------- > Sound --------
Set DrkC_Sound = GateEpicBash <gen>
-------- ------------------------------------------------ --------
-------- > Transparent (Fade) In / Out Speed --------
Set DrkC_TransparentIn_Speed = 5.00
Set DrkC_TransparentOut_Speed = 5.00
-------- ------------------------------------------------ --------
-------- > Visibility Modifier Function --------
Set DrkC_VM_AoE[1] = 400.00
Set DrkC_VM_AoE[2] = 400.00
Set DrkC_VM_AoE[3] = 400.00
Set DrkC_VM_AoE[4] = 400.00
-------- ------------------------------------------------ --------
-------- > Dummy Spin Speed --------
Set DrkC_Spin_CCircle = 2.00
Set DrkC_Spin_CRune = 3.00
-------- ------------------------------------------------ --------
-------- Tree Chopper --------
Set DrkC_TempPoint[1] = (Center of (Playable map area))
Unit - Create 1 Peasant for Neutral Passive at DrkC_TempPoint[1] facing Default building facing degrees
Set DrkC_TreeChopper = (Last created unit)
Custom script: call UnitAddAbilityBJ( 'Aloc', udg_DrkC_TreeChopper )
Unit - Make DrkC_TreeChopper Invulnerable
Unit - Hide DrkC_TreeChopper
Custom script: call RemoveLocation( udg_DrkC_TempPoint[1])
-------- ======================== --------
-------- Reduce Memory --------
Custom script: call DestroyTrigger( GetTriggeringTrigger())
-------- ======================== --------
DrkC Start
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to DrkC_Ability
Actions
-------- ======================== --------
-------- > Turn On Trigger Loop --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Y Equal to 0
Then - Actions
Trigger - Turn on DrkC Loop Main <gen>
Else - Actions
-------- ======================== --------
-------- Indexing Function --------
Set DrkC_Y = (DrkC_Y + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Y Greater than DrkC_Y_maxSize
Then - Actions
Set DrkC_Y_Index[DrkC_Y] = DrkC_Y
Set DrkC_Y_maxSize = DrkC_Y
Else - Actions
Set DrkC_XY_TempInt = DrkC_Y_Index[DrkC_Y]
-------- ======================== --------
-------- Saving Data --------
-------- > Caster --------
Set DrkC_Caster[DrkC_XY_TempInt] = (Triggering unit)
-------- ------------------------------------------------ --------
-------- > Player --------
Set DrkC_Player[DrkC_XY_TempInt] = (Triggering player)
-------- ------------------------------------------------ --------
-------- > Current Level of Ability --------
Set DrkC_Level[DrkC_XY_TempInt] = (Level of DrkC_Ability for DrkC_Caster[DrkC_XY_TempInt])
-------- ------------------------------------------------ --------
-------- > Spell Duration Function --------
Set DrkC_Duration_Real[DrkC_XY_TempInt] = DrkC_Duration[DrkC_Level[DrkC_XY_TempInt]]
-------- ------------------------------------------------ --------
-------- > Per Sec Function --------
Set DrkC_PerSec[DrkC_XY_TempInt] = 0.00
-------- ------------------------------------------------ --------
-------- DPS --------
Set DrkC_DPS_Real[DrkC_XY_TempInt] = (Random real number between DrkC_DPSMin[DrkC_Level[DrkC_XY_TempInt]] and DrkC_DPSMax[DrkC_Level[DrkC_XY_TempInt]])
-------- ------------------------------------------------ --------
-------- > Create Dark Circle in Targeted Point --------
-------- Create Black Circle --------
Set DrkC_TempPoint[1] = (Target point of ability being cast)
Unit - Create 1 DrkC_DummyTypes[1] for Neutral Passive at DrkC_TempPoint[1] facing (Random angle) degrees
Set DrkC_CCircle[DrkC_XY_TempInt] = (Last created unit)
Unit - Add Crow Form to DrkC_CCircle[DrkC_XY_TempInt]
Unit - Remove Crow Form from DrkC_CCircle[DrkC_XY_TempInt]
-------- Create Randomed Rune --------
Set DrkC_TempPoint[2] = (Target point of ability being cast)
Unit - Create 1 DrkC_DummyTypes[(Random integer number between 2 and (DrkC_RuneCount + 1))] for Neutral Passive at DrkC_TempPoint[2] facing (Random angle) degrees
Set DrkC_CRune[DrkC_XY_TempInt] = (Last created unit)
Unit - Add Crow Form to DrkC_CRune[DrkC_XY_TempInt]
Unit - Remove Crow Form from DrkC_CRune[DrkC_XY_TempInt]
-------- Create Sound --------
Set DrkC_TempPoint[3] = (Target point of ability being cast)
Sound - Play DrkC_Sound at 100.00% volume, located at DrkC_TempPoint[3] with Z offset 0.00
-------- ------------------------------------------------ --------
-------- > Transparent Function --------
Set DrkC_Boolean_TransparentOut[DrkC_XY_TempInt] = True
Set DrkC_Boolean_TransparentIn[DrkC_XY_TempInt] = True
Set DrkC_Transparent[DrkC_XY_TempInt] = 100.00
Animation - Change DrkC_CCircle[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
Animation - Change DrkC_CRune[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
-------- ------------------------------------------------ --------
-------- > Visibility Modifier --------
Set DrkC_TempPoint[4] = (Target point of ability being cast)
Visibility - Create an initially Enabled visibility modifier for DrkC_Player[DrkC_XY_TempInt] emitting Visibility from DrkC_TempPoint[4] to a radius of DrkC_VM_AoE[DrkC_Level[DrkC_XY_TempInt]]
Set DrkC_VisibilityModifier[DrkC_XY_TempInt] = (Last created visibility modifier)
-------- ======================== --------
-------- Remove Leak/s --------
Custom script: call RemoveLocation( udg_DrkC_TempPoint[1])
Custom script: call RemoveLocation( udg_DrkC_TempPoint[2])
Custom script: call RemoveLocation( udg_DrkC_TempPoint[3])
Custom script: call RemoveLocation( udg_DrkC_TempPoint[4])
-------- ======================== --------
DrkC Loop Main
Events
Conditions
Actions
-------- ======================== -------- ======================== --------
-------- PLEASE DO NOT MODIFY UNLESS YOU KNOW WHAT YOU ARE DOING!! --------
-------- ======================== -------- ======================== --------
For each (Integer DrkC_X) from 1 to DrkC_Y, do (Actions)
Loop - Actions
Set DrkC_XY_TempInt = DrkC_Y_Index[DrkC_X]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Boolean_TransparentOut[DrkC_XY_TempInt] Equal to False
Then - Actions
-------- ======================== --------
-------- Destroy those handle --------
Visibility - Destroy DrkC_VisibilityModifier[DrkC_XY_TempInt]
Unit - Remove DrkC_CCircle[DrkC_XY_TempInt] from the game
Unit - Remove DrkC_CRune[DrkC_XY_TempInt] from the game
-------- ======================== --------
-------- RecycleIndex --------
Set DrkC_Duration_Real[DrkC_XY_TempInt] = 0.00
Set DrkC_PerSec[DrkC_XY_TempInt] = 0.00
Set DrkC_CCircle[DrkC_XY_TempInt] = No unit
Set DrkC_CRune[DrkC_XY_TempInt] = No unit
Set DrkC_Y_Index[DrkC_X] = DrkC_Y_Index[DrkC_Y]
Set DrkC_Y_Index[DrkC_Y] = DrkC_XY_TempInt
Set DrkC_X = (DrkC_X - 1)
Set DrkC_Y = (DrkC_Y - 1)
-------- > When the value of Y is 0, you must turn off this Trigger --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Y Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
Else - Actions
-------- ======================== --------
-------- When the Dark Circle Summoned --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Boolean_TransparentIn[DrkC_XY_TempInt] Equal to True
Then - Actions
-------- ======================== --------
-------- Transparent Function --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Transparent[DrkC_XY_TempInt] Less than or equal to 0.00
Then - Actions
Set DrkC_Boolean_TransparentIn[DrkC_XY_TempInt] = False
Animation - Change DrkC_CCircle[DrkC_XY_TempInt]'s vertex coloring to (0.00%, 0.00%, 0.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
Else - Actions
Set DrkC_Transparent[DrkC_XY_TempInt] = (DrkC_Transparent[DrkC_XY_TempInt] - DrkC_TransparentIn_Speed)
Animation - Change DrkC_CCircle[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
Animation - Change DrkC_CRune[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
-------- ======================== --------
Else - Actions
-------- ======================== --------
-------- When the SPELL DURATION reach -0.000 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Boolean_TransparentOut[DrkC_XY_TempInt] Equal to True
DrkC_Duration_Real[DrkC_XY_TempInt] Less than or equal to 0.00
Then - Actions
-------- ======================== --------
-------- Transparent Function --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Transparent[DrkC_XY_TempInt] Greater than or equal to 100.00
Then - Actions
Set DrkC_Boolean_TransparentOut[DrkC_XY_TempInt] = False
Else - Actions
Set DrkC_Transparent[DrkC_XY_TempInt] = (DrkC_Transparent[DrkC_XY_TempInt] + DrkC_TransparentOut_Speed)
Animation - Change DrkC_CCircle[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
Animation - Change DrkC_CRune[DrkC_XY_TempInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with DrkC_Transparent[DrkC_XY_TempInt]% transparency
-------- ======================== --------
Else - Actions
-------- ======================== --------
-------- Spell Duration Function --------
Set DrkC_Duration_Real[DrkC_XY_TempInt] = (DrkC_Duration_Real[DrkC_XY_TempInt] - DrkC_Loop)
-------- ======================== --------
-------- Damage Per Sec Function --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_PerSec[DrkC_XY_TempInt] Less than or equal to 0.00
Then - Actions
-------- ------------------------------------------------ --------
-------- > Unit Group --------
Set DrkC_UnitGroup[DrkC_XY_TempInt] = (Units within DrkC_AoE[DrkC_Level[DrkC_XY_TempInt]] of (Position of DrkC_CCircle[DrkC_XY_TempInt]))
Unit Group - Pick every unit in DrkC_UnitGroup[DrkC_XY_TempInt] and do (Actions)
Loop - Actions
Set DrkC_TempUnit[1] = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DrkC_TempUnit[1] is alive) Equal to True
(DrkC_TempUnit[1] is Magic Immune) Equal to False
(DrkC_TempUnit[1] belongs to an enemy of DrkC_Player[DrkC_XY_TempInt]) Equal to True
Then - Actions
Set DrkC_TempPoint[1] = (Position of DrkC_TempUnit[1])
-------- > SFX --------
Special Effect - Create a special effect at DrkC_TempPoint[1] using DrkC_SFX
Special Effect - Destroy (Last created special effect)
-------- > Do Damage --------
Unit - Cause DrkC_Caster[DrkC_XY_TempInt] to damage DrkC_TempUnit[1], dealing DrkC_DPS_Real[DrkC_XY_TempInt] damage of attack type DrkC_AttackType and damage type DrkC_DamageType
-------- > Armor Reduce --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DrkC_TempUnit[1] is in DrkC_ArmorReduce_UnitGroup) Equal to False
Then - Actions
-------- ======================== --------
-------- > Turn On Trigger Loop --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Yr Equal to 0
Then - Actions
Trigger - Turn on DrkC Loop Sub <gen>
Else - Actions
-------- ======================== --------
-------- Indexing Function --------
Set DrkC_Yr = (DrkC_Yr + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Yr Greater than DrkC_Yr_maxSize
Then - Actions
Set DrkC_Yr_Index[DrkC_Yr] = DrkC_Yr
Set DrkC_Yr_maxSize = DrkC_Yr
Else - Actions
Set DrkC_XYr_TempInt = DrkC_Yr_Index[DrkC_Yr]
-------- ======================== --------
-------- Save All Data --------
-------- > Save Enemy Unit --------
Set DrkC_rUnit[DrkC_XYr_TempInt] = DrkC_TempUnit[1]
-------- > Save Armor Reduce Duration --------
Set DrkC_rDuration_Real[DrkC_XYr_TempInt] = DrkC_ArmorReduce_Duration[DrkC_Level[DrkC_XY_TempInt]]
-------- ======================== --------
-------- > Add Armor Reduce in saved unit --------
Unit - Add DrkC_ArmorReduce to DrkC_rUnit[DrkC_XYr_TempInt]
-------- > Add the saved unit in Unit Group --------
Unit Group - Add DrkC_rUnit[DrkC_XYr_TempInt] to DrkC_ArmorReduce_UnitGroup
-------- ======================== --------
Else - Actions
-------- ======================== --------
-------- When the unit stay in Dark Circle, his armor decreases until the Dark Circle disappear --------
-------- So, longer stay in Dark Circle, more armor decreases --------
For each (Integer DrkC_Xr) from 1 to DrkC_Yr, do (Actions)
Loop - Actions
Set DrkC_XYr_TempInt = DrkC_Yr_Index[DrkC_Xr]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_rUnit[DrkC_XYr_TempInt] Equal to DrkC_TempUnit[1]
(DrkC_rUnit[DrkC_XYr_TempInt] is in DrkC_ArmorReduce_UnitGroup) Equal to True
(Level of DrkC_ArmorReduce for DrkC_rUnit[DrkC_XYr_TempInt]) Not equal to DrkC_ArmorReduce_MaxLvl
Then - Actions
Unit - Set level of DrkC_ArmorReduce for DrkC_rUnit[DrkC_XYr_TempInt] to ((Level of DrkC_ArmorReduce for DrkC_rUnit[DrkC_XYr_TempInt]) + 1)
Else - Actions
-------- ======================== --------
-------- ======================== --------
-------- Remove Leak/s --------
Custom script: call RemoveLocation( udg_DrkC_TempPoint[1])
-------- ======================== --------
Else - Actions
-------- ------------------------------------------------ --------
-------- > Refill --------
Set DrkC_PerSec[DrkC_XY_TempInt] = 1.00
-------- ======================== --------
-------- Remove Leak/s --------
Custom script: call DestroyGroup( udg_DrkC_UnitGroup[ udg_DrkC_XY_TempInt])
-------- ======================== --------
Else - Actions
-------- ------------------------------------------------ --------
-------- > Duration Function --------
Set DrkC_PerSec[DrkC_XY_TempInt] = (DrkC_PerSec[DrkC_XY_TempInt] - DrkC_Loop)
-------- ------------------------------------------------ --------
-------- ======================== --------
-------- Dummy Spin Function --------
-------- > Dont Spin the CCircle in Trans In and Trans Out --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Duration_Real[DrkC_XY_TempInt] Greater than 0.00
DrkC_Boolean_TransparentIn[DrkC_XY_TempInt] Equal to False
Then - Actions
-------- Tree Chop A --------
Set DrkC_TempPoint[2] = (Position of DrkC_CCircle[DrkC_XY_TempInt])
Unit - Make DrkC_CCircle[DrkC_XY_TempInt] face ((Facing of DrkC_CCircle[DrkC_XY_TempInt]) + DrkC_Spin_CCircle) over 0.00 seconds
Destructible - Pick every destructible within DrkC_AoE[DrkC_Level[DrkC_XY_TempInt]] of DrkC_TempPoint[2] and do (Actions)
Loop - Actions
Set DrkC_TempDest[1] = (Picked destructible)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DrkC_TempDest[1] is alive) Equal to True
(DrkC_TempDest[1] is invulnerable) Equal to False
Then - Actions
Unit - Unhide DrkC_TreeChopper
Unit - Order DrkC_TreeChopper to Harvest DrkC_TempDest[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of DrkC_TreeChopper) Equal to (Order(harvest))
Then - Actions
Destructible - Kill DrkC_TempDest[1]
Else - Actions
Unit - Order DrkC_TreeChopper to Stop
Unit - Hide DrkC_TreeChopper
Else - Actions
Custom script: call RemoveLocation( udg_DrkC_TempPoint[2])
Else - Actions
-------- > The CRune spin always until the SPELL DURATION reach -0.000 --------
Unit - Make DrkC_CRune[DrkC_XY_TempInt] face ((Facing of DrkC_CRune[DrkC_XY_TempInt]) - DrkC_Spin_CRune) over 0.00 seconds
-------- ======================== --------
DrkC Loop Sub
Events
Conditions
Actions
-------- ======================== -------- ======================== --------
-------- PLEASE DO NOT MODIFY UNLESS YOU KNOW WHAT YOU ARE DOING!! --------
-------- ======================== -------- ======================== --------
For each (Integer DrkC_Xr) from 1 to DrkC_Yr, do (Actions)
Loop - Actions
Set DrkC_XYr_TempInt = DrkC_Yr_Index[DrkC_Xr]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
DrkC_rDuration_Real[DrkC_XYr_TempInt] Less than or equal to 0.00
(DrkC_rUnit[DrkC_XYr_TempInt] is dead) Equal to True
Then - Actions
-------- ======================== --------
-------- Destroy those Handle --------
Unit Group - Remove DrkC_rUnit[DrkC_XYr_TempInt] from DrkC_ArmorReduce_UnitGroup
Unit - Remove DrkC_ArmorReduce from DrkC_rUnit[DrkC_XYr_TempInt]
-------- ======================== --------
-------- RecycleIndex --------
Set DrkC_rDuration_Real[DrkC_XYr_TempInt] = 0.00
Set DrkC_rUnit[DrkC_XYr_TempInt] = No unit
Set DrkC_Yr_Index[DrkC_Xr] = DrkC_Yr_Index[DrkC_Yr]
Set DrkC_Yr_Index[DrkC_Yr] = DrkC_XYr_TempInt
Set DrkC_Xr = (DrkC_Xr - 1)
Set DrkC_Yr = (DrkC_Yr - 1)
-------- > When the value of Yr is 0, you must turn off this Trigger --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DrkC_Yr Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Skip remaining actions
Else - Actions
Else - Actions
-------- ======================== --------
-------- Duration Function --------
Set DrkC_rDuration_Real[DrkC_XYr_TempInt] = (DrkC_rDuration_Real[DrkC_XYr_TempInt] - DrkC_Loop)
-------- ======================== --------
Changelog
- Add Negative Armor
- Add Tree Chopper (Destroy Trees)
- Fixed Tooltip
0.03125 doesn't really differ from 0.03. He should rather use 0.031250000 to achieve better accurancy.
0.03125000
and.03125
?Oh :O then I've been lied to! Nah I've always used 0.03125that is misleading. Thigs are synchronized even when 0.03125 is used
My GUI spell (uploaded -12, uses 0.03) did not get any feedback regarding whether I should use different loop, GUI doesn't support third decimal so I won't go alien and use custom script just to declare an interval lol xD I didn't know GUIers have to do that nowadays..I'd rather not go nerd and use 0.03.![]()
Holy Deliverance Aura
Nearby units gain bonus regeneration. Every few seconds, a unit is healed while nearby units receive 25% of such healing. The cooldown is lessened by 0.25 for each instance of damage dealt within the aura's area between an ally and an enemy of the hero.
Every 4 heals done have 50% more efficiency, and also decrease damage taken by 200% for 3 seconds for the healed unit. Activate to immediately heal a unit.
Statistics
Area of Effect: 750
Cooldown: 10/9/8
Heal Amount: 75/100/125 + 200% Int
Heal Cooldown: 7/6/5
Heal Splash Radius: 200/250/300
Regeneration: 1.25/1.5/1.75 + 0.5 per 10% missing health)
Credits
- looking_for_help (Damage Event)
- Blizzard Entertainment (Icon)
The Holy Deliverance Aura itself is a material change from the Thorns Aura.
The active model is my Holy Restoration.
//////////////////////////////////////////////////////////////////////////////
// _ _ __ _ //
// | |_| || _\ /_\ //
// | _ |||_))/ _ \ //
// |_| |_||__//_/ \_\ //
// //
// Holy Deliverance Aura v 1.4 //
// by CakeMaster //
// //
//////////////////////////////////////////////////////////////////////////////
function HD_RadarCondition takes nothing returns boolean
return GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.405 and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) != GetUnitState(GetFilterUnit(), UNIT_STATE_MAX_LIFE) and IsUnitAlly(GetFilterUnit(), udg_HD_Player[udg_A]) == true
endfunction
function HD_Setup takes nothing returns boolean
//On init
local integer i = -1
loop
set i = i + 1
exitwhen i == 15
call SetPlayerAbilityAvailable(Player(i), 'A002', false)
endloop
set udg_HD_Dummy = CreateUnit(Player(0), udg_Config_HD_DummyID, 0., 0., 0.)
call UnitAddAbility(udg_HD_Dummy, udg_Config_HD_SalvationDummy)
return false
endfunction
function HD_LearnedCache takes nothing returns boolean
local integer i = 0
local integer c = 0
local unit u = GetTriggerUnit()
//After a hero learns, cache his data
if GetLearnedSkill() == udg_Config_HD_Ability then
loop
set i = i + 1
exitwhen i > udg_HD_Index
if udg_HD_Caster[udg_A] == u then
set udg_HD_Level[udg_A] = udg_HD_Level[udg_A] + 1
else
set c = c + 1
endif
endloop
if c == udg_HD_Index then
set udg_HD_Index = (udg_HD_Index + 1)
set udg_HD_Caster[udg_HD_Index] = u
set udg_HD_Group[udg_HD_Index] = CreateGroup()
set udg_HD_HealCD[udg_HD_Index] = 0.
set udg_HD_HealCounter[udg_HD_Index] = 0
set udg_HD_Player[udg_HD_Index] = GetOwningPlayer(udg_HD_Caster[udg_HD_Index])
set udg_HD_Level[udg_HD_Index] = 1
//Adds the buffer aura
call UnitAddAbility(udg_HD_Caster[udg_HD_Index], udg_Config_HD_SpellBook)
if udg_HD_Index == 1 then
call EnableTrigger(gg_trg_Deliverance_Aura)
endif
endif
endif
set u = null
return false
endfunction
function HD_Detect takes nothing returns boolean
local integer a = 0
//Buff check for Salvation (invul + deflect)
//If a unit already has the buff, it does not prevent from further dummy casts
if GetUnitAbilityLevel(udg_target, 'B001') > 0 then
call DestroyEffect(AddSpecialEffect(udg_Config_HD_SalvationReverseFx, GetUnitX(udg_target), GetUnitY(udg_target)))
call SetUnitState(udg_target, UNIT_STATE_LIFE, (GetUnitState(udg_target, UNIT_STATE_LIFE) + udg_amount))
set udg_amount = 0.
endif
//Buff Application
loop
set a = a + 1
exitwhen a > udg_HD_Index
//Heal CD Reduction
if IsUnitInGroup(udg_target, udg_HD_Group[a]) == true then
set udg_HD_HealCD[a] = udg_HD_HealCD[a] - udg_Config_HD_HealCDRed[udg_HD_Level[udg_A]]
endif
if IsUnitInGroup(udg_source, udg_HD_Group[a]) == true then
set udg_HD_HealCD[a] = udg_HD_HealCD[a] - udg_Config_HD_HealCDRed[udg_HD_Level[udg_A]]
endif
endloop
return false
endfunction
function HD_OnCast takes nothing returns boolean
local group g
local real real1 = 0
local real x
local real y
local unit u = GetTriggerUnit()
local unit u2
if GetSpellAbilityId() == udg_Config_HD_Ability then
set udg_A = 0
loop
set udg_A = udg_A + 1
exitwhen udg_A > udg_HD_Index
if udg_HD_Caster[udg_A] == u then
set u2 = GetSpellTargetUnit()
set x = GetUnitX(u2)
set y = GetUnitY(u2)
set real1 = udg_Config_HD_HealBase[udg_HD_Level[udg_A]] + (I2R(GetHeroInt(u, true)) * udg_Config_HD_HealScale[udg_HD_Level[udg_A]])
//Salvation
if udg_HD_HealCounter[udg_A] < udg_Config_HD_SalvationCounter[udg_HD_Level[udg_A]] then
set udg_HD_HealCounter[udg_A] = udg_HD_HealCounter[udg_A] + 1
call DestroyEffect(AddSpecialEffect(udg_Config_HD_HealFx, x, y))
else
set udg_HD_HealCounter[udg_A] = 0
set real1 = real1 * (1. + udg_Config_HD_SalvationBonus[udg_HD_Level[udg_A]])
call SetUnitOwner(udg_HD_Dummy, GetOwningPlayer(udg_HD_Caster[udg_A]), false)
call IssueTargetOrder(udg_HD_Dummy, "bloodlust", u2)
endif
//Heal
call SetUnitState(u2, UNIT_STATE_LIFE, (GetUnitState(u2, UNIT_STATE_LIFE) + real1))
set real1 = real1 * udg_Config_HD_HealSplash[udg_HD_Level[udg_A]]
set g = CreateGroup()
call GroupEnumUnitsInRange(g, x, y, udg_Config_HD_HealArea[udg_HD_Level[udg_A]], Condition(function HD_RadarCondition))
//Area Heal
loop
set u2 = FirstOfGroup(g)
exitwhen u2 == null
call SetUnitState(u2, UNIT_STATE_LIFE, (GetUnitState(u2, UNIT_STATE_LIFE) + real1))
call GroupRemoveUnit(g, u2)
endloop
call DestroyGroup(g)
endif
endloop
endif
set g = null
set u = null
return false
endfunction
function Holy_Deliverance takes nothing returns boolean
local real x
local real y
local group g
local group g2
local unit u
local real tx
local real ty
local real real1
local real real2
local real real3 = 0.
local real real4 = 0.
local real real5 = 0.
local unit u2
set udg_A = 0
loop
set udg_A = udg_A + 1
exitwhen udg_A > udg_HD_Index
if GetUnitState(udg_HD_Caster[udg_A], UNIT_STATE_LIFE) > 0.405 then
set x = GetUnitX(udg_HD_Caster[udg_A])
set y = GetUnitY(udg_HD_Caster[udg_A])
//Reduce Cooldown
if udg_HD_HealCD[udg_A] > 0. then
set udg_HD_HealCD[udg_A] = udg_HD_HealCD[udg_A] - udg_Config_HD_Rate
else
set udg_HD_HealCD[udg_A] = 0.
endif
//Group Enumeration
call GroupClear(udg_HD_Group[udg_A])
call GroupEnumUnitsInRange(udg_HD_Group[udg_A], x, y, udg_Config_HD_Range[udg_HD_Level[udg_A]], Condition(function HD_RadarCondition))
set g = CreateGroup()
call GroupEnumUnitsInRange(g, x, y, udg_Config_HD_Range[udg_HD_Level[udg_A]], Condition(function HD_RadarCondition))
set u2 = null
set real1 = 0. //Lowest Percentage Checker
set real2 = 100. //Record Tracker
//Check for units to heal
loop
set u = FirstOfGroup(g)
exitwhen u == null
//====================
//Regen
set real3 = GetUnitState(u, UNIT_STATE_LIFE)
set real4 = GetUnitState(u, UNIT_STATE_MAX_LIFE)
set real5 = ((((real4 - real3) / real4) * 100.) * udg_Config_HD_Regeneration[udg_HD_Level[udg_A]]) + udg_Config_HD_RegenBase[udg_HD_Level[udg_A]]
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) + real5))
//====================
//Lowest health% unit
set real1 = (real3 / real4) * 100.0
//Hero priority
if IsUnitType(u, UNIT_TYPE_HERO) == true then
set real1 = real1 - 5.
endif
if real1 < real2 then
set real2 = real1
set real1 = real2
set u2 = u
endif
call GroupRemoveUnit(g, u)
endloop
//Radar Checks
if u2 == null then
call GroupClear(udg_HD_Group[udg_A])
//Group is only used for CD Reduction
else
if udg_HD_HealCD[udg_A] == 0. then
set udg_HD_HealCD[udg_A] = udg_Config_HD_HealCD[udg_HD_Level[udg_A]]
set tx = GetUnitX(u2)
set ty = GetUnitY(u2)
set real1 = udg_Config_HD_HealBase[udg_HD_Level[udg_A]] + (I2R(GetHeroInt(udg_HD_Caster[udg_A], true)) * udg_Config_HD_HealScale[udg_HD_Level[udg_A]])
//Salvation
if udg_HD_HealCounter[udg_A] < udg_Config_HD_SalvationCounter[udg_HD_Level[udg_A]] then
set udg_HD_HealCounter[udg_A] = udg_HD_HealCounter[udg_A] + 1
call DestroyEffect(AddSpecialEffect(udg_Config_HD_HealFx, tx,ty))
else
set udg_HD_HealCounter[udg_A] = 0
set real1 = real1 * (1. + udg_Config_HD_SalvationBonus[udg_HD_Level[udg_A]])
call SetUnitOwner(udg_HD_Dummy, GetOwningPlayer(udg_HD_Caster[udg_A]), false)
call IssueTargetOrder(udg_HD_Dummy, "bloodlust", u2)
endif
//Heal
call SetUnitState(u2, UNIT_STATE_LIFE, (GetUnitState(u2, UNIT_STATE_LIFE) + real1))
set real1 = real1 * udg_Config_HD_HealSplash[udg_HD_Level[udg_A]]
set g2 = CreateGroup()
call GroupEnumUnitsInRange(g2, tx, ty, udg_Config_HD_HealArea[udg_HD_Level[udg_A]], Condition(function HD_RadarCondition))
//Area Heal
loop
set u = FirstOfGroup(g2)
exitwhen u == null
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) + real1))
call GroupRemoveUnit(g2, u)
endloop
endif
endif
call DestroyGroup(g)
call DestroyGroup(g2)
else
call GroupClear(udg_HD_Group[udg_A])
endif
endloop
set g = null
set g2 = null
set u = null
return false
endfunction
//===========================================================================
function InitTrig_Deliverance_Aura takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t, Condition(function HD_LearnedCache))
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function HD_OnCast))
set t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 0., false)
call TriggerAddCondition(t, Condition(function HD_Setup))
set t = CreateTrigger()
call TriggerRegisterVariableEvent(t, "udg_damageEventTrigger", EQUAL, 1.)
call TriggerAddCondition(t, Condition(function HD_Detect))
set t = null
set gg_trg_Deliverance_Aura = CreateTrigger()
call DisableTrigger(gg_trg_Deliverance_Aura)
call TriggerAddCondition(gg_trg_Deliverance_Aura, Condition(function Holy_Deliverance))
endfunction
Changes said:1.4 - Uploaded
QFT.I need to just sit down, and finish this stupid aura. Man is it requiring more side systems than I thought.