("cf_healing_aura",
[
(store_script_param_1, ":caster", 1),
(store_script_param_2, ":min_heal", 2),
(store_script_param_3, ":max_heal", 3),
(store_script_param_4, ":radius", 4),
(store_script_param_5, ":interval", 5),
(try_for_agents, ":target"),
(store_agent_hit_points,":hp",":target",1), # You can use agent-specific data to control the effect
(agent_is_alive, ":target"),
(agent_is_active, ":target"),
(agent_is_ally, ":target"), # Adjust the troop condition as needed
(agent_get_team, ":targets_team", ":target"),
(agent_get_position, pos1, ":target"),
(get_distance_between_positions, ":distance", pos1, pos2), # Calculate distance to the aura's position
(lt, ":distance", ":radius"), # Adjust this distance for the aura's radius
(try_begin),
(eq, "$aura_interval", 0), # Check if it's time to apply the effect
(play_sound, "snd_heal"), # Add any sound effects
(particle_system_burst, "psys_village_fire_big", pos1, ":radius"), # Adjust particle system and count
(store_agent_hit_points, ":hp", ":target", 1),
(store_random_in_range, ":heal", ":min_heal", ":max_heal"),
(val_sub, ":hp", ":heal"),
(try_begin),
(gt, ":hp", 70),
(try_end),
(agent_deliver_damage_to_agent, ":caster", ":target", ":heal"),
# Add any other effect logic here, like damage or healing
(assign, "$aura_interval", ":interval"), # Set the timer to the specified interval (adjust as needed)
(else_try),
(val_sub, "$caster_aura_interval", 1), # Decrement the timer
(try_end),
(try_end),
]),