By just previewing triggers, (I don't use 1.31+ yet)
Why time out is on a custom script and seperated on those configs? for precision?
You might want to include this as the user must configure the number of iterations.
-
Set VariableSet PB_Point = (Position of PB_Unit)
-
Special Effect - Create a special effect at PB_Point using PB_ChannelExpSFX
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_PB_Point)
^You can discard point here and use on unit's origin instead.
(the caster doesn't move unless it's forced to by the way,
you must also consider flying casters to not spawn the effect on ground or else it may look weird.
plus you have no location to deal with this)
-
Set VariableSet PB_AngleDistance = (360.00 / (Real(PB_Splitter[PB_Level[PB_Index]])))
^Can be calculated once on initialization.
-
Trigger - Run PB_FilterTrigger (checking conditions)
^Why filtering is seperated just to make it configurable? you can just directly refer the conditions inside the unit group and make use of boolean config variables instead, it's much faster for the user to configure the filtration this way. Also exclude dead units by default.
I suggest to make a configuration of rate for that spamming caster effect.
Also make use of integers for enabling and disabling triggers instead of count units function per loop.
Overall, the spell concept is pretty much used I think ('channels then boom' mechanic)
the only notable here is the configurations for its spawned effects which is good by the way.