//desc:haze lightning bolt for gun/shambler/chton
r_bouncysparks 1
r_part_sparks_trifan 1
r_effect "progs/s_light.mdl" sham_lightning1 0
r_trail "progs/s_light.mdl" sham_lightning2 0

r_part te_lightning1 //Shambler lightning
{	
	die 0
	type beam
	alpha 0.6
	step 5
	scale 1
	scalefactor 0
	rgb 98 98 128
	spawnmode distball
	spawnorg 7
	spawnparam1 0.2
	blend add
	averageout
	nospreadfirst
	assoc te_lightning2b
	lighttime 1
	lightshadows 0
	lightradius 300
	lightrgb    2 2 2
}

r_part sham_lightning2
{
	spawnmode ball
	count 1
	texture "" 
	up 250
	gravity 0
	lighttime 0
	lightshadows 0
	lightradius 500
	lightrgb 1 1 1
}

r_part sham_lightning1
{
	spawnmode ball
	count 200
	spawnorg 300 300
	spawnvel -1000
	friction 0
	texture ""
	type spark
	alpha 0.7
	die 0.2
	diesubrand 0.1
	up 25
	rotationspeed 90
	rotationstart 0 360
	rgb 150 150 250
	rgbrand 100 100 0
	gravity 0
	scalefactor 1
}

r_part +sham_lightning1
{
	spawnmode ball
	count 200
	spawnorg 1 1
	spawnvel 1000
	friction 0
	texture ""
	type texturedspark
	scale 1
	alpha 0.5
	die 0.2
	diesubrand 0.1
	up 25
	rotationspeed 90
	rotationstart 0 360
	rgb 150 150 250
	rgbrand 100 100 0
	gravity 0
	scalefactor 1
}

r_part te_lightning2 //player lightning
{	
	die 0
	type beam
	alpha 0.6
	step 5
	scale 1
	scalefactor 0
	rgb 98 98 128
	spawnmode distball
	spawnorg 7
	spawnparam1 0.2
	blend add
	averageout
	nospreadfirst
	assoc te_lightning2b
	lighttime 0
	lightshadows 0
	lightradius 300
	lightrgb  2 2 2
}

r_part te_lightning3 //Chthon trap lightning
{	
	die 0
	alpha 1
	step 5
	scale 1
	scalefactor 0
	rgb 98 98 128
	spawnmode distball
	spawnorg 7
	spawnparam1 0.2
	blend add
	averageout
	nospreadfirst
	assoc te_lightning2b
	lighttime 0
	lightshadows 1
	lightradius 500
	lightrgb 2 2 2
}

r_part te_lightning2b
{
	texture ""
	count 1
	alpha 0.5
	die 0
	randomvel 88
	veladd 0
	rgb 150 200 255
	rgbdelta 0 -8888 0
	gravity 0
	blend add
	scalefactor 1
	assoc te_lightning2c
	spawnmode tracer
}

r_part te_lightning2c
{
	texture "" #"particles/zing1.png"
	step 15
	alpha 0.6
	scale 1
	#rgb 64 133 255
	rgb 200 222 255
	gravity 0
	blend add
	spawnmode distball
	spawnorg -5 -5
	type beam
	scalefactor 1
	scalerand 2
	assoc te_lightning2d
	spawnparam1 0.2
}

r_part te_lightning2d
{
	texture ""
	step 15
	alpha 0.6
	scale 1
	scalerand 2
	rgb 200 222 255
	gravity 0
	blend add
	spawnmode distball
	spawnorg 5 5
	type beam
	scalefactor 1
	spawnparam1 0.2
}

//(modified from spikeset)

r_part te_lightning1_end 
{
	texture ""
	die 0.3
	alpha 1
	count 2
	scale 0
	rgb 128 128 255
	rgbrand 63 63 0
	rgbrandsync 1
	randomvel 190
	spawnorg 2
	blend add
	gravity 300
	cliptype te_lightning2_end2	
	clipcount 1
	scalefactor 11
	lighttime 0.1
	lightradiusfade 10
	lightshadows 0
	lightradius  100
	lightrgb  1 1 1
}

r_part +te_lightning1_end 
{
	texture "particles/smoke"
	count 4
	scalerand 30
	scale 33
	scalefactor 1
	alpha 0.3
	die 1
	randomvel 11
	veladd 1
	rgb 0 0 0
	gravity -70
	blend modulate
}

r_part te_lightning2_end
{
	texture ""
	die 0.3
	alpha 1
	count 2
	scale 0
	rgb 128 128 255
	rgbrand 63 63 0
	rgbrandsync 1
	randomvel 190
	spawnorg 2
	blend add
	gravity 300
	cliptype te_lightning2_end2	
	clipcount 1
	scalefactor 11
	lighttime 0.1
	lightradiusfade 10
	lightshadows 0
	lightradius  100
	lightrgb  1 1 1
}

r_part +te_lightning2_end //lightning decal
{
	type decal
	texture "particles/explosion"
	count 1
	scale 11
	alpha 0.8
	die 20
	blend invmod
}

r_part +te_lightning2_end 
{
	texture "particles/smoke"
	count	4
	scalerand 30
	scale 33
	scalefactor 1
	alpha 0.3
	die 1
	randomvel 11
	veladd 1
	rgb 0 0 0
	gravity -70
	blend modulate
}

r_part te_lightning2_end2
{
	count 1
	texture ""
	scale 0
	rgb 128 128 255
	rgbrand 63 63 0
	rgbrandsync 1
	alpha 1
	gravity 300
	spawnmode ball
	die 1
	blend add
	randomvel -111
	veladd 0
	scalefactor 1
}
	
r_part shamblerzaps
{	texture ""
	alpha 0.8
	die 0.1
	diesubrand 0.1	
	count 1
	scale 1
	rgb 128 128 255
	rgbrand 63 63 0
	rgbrandsync 1
	spawnorg 100
	spawnmode ball
	spawnvel -400
	blend add
	scalefactor 1
	lighttime 0.1
	lightradiusfade 10
	lightshadows 1
	lightradius  50
	lightrgb  1 1 1
}