dofile( "data/scripts/lib/utilities.lua" )

local entity_id    = GetUpdatedEntityID()
local pos_x, pos_y = EntityGetTransform( entity_id )

SetRandomSeed(pos_x + GameGetFrameNum(), pos_y + GameGetFrameNum())


local angle = math.rad(Random(0,359))
local length = 500

local vel_x = math.cos( angle ) * length
local vel_y = 0 - math.sin( angle ) * length



EntityInflictDamage( entity_id, 0.025, "projectile", "swarmed", "", 0, 0, entity_id, pos_x, pos_y, 10)

shoot_projectile( entity_id, "mods/spellbound_bundle/files/entities/projectiles/insect_cloak_ray.xml", pos_x, pos_y, vel_x, vel_y )



