S
steveROGERS
Guest
GUI: Yes
Leak less: Yes
MUI: No
Import Difficulty: Medium-Low
Units Affected: Enemy, ground, neutral
Target Type: Unit
Chain Reaction- A meltdown occurs inside targeted unit spewing debris to nearby units. Due to the unstable nature of the materials, fragments continue to detonate exposing neighboring units to the pain. Effects based on a percentage per level.
Screenshot:
Note: I used Tinki3’s Spells Test Map Template.
steveROGERS
Leak less: Yes
MUI: No
Import Difficulty: Medium-Low
Units Affected: Enemy, ground, neutral
Target Type: Unit
Chain Reaction- A meltdown occurs inside targeted unit spewing debris to nearby units. Due to the unstable nature of the materials, fragments continue to detonate exposing neighboring units to the pain. Effects based on a percentage per level.
Screenshot:
Note: I used Tinki3’s Spells Test Map Template.
Code:
Chain Reaction
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chain Reaction (Channel)
Actions
-------- Safety --------
Countdown Timer - Pause CR_Timer
Set CR_Continue = 0.00
-------- ----- --------
Set CR_AOE = 500.00
Set CR_TimerInterval = 0.80
Set CR_MaxTargets = 3
Set CR_Damage = 200.00
Set CR_SpecialEffect[1] = Abilities\Spells\Other\Doom\DoomDeath.mdl
Set CR_SpecialEffect[2] = Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Set CR_Caster = (Triggering unit)
Set CR_TargetedUnit = (Target unit of ability being cast)
Set CR_Level = (Level of Chain Reaction (Channel) for CR_Caster)
Set CR_TargetPoint = (Position of CR_TargetedUnit)
Set CR_CasterPoint = (Position of CR_Caster)
Set CR_Group[1] = (Units within CR_AOE of CR_CasterPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of CR_Caster)) Equal to True) and ((Matching unit) Not equa
Custom script: call RemoveLocation (udg_CR_CasterPoint)
Set CR_Group[2] = (Random CR_MaxTargets units from CR_Group[1])
Unit - Cause (Last created unit) to damage CR_TargetedUnit, dealing (CR_Damage + (100.00 x (Real(CR_Level)))) damage of attack type Normal and damage type Normal
Special Effect - Create a special effect at CR_TargetPoint using CR_SpecialEffect[2]
Special Effect - Destroy (Last created special effect)
Unit Group - Pick every unit in CR_Group[2] and do (Actions)
Loop - Actions
Unit - Create 1 Dummy Caster for (Owner of CR_Caster) at CR_TargetPoint facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Chain Reaction (AcidBomb) to (Last created unit)
Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
Unit - Cause (Last created unit) to damage (Picked unit), dealing (CR_Damage + (100.00 x (Real(CR_Level)))) damage of attack type Normal and damage type Normal
Custom script: call RemoveLocation (udg_CR_TargetPoint)
Countdown Timer - Start CR_Timer as a Repeating timer that will expire in CR_TimerInterval seconds
Code:
Chain Reaction Cont
Events
Time - CR_Timer expires
Conditions
Actions
Set CR_Continue = (CR_Continue + (10.00 - (2.00 x ((Real(CR_Level)) - 1.00))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 0.00 and 100.00) Greater than or equal to CR_Continue
Then - Actions
Set CR_Level = (Level of Chain Reaction (Channel) for CR_Caster)
Set CR_NextCaster = (Random unit from CR_Group[2])
Set CR_NextCasterPoint = (Position of CR_NextCaster)
Custom script: call DestroyGroup(udg_CR_Group[1])
Set CR_Group[1] = (Units within CR_AOE of CR_NextCasterPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of CR_Caster)) Equal to True) and ((Matching unit) Not
Custom script: call DestroyGroup(udg_CR_Group[2])
Set CR_Group[2] = (Random CR_MaxTargets units from CR_Group[1])
Unit - Create 1 Dummy Caster for (Owner of CR_Caster) at CR_NextCasterPoint facing Default building facing degrees
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Add Chain Reaction (FoK) to (Last created unit)
Unit - Set level of Chain Reaction (FoK) for (Last created unit) to CR_Level
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Special Effect - Create a special effect at CR_NextCasterPoint using CR_SpecialEffect[2]
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_CR_NextCasterPoint)
Else - Actions
Countdown Timer - Pause CR_Timer
steveROGERS