I decided to comment on JASS enhanced spells towards the technical side, if the idea is good/bad, looks good/bad in game, it doesn't matter for the next comment I wrote at home when reading your triggers:
Meteop
======
- I dislike any spell that pauses a unit, because it seems as if the author didn't know how to handle channeling spells, is that the case?
- I think you know how to get rid of Location memory leaks, but it is untrue that locations and groups are the only things that leak. RectFromLoc creates a rect that has to be removed, it is currently leaking in your script.
- Also it seems that it is used to note when the caster has moved so it halts the spell, It makes me suspect even more that you don't know how to handle channeling spells.
- Uses functions like PauseUnitBJ, DestroyEffectBJ , AddSpecialEffectTargetUnitBJ instead of their native counterparts...
- Memory leaks:
set points[0] = PolarProjectionBJ(points[0], 15.00, angle)
set points[1] = PolarProjectionBJ(points[1], 15.00, (angle + 90))
set points[2] = PolarProjectionBJ(points[2], 15.00, (angle + 180))
set points[3] = PolarProjectionBJ(points[3], 15.00, (angle + 270))
You are never removing the Locations that were originally pointed by points[0],points[1],points[2] and points[3]
I would say that this kind of spells work better with full coordinate usage instead of locations, but if you want to keep using locations, you would need an extra loc variable
set loc=PolarProjectionBJ(points[0], 15.00, angle)
call RemoveLocation(points[0])
set points[0]=loc
set loc=PolarProjectionBJ(points[1], 15.00, angle+90)
call RemoveLocation(points[1])
set points[1]=loc
set loc=PolarProjectionBJ(points[2], 15.00, angle+180)
call RemoveLocation(points[2])
set points[2]=loc
set loc=PolarProjectionBJ(points[3], 15.00, angle+270)
call RemoveLocation(points[3])
set points[3]=loc
- Repetitive code: For example last block of code, could have been replaced with a single loop:
set i=0
loop
exitwhen (i>3)
set loc=PolarProjectionBJ(points[i], 15.00, angle+90*i)
call RemoveLocation(points[i])
set points[i]=loc
set i=i+1
endloop
- Wrong event, altough in this pause unit case it is impossible to abuse it.
How to make channeling spells?
EVENT_PLAYER_UNIT_SPELL_EFFECT fires when the unit spends mana/cooldown
EVENT_PLAYER_UNIT_SPELL_FINISH fires when a unit succesfully finished casted a spell
EVENT_PLAYER_UNIT_SPELL_ENDCAST Fires whenever the unit stops casting a spell, it could have died, get removed, stunned, ordered to do something else or when the duration of the spell ends, this event will fire in that case.