[trigger="Armageddon Effect"]
Armageddon Effect
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Armageddon (Timer)
Then - Actions
-------- ------------------------ --------
-------- sets the caster of the ability armageddon --------
-------- ------------------------ --------
Set Armg_Caster = (Load (Key caster) of (Key (Triggering unit)) in Armg_Hashtable)
-------- ------------------------ --------
-------- Landing Area --------
-------- ------------------------ --------
Set Armg_ArmageddonLandPoint = (Load (Key landpoint) of (Key (Triggering unit)) in Armg_Hashtable)
-------- ------------------------ --------
-------- Player owns the Armg_Caster --------
-------- ------------------------ --------
Set Armg_Player = (Owner of Armg_Caster)
-------- ------------------------ --------
-------- Creates Meteor (Special Effect) --------
-------- ------------------------ --------
Unit - Create 1 Armageddon for Armg_Player at Armg_ArmageddonLandPoint facing Default building facing degrees
Set Armg_Meteor = (Last created unit)
-------- ==the span of this unit is 1 second, to fully animate the animation to the meteor itself.== --------
Unit - Add a 1.00 second Generic expiration timer to Armg_Meteor
-------- ------------------------ --------
-------- Randoms the color of the Meteor --------
-------- ------------------------ --------
Set Armg_ColorR = (Integer((Random real number between 0.00 and 100.00)))
Set Armg_ColorG = (Integer((Random real number between 0.00 and 100.00)))
Set Armg_ColorB = (Integer((Random real number between 0.00 and 100.00)))
Animation - Change Armg_Meteor's vertex coloring to ((Real(Armg_ColorR))%, (Real(Armg_ColorG))%, (Real(Armg_ColorB))%) with 0.00% transparency
-------- ------------------------ --------
-------- Delay to Damage Enemies --------
-------- ------------------------ --------
-------- === creates a dummy again, (safe trigger) --------
Unit - Create 1 Armageddon (Delay) for Armg_Player at Armg_ArmageddonLandPoint facing Default building facing degrees
-------- === adjusts the second on when it is going to land === --------
Unit - Add a Armg_Delay second Generic expiration timer to (Last created unit)
-------- === stores variables again for the next trigger === --------
Hashtable - Save Handle OfArmg_Caster as (Key caster) of (Key (Last created unit)) in Armg_Hashtable
Hashtable - Save Handle OfArmg_ArmageddonLandPoint as (Key landpoint) of (Key (Last created unit)) in Armg_Hashtable
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Armageddon (Delay)
Then - Actions
-------- --------------------- --------
-------- sets the caster of the ability Armageddon --------
-------- --------------------- --------
Set Armg_Caster = (Load (Key caster) of (Key (Triggering unit)) in Armg_Hashtable)
-------- --------------------- --------
-------- Landing Point --------
-------- --------------------- --------
Set Armg_ArmageddonLandPoint = (Load (Key landpoint) of (Key (Triggering unit)) in Armg_Hashtable)
-------- --------------------- --------
-------- Terrain Deform --------
-------- --------------------- --------
Environment - Create a Armg_ReformTerrain second Depression ripple deformation at Armg_ArmageddonLandPoint with starting radius Armg_AreaofEffect, ending radius Armg_AreaofEffect, and depth Armg_TerrainDepth, using 1.00 second ripples spaced (Armg_AreaofEffect / 2.00) apart
-------- --------------------- --------
-------- Special Effect --------
-------- --------------------- --------
Special Effect - Create a special effect at Armg_ArmageddonLandPoint using Armg_Effects
Special Effect - Destroy (Last created special effect)
-------- --------------------- --------
-------- Damage --------
-------- --------------------- --------
Set Armg_TempGroup = (Units within Armg_MeteorAreaofEffect of Armg_ArmageddonLandPoint matching ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Armg_Caster)) Equal to True))
Unit Group - Pick every unit in Armg_TempGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Armageddon for Armg_Caster) Equal to 1
Then - Actions
Unit - Cause Armg_Caster to damage (Picked unit), dealing Armg_Damage1 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Armageddon for Armg_Caster) Equal to 2
Then - Actions
Unit - Cause Armg_Caster to damage (Picked unit), dealing Armg_Damage2 damage of attack type Spells and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Armageddon for Armg_Caster) Equal to 3
Then - Actions
Unit - Cause Armg_Caster to damage (Picked unit), dealing Armg_Damage3 damage of attack type Spells and damage type Normal
Else - Actions
-------- --------------------- --------
-------- Clean --------
-------- --------------------- --------
Custom script: call DestroyGroup(udg_Armg_TempGroup)
Custom script: call RemoveLocation(udg_Armg_ArmageddonLandPoint)
Custom script: call RemoveLocation(udg_Armg_TargetPoint)
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Armg_Hashtable
Else - Actions
[/trigger]