I'm going to start off saying the spell works and the MUI part works but I'm curious if there's anything I should watch out for or change. Thanks ahead of time if someone can look at it.
-
Sunbeam Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Sunbeam
-
-
Actions
-
Set VariableSet SunbeamIndex = (SunbeamIndex + 1)
-
Set VariableSet SunbeamCaster[SunbeamIndex] = (Triggering unit)
-
Set VariableSet SunbeamP[SunbeamIndex] = (Target point of ability being cast)
-
Set VariableSet SunbeamTimer[SunbeamIndex] = 7.00
-
-------- HP Regen/DMG --------
-
Set VariableSet SunbeamHealth[SunbeamIndex] = (42.86 x (Real((Level of Sunbeam for SunbeamCaster[SunbeamIndex]))))
-
-------- MP Regen/MP Drain --------
-
Set VariableSet SunbeamMana[SunbeamIndex] = (21.43 x (Real((Level of Sunbeam for SunbeamCaster[SunbeamIndex]))))
-
-------- Hits up to 14x --------
-
Unit - Create 1 AllUnitTypes[0] for (Owner of SunbeamCaster[SunbeamIndex]) at SunbeamP[SunbeamIndex] facing Default building facing degrees
-
Set VariableSet SunbeamDummy[SunbeamIndex] = (Last created unit)
-
Unit - Add Sunbeam Rejuvenation Aura SFX to (Last created unit)
-
Unit - Add Sunbeam Silence to (Last created unit)
-
Special Effect - Create a special effect at SunbeamP[SunbeamIndex] using Sacred Storm.mdx
-
Special Effect - Set Scale of (Last created special effect) to 2.00
-
Special Effect - Play Special Effect: (Last created special effect), Animation: Birth
-
Set VariableSet SunbeamSfx[SunbeamIndex] = (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SunbeamIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Sunbeam Loop <gen>
-
-
Else - Actions
-
-
-
-
Sunbeam Loop
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer SunbeamLoop) from 1 to SunbeamIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SunbeamTimer[SunbeamLoop] Greater than 0.00
-
-
Then - Actions
-
Set VariableSet SunbeamTimer[SunbeamLoop] = (SunbeamTimer[SunbeamLoop] - 0.50)
-
Set VariableSet SunbeamUG[SunbeamLoop] = (Units within 500.00 of SunbeamP[SunbeamLoop] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)).)
-
Unit Group - Pick every unit in SunbeamUG[SunbeamLoop] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) belongs to an enemy of (Owner of SunbeamCaster[SunbeamLoop]).) Equal to True
-
-
Then - Actions
-
Unit - Cause SunbeamCaster[SunbeamLoop] to damage (Picked unit), dealing SunbeamHealth[SunbeamLoop] damage of attack type Spells and damage type Magic
-
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - SunbeamMana[SunbeamLoop])
-
-
Else - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + SunbeamHealth[SunbeamLoop])
-
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + SunbeamMana[SunbeamLoop])
-
-
-
-
-
Unit - Order SunbeamDummy[SunbeamLoop] to Neutral Dark Ranger - Silence SunbeamP[SunbeamLoop]
-
Special Effect - Create a special effect at SunbeamP[SunbeamLoop] using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
-
Special Effect - Set Scale of (Last created special effect) to 6.20
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call DestroyGroup(udg_SunbeamUG[udg_SunbeamLoop])
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SunbeamTimer[SunbeamLoop] Equal to 0.00
-
-
Then - Actions
-
Special Effect - Create a special effect at SunbeamP[SunbeamLoop] using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
-
Special Effect - Set Scale of (Last created special effect) to 3.10
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at SunbeamP[SunbeamLoop] using Explosion.mdx
-
Special Effect - Set Scale of (Last created special effect) to 3.20
-
Special Effect - Destroy (Last created special effect)
-
Unit - Remove SunbeamDummy[SunbeamLoop] from the game
-
Special Effect - Destroy SunbeamSfx[SunbeamLoop]
-
Custom script: call RemoveLocation(udg_SunbeamP[udg_SunbeamLoop])
-
Set VariableSet SunbeamCaster[SunbeamLoop] = SunbeamCaster[SunbeamIndex]
-
Set VariableSet SunbeamP[SunbeamLoop] = SunbeamP[SunbeamIndex]
-
Set VariableSet SunbeamDummy[SunbeamLoop] = SunbeamDummy[SunbeamIndex]
-
Set VariableSet SunbeamSfx[SunbeamLoop] = SunbeamSfx[SunbeamIndex]
-
Set VariableSet SunbeamTimer[SunbeamLoop] = SunbeamTimer[SunbeamIndex]
-
Set VariableSet SunbeamHealth[SunbeamLoop] = SunbeamHealth[SunbeamIndex]
-
Set VariableSet SunbeamMana[SunbeamLoop] = SunbeamMana[SunbeamIndex]
-
Set VariableSet SunbeamUG[SunbeamLoop] = SunbeamUG[SunbeamIndex]
-
Set VariableSet SunbeamIndex = (SunbeamIndex - 1)
-
Set VariableSet SunbeamLoop = (SunbeamLoop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SunbeamIndex Equal to 0
-
-
Then - Actions
-
Custom script: call RemoveLocation(udg_SunbeamP[udg_SunbeamLoop])
-
Custom script: call DestroyGroup(udg_SunbeamUG[udg_SunbeamLoop])
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
-