En mi firma hay un link para un glosario de términos.
https://www.worldofeditors.net/t490-mui-utilidad-para-guiUsando ese sistema para que no se te complique el método de guardado de variables.
En el spell Cast(con evento Unidad inicia efectod e habilidad)
Debes colocar los sets, set_unit[1] = caster, set_unit[2] = unidad objetivo, set_integer[1] = Número de saltos, set_real[1] = Daño causado, set_real[2] = delay entre saltos, set_effect[1] = Efecto especial sobre el caster.
Esas son las variables que necesitas guardar. Luego debes hacer al caster invulnerable y transparente. Seteas la variable automaticClean a true, trigger con el detonador bucle y por último, timeout=0.05
En el detonador Bucle
Primero coloca un if
If get_unit[2] no igual a ninguna unidad entonces
set Punto = Position of get_unit[2]
Move get_unit[1] to Punto
Order get_unit[1] to Atacar get_unit[2]
Cause get_real[1] damage to get_unit[2] from get_unit[1]
set get_unit[2] = Ninguna unidad
custom script: call RemoveLocation(udg_Punto)
Terminar el If
get_real[2]=get_real[2]-0.05
If (A) get_real[2] menor que o igual a 0.00 entonces
set Punto = Position of get_unit[1]
set Grupo = Aquí buscas unidades enemigas alrededor del Punto.
set Unidad = Random unit from Grupo
custom script: call RemoveLocation(udg_Punto)
If Unidad no igual a Ninguna unidad entonces
Aquí haces algo similar a lo que ya hiciste arriba, pero en lugar de usar get_unit[2] usas Unidad
get_integer[1]=get_integer[1]-1
terminar if
terminar if (A)
If get_integer[1] igual a 0 entonces
Set finish = true
Vuelves a tu caster vulnerable y le quitas la transparencia
Terminar if
Parece complicado, pero es sencillo de crear, mañana si puedo, te muestro como sería en el editor para que compares con lo tuyo