Updated
Improved behavior for onLevel
Changed interface a little to make it easier to do different aura behaviors based on whether it's source, enemy, or ally that's being affected
Tested with immolation and it worked beautifully (test map includes test)
Apparently, warcraft 3 auras work with this now... don't know what happened, maybe the old version was bugged?
edit
too bad I can't lower module size. It's 250 lines per implementation : (.
Oh well
edit
oh yea.. I forgot to mention that you can do some incredible things with this.
you could have an ability with only 2 levels, 1 level to learn and the other level to increase the ability's level. You could store the actual level via JASS o-o. Essentially, you can have an ability with infinite levels while only having 2 levels in the object data.
Pretty cool no?
edit
updated again bah..
fixed effects for dying units
when a unit died and was revived, the buff wasn't re-applied to the unit
buffs are still removed/added like normal. However, if a unit was previously dead and is now alive and no new buff was added/removed, the buff is added. Keep in mind that a buff may be added multiple times now, so if you are doing effects, make sure the effects are null first.
You can still do effects and so on when a unit dies and even apply effects only when a unit dies, you just need to make sure that the effect is null before adding it.