ACTOR Blazter : weapon
{
	weapon.ammotype "Bulletgem"
	Weapon.SelectionOrder 2000
	tag "Blazter"
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.ALT_AMMO_OPTIONAL  
	Inventory.PickupMessage "You picked up your gauntlet you somehow dropped, butterfingers."
	-BLOODSPLATTER
	+cheatnotweapon
	+NOAUTOAIM
	+noautofire
	Weapon.YAdjust 0
	weapon.bobstyle smooth
	weapon.bobrangex 0.2
	weapon.bobrangey 0.3
	weapon.bobspeed 1
  
	States
	{
	Spawn:
		RWND K -1
		Stop
	Ready:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("overheat", 1, "overheated")
		GIDL ABCDEF 3 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		Loop
	Deselect:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("overheat",1,"heatdeselect")
		TNT1 A 0 a_takeinventory ("usinggauntlet", 99)
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		GIDL A 1 A_Lower
		Loop
	heatdeselect:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("usinggauntlet", 99)
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		ALTT G 1 A_Lower
		Loop
	Select:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("overheat", 1, "heatselect")
		TNT1 A 0 a_giveinventory ("usinggauntlet", 1)
		GIDL A 0 A_Raise
		GIDL A 0 A_Raise
		GIDL A 0 A_Raise
		GIDL A 1 A_Raise
		Loop
	heatselect:
		TNT1 A 0 a_giveinventory ("usinggauntlet", 1)
		ALTT G 0 A_raise
		ALTT G 0 A_raise
		ALTT G 0 A_raise
		ALTT G 1 A_raise
		loop
	fire:
		TNT1 A 0 
		TNT1 A 0 
		TNT1 A 0 a_jumpifinventory ("hypermode", 1, "hypershot")
		TNT1 A 0 a_jumpifinventory ("hypercharge", 80, "hyperchange")
		TNT1 A 0 a_jumpifinventory ("wavecharge", 30, "waveshot")
		TNT1 A 0 a_jumpifinventory ("wavecharge", 15, "midshot")
		TNT1 A 0 a_jumpifinventory ("wavecharge", 1, "lowshot")
		TNT1 A 0 a_takeinventory ("hypercharge", 99)
		TNT1 A 0 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 A_jumpifinventory ("Bulletgem",1, "bulletshot")
		GIDL A 1
		goto ready
	bulletshot:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("gunparts", 3, "splitshot")
		TNT1 A 0 a_jumpifinventory ("gunparts", 2, "quickdraw")
		GFUP AB 1
		TNT1 A 0 a_takeinventory ("hypercharge", 99)
		TNT1 A 0 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_playsound ("gauntlet/shot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 3, 0, 22)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		GFIR A 1 bright a_firecustommissile("BlazBullet",0,0,9,0)
		GFIR B 1 bright a_weaponready(wrf_nobob|wrf_noswitch|wrf_nofire)
		TNT1 A 0 A_FireCustomMissile("Bulletcasingspawner",0,0,8,3)
		TNT1 A 0 a_jumpifinventory ("gunparts",1,"Fastready")
		GFIR C 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFIR C 2 a_weaponready(wrf_nobob|wrf_noswitch|wrf_nofire)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch|wrf_nofire)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch|wrf_nosecondary)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch|wrf_nosecondary)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch|wrf_nosecondary)
		goto ready
	fastready:
		GFIR C 2 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		goto ready
	quickdraw:
		GFUP B 1
		TNT1 A 0 a_takeinventory ("hypercharge", 99)
		TNT1 A 0 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_playsound ("gauntlet/shot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 3, 0, 22)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		GFIR A 1 bright a_firecustommissile("BlazBullet",0,0,9,0)
		GFIR B 1 bright a_weaponready(wrf_nobob|wrf_noswitch|wrf_nofire)
		TNT1 A 0 A_FireCustomMissile("Bulletcasingspawner",0,0,8,3)
		GFIR C 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		goto ready
	splitshot:
		GFUP B 1
		TNT1 A 0 a_takeinventory ("hypercharge", 99)
		TNT1 A 0 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_playsound ("gauntlet/shot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 3, 0, 22)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		GFIR B 0 a_firecustommissile ("blazbullet",random(-4, 4),0,11,0,0,random(-3,3))
		GFIR A 1 bright a_firecustommissile("BlazBullet",0,0,9,0)
		GFIR B 1 bright a_weaponready(wrf_nobob|wrf_noswitch|wrf_nofire)
		TNT1 A 0 A_FireCustomMissile("Bulletcasingspawner",0,0,8,3)
		GFIR C 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP B 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		GFUP A 1 a_weaponready(wrf_nobob|wrf_noswitch)
		goto ready
	Reload:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("waveparts",1,"wavebulletcheck")
		GIDL ABCDEF 3 a_weaponready (WRF_ALLOWZOOM)
		goto ready
	Wavebulletcheck:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("bulletgem",1,"wavecharge")
		TNT1 A 0 a_playsound ("subweapons/noaltfire",0)
		GIDL ABCDEF 3 a_weaponready (WRF_ALLOWZOOM)
		goto ready
	wavecharge:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("overcharge",99)
		TNT1 A 0 a_playsound ("gauntlet/charge",CHAN_WEAPON)
	lowcharging:
		TNT1 A 0 a_jumpifinventory ("wavecharge", 15, "midcharge")
		LCGH A 2 bright a_weaponready(wrf_noswitch)
		TNT1 A 0 a_giveinventory ("wavecharge", 1)
		LCGH B 2 bright a_weaponready(wrf_noswitch)
		LCGH B 1 bright a_weaponready(wrf_noswitch)
		TNT1 A 0 a_giveinventory ("wavecharge", 1)
		LCGH C 1 bright a_weaponready(wrf_noswitch)
		LCGH C 1 bright a_weaponready(wrf_noswitch)
		TNT1 A 0 a_giveinventory ("wavecharge", 1)
		loop
	midcharge:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gauntlet/charge",CHAN_WEAPON)
		MCGH A 0 a_playsound ("gauntlet/midcharge",0)
	midcharging:
		TNT1 A 0 a_jumpifinventory ("wavecharge", 30, "wavechargeMAX")
		MCGH A 2 bright a_weaponready(wrf_noswitch)
		MCGH B 1 bright a_weaponready(wrf_noswitch)
		MCGH B 1 bright a_weaponready(wrf_noswitch)
		TNT1 A 0 a_giveinventory ("wavecharge", 1)
		MCGH C 1 bright a_weaponready(wrf_noswitch)
		MCGH C 1 bright a_weaponready(wrf_noswitch)
		TNT1 A 0 a_giveinventory ("wavecharge", 1)
		loop

	wavechargeMAX:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gauntlet/fullcharge",0)
		TNT1 A 0 a_playsound ("gauntlet/waveready",CHAN_WEAPON)
	MAXready:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("overcharge", 11, "drain")
		FCGH ABC 2 bright a_weaponready (wrf_noswitch)
		FCGH C 1 bright a_weaponready (wrf_noswitch)
		TNT1 A 0 a_giveinventory ("overcharge",1)
		loop
	chargecancel:
		GIDL A 0 a_takeinventory ("overcharge",99)
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		GIDL A 1 a_takeinventory ("hypercharge",99)
		GIDL A 1 a_takeinventory ("wavecharge",99)
		goto ready
	drain:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("wavecharge",15)
		TNT1 A 0 a_takeinventory ("overcharge",99)
		MCGH A 1 bright
		goto midcharge
	Lowshot:
		TNT1 A 0 
		TNT1 A 0 a_takeinventory ("overcharge",99)
		GFUP AB 2 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		TNT1 A 0 a_playsound ("gauntlet/lowshot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 5, 0, 22)
		TNT1 A 0 a_giveinventory ("subheat",30)
		WFIR A 2 bright a_firecustommissile ("lowchargeshot",0,0,9,0)
		WFIR B 1 bright 
		GFIR D 1 
		TNT1 A 0 a_playsound ("gauntlet/lowshot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 5, 0, 22)
		TNT1 A 0 a_giveinventory ("subheat",30)
		WFIR A 2 bright a_firecustommissile ("lowchargeshot",random(-3, 3),0,11,0,0,random(-2,2))
		WFIR B 1 bright 
		GFIR D 1 
		TNT1 A 0 a_playsound ("gauntlet/lowshot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(1, 5, 0, 22)
		TNT1 A 0 a_giveinventory ("subheat",30)
		WFIR A 2 bright a_firecustommissile ("lowchargeshot",random(-3, 3),0,11,0,0,random(-2,2))
		WFIR B 1 bright 
		GFIR D 1 
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR E 10 A_weaponready 
		GFIR F 2 A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		GFIR G 2 A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto ready
	midshot:
		TNT1 A 0 
		TNT1 A 0 a_takeinventory ("overcharge",99)
		GFUP AB 2 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_playsound ("gauntlet/midshot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 A_Quake(2, 5, 0, 22)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		TNT1 A 0 a_giveinventory ("subheat",250)
		WFIR A 2 bright a_firecustommissile ("midchargeshot",0,0,11,0)
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		WFIR B 1 bright  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		GFIR D 1  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		GFIR E 12 A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		GFIR F 3  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		GFIR G 3 A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto ready
	waveshot:
		TNT1 A 0 
		TNT1 A 0 a_takeinventory ("overcharge",99)
		GFUP AB 2 a_takeinventory ("wavecharge", 99)
		TNT1 A 0 a_playsound ("gauntlet/maxshot",CHAN_WEAPON)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_firecustommissile ("waveshot",-16,0,11,0)
		TNT1 A 0 a_firecustommissile ("waveshot",-8,0,11,0)
		TNT1 A 0 a_firecustommissile ("waveshot",8,0,11,0)
		TNT1 A 0 a_firecustommissile ("waveshot",16,0,11,0)
		TNT1 A 0 A_Quake(4, 10, 0, 22)
		TNT1 A 0 a_takeinventory ("bulletgem",1)
		TNT1 A 0 a_giveinventory ("subheat",300)
		WFIR A 1 bright a_firecustommissile ("straightwave",0,0,11,0)
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		WFIR B 1 bright A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWZOOM)
		GFIR D 1  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWZOOM)
		GFIR E 25  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWZOOM)
		GFIR F 6 A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWZOOM)
		GFIR G 3  A_weaponready (wrf_nosecondary|WRF_NOBOB|WRF_ALLOWZOOM)
		goto ready
	
	Zoom:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("hyperparts",1,"hypercharge")
		GIDL ABCDEF 3 a_weaponready (WRF_ALLOWRELOAD)
		goto ready
	hypercharge:
		HCGH L 1 a_playsound ("gauntlet/hypercharge",CHAN_WEAPON)
	focushyper:
		TNT1 A 0 a_jumpifinventory ("hypercharge", 80, "MAXhyper")
		HCGH A 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH B 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH C 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH D 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH E 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH F 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH G 1 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH H 2 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		HCGH I 2 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_giveinventory ("hypercharge", 1)
		loop
	MAXhyper:
		HCGH J 1 bright a_playsound ("gauntlet/hyperready",CHAN_WEAPON,1,1)
	hyperReady:
		HCGH J 4 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		HCGH K 2 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		HCGH L 2 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		HCGH K 2 bright a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		loop
	hyperchange:
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		GTRA A 0 a_playsound ("gauntlet/powupstart",0)
		GTRA ABCD 1
		GTRA D 0 a_playsound ("gauntlet/powupclang",0)
		TNT1 A 0 a_takeinventory ("hypercharge", 99)
		TNT1 A 0 a_giveinventory ("hypermode", 1)
		TNT1 A 0 a_giveinventory ("hypertimer", 280)
		GTRA EFGH 1 a_weaponready (WRF_NOSWITCH|wrf_nosecondary)
		GTRA I 0 a_playsound ("gauntlet/powupblades",6)
		GTRA I 0 a_playsound ("gauntlet/powupbarrel",0,0.70)
		GTRA N 0 a_playsound ("gauntlet/powupend",0)
		GTRA IJKLMNO 2 bright a_weaponready (WRF_NOSWITCH|wrf_nosecondary)
		GTRA PQRS 2 bright a_weaponready (WRF_NOSWITCH|wrf_nosecondary)
		goto hyperidle
	HyperIdle:
		CIDL A 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		CIDL ABCDE 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		CIDL E 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		CIDL EDCBA 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		TNT1 A 0 a_jumpifinventory ("hypertimer", 1, "hyperIdle")
		goto powerdown
	Hypershot:
		TNT1 A 0
		CIDL A 1 bright a_jumpifinventory ("hypertimer", 1, "firehyper")
		goto powerdown
	firehyper:
		CFUP AB 1 
		TNT1 A 0 a_playsound ("cannon/lilshoot")
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		CAFR A 1 bright a_firecustommissile ("hyperbullet",0,0,12,-5)	
		CAFR B 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		TNT1 A 0 a_refire ("Hypershot") 
		CAFR C 2 a_weaponready (wrf_noswitch|wrf_nosecondary)
		CAFR C 1 a_weaponready (wrf_noswitch|wrf_nosecondary)
		CAFR C 1 a_weaponready (wrf_noswitch|wrf_nosecondary)
		CAFR C 1 a_weaponready (wrf_noswitch|wrf_nosecondary)
		CFUP B 1 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		CFUP A 2 bright a_weaponready (wrf_noswitch|wrf_nosecondary)
		TNT1 A 0 a_jumpifinventory ("hypertimer", 1, "hyperidle")
		goto powerdown
	powerdown:
		TNT1 A 0 a_takeinventory ("hypercharge",999)
		TNT1 A 0 a_playsound ("gauntlet/powdownstart",0)
		TNT1 A 0 a_takeinventory ("hypermode",99)
		GTRA MLK 2 a_takeinventory ("hypercharge",999)
		GTRA K 0 a_playsound ("gauntlet/powdownbarrel",0)
		GTRA JIH 1
		GTRA H 0 a_playsound ("gauntlet/powdownblades",0)
		GTRA H 0 a_playsound ("gauntlet/powdownend",0)
		GTRA GFEDCBA 1
	Shutdown:
		ALTT A 2 a_playsound ("gauntlet/eyeclose",0)
		TNT1 A 0 a_playsound ("gauntlet/steam",0)
		TNT1 A 0 a_giveinventory ("overheat",350)
		ALTT BC 2 a_weaponready (WRF_NOFIRE)
		ALTT DEFG 2 a_weaponready (WRF_NOFIRE)
		goto backtosword
	backtosword:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("usinggauntlet", 99)
		TNT1 A 0 a_selectweapon ("NewZarach")
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		GIDL A 0 A_Lower
		ALTT G 1 A_Lower
		TNT1 A 0 a_selectweapon ("NewZarach")
		Loop
	overheated:
		ALTT G 1 a_weaponready (WRF_NOPRIMARY|WRF_NOSECONDARY)
		TNT1 A 0 a_jumpifinventory ("overheat",1,"overheated")
		goto restored
	restored:
		TNT1 A 0 a_playsound ("gauntlet/eyeopen",0)
		ALTT GH 2
		TNT1 A 0 a_playsound ("gauntlet/midcharge",0)
		ALTT IJ 2
		ALTT KL 2
		goto ready
		
		
	AltFire:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("hypercharge",1,"chargecancel")
		TNT1 A 0 a_jumpifinventory ("wavecharge",1,"chargecancel")
		TNT1 A 0 a_jumpifinventory ("subshotammo",1,"altfirestart")
		GIDL A 1 a_playsound ("subweapons/noaltfire",0)
		goto ready
	altfirestart:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("heavymacercheck", 1, "heavymacershot")
		TNT1 A 0 a_jumpifinventory ("spikevulcancheck", 1, "spikevulcanshot")
		TNT1 A 0 a_jumpifinventory ("heatbeamcheck", 1, "heatbeamshot")
		TNT1 A 0 a_jumpifinventory ("crushmissilecheck", 1, "crushmissileshot")
		TNT1 A 0 a_jumpifinventory ("scattershotcheck", 1, "scattershotattack")
		TNT1 A 0 a_jumpifinventory ("rollingbombcheck", 1, "rollingbombshot")
		GIDL A 1
		goto ready



//===SUB SHOTS===//
  

//Crush missile

	Crushmissileshot:
		TNT1 A 0 
		GFUP AB 2
		GFIR A 0 a_playsound ("subweapons/crushmissileshot")
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_giveinventory ("Subheat",240)
		GFIR B 2 a_firecustommissile ("crushmissile",0,0,5,0)
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR D 1 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR E 14 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR F 2 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR G 2 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		goto ready


//Scatter shot


	scattershotattack:	
		TNT1 A 0 
		GFUP AB 2	 
		GFIR A 1
		TNT1 A 0 a_quake (3, 5, 0, 10, "null")
		GFIR A 0 a_playsound ("subweapons/scattershot",0) 
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_giveinventory ("Subheat",150)
		GFIR BC 1 
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_checkfloor ("groundscatter")
		TNT1 A 0 A_ChangeVelocity(Cos(Pitch)*-30,0,Sin(Pitch)*30,1)
		GFIR D 1 A_FireCustomMissile("scatterbullet",random(-6,6),0,10,3,0,random(-6,6))
		TNT1 A 0 a_firecustommissile ("scatterblowback",0,0,10,3)
		GFIR BBBBBBBBBBBBB 0 A_FireCustomMissile("scatterbullet",random(-8,8),0,10,3,0,random(-6,6))
		goto scatterend
	
	groundscatter:
		GFIR D 1 A_FireCustomMissile("scatterbullet",random(-6,6),0,10,3,0,random(-6,6))
		TNT1 A 0 a_firecustommissile ("scatterblowback",0,0,10,3)
		GFIR BBBBBBBBBBBBB 0 A_FireCustomMissile("scatterbullet",random(-8,8),0,10,3,0,random(-6,6))
		goto scatterend
	scatterend:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR E 6
		GFIR F 6
		GFIR G 4 A_weaponready (wrf_nosecondary)
		goto ready

//Rolling bomb

	rollingbombshot:
		TNT1 A 0 
		GFUP AB 2
		GFIR A 1
		TNT1 A 0 a_playsound ("subweapons/earthshakershot")	
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_giveinventory ("Subheat",200)
		GFIR B 1 a_firecustommissile ("rollingbomb",0,0,11,0)
		GFIR C 1
		GFIR D 1
		GFIR E 15
		GFIR F 6
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR G 3 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		goto ready
		
//Heat beam

	Heatbeamshot:
		TNT1 A 0 
		GFUP AB 2
		GFIR A 1
		TNT1 A 0 A_Quake(1, 8, 0, 22)
		TNT1 A 0 a_playsound ("subweapons/heatbeamshot",0)	
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_giveinventory ("Subheat",260)
		GFIR B 1 a_firecustommissile ("heatbeamer",0,0,4,0)
		GFIR C 1
		GFIR D 1
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR E 10 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR F 6 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR G 3 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		goto ready


//Spike Vulcan

	SpikeVulcanshot:
		TNT1 A 0 
		GFUP AB 2
	vulcanloop:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_playsound ("gauntlet/dart",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("Subheat",15)
		GFIR B 1 a_firecustommissile ("gauntletbolt",random(-3, 3),0,11,0,0,random(-2,2))
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR C 1 
		TNT1 A 0 a_refire ("ammocheck")
		goto vulcanend
	ammocheck:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("subshotammo",1,"vulcancheck")
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR D 1 
		goto vulcanend
	vulcancheck:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("spikevulcancheck",1,"vulcanloop")
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR D 1 
		goto vulcanend
	vulcanend:
		GFIR D 3 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR E 3 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR F 2 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		GFIR G 1 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		goto ready
		

//heavy macer

	heavymacershot:
		TNT1 A 0 
		GFUP AB 2
		GFIR A 1
		TNT1 A 0 A_Quake(2, 6, 0, 22)
		TNT1 A 0 a_playsound ("subweapons/macer",0)
		TNT1 A 0 a_takeinventory ("subshotammo",1)
		TNT1 A 0 a_firebullets (0,0,1,0,"flickpuff")
		TNT1 A 0 a_firebullets (2,3,20,0,"flickpuff")
		TNT1 A 0 a_firebullets (3,4,35,0,"flickpuff")
		TNT1 A 0 a_giveinventory ("Subheat",325)
		GFIR B 1 a_firecustommissile ("heavymacer",0,0,11,0)
		GFIR C 1
		GFIR D 1
		GFIR E 15
		GFIR F 6
		TNT1 A 0 a_jumpifinventory ("overheat",1,"shutdown")
		GFIR G 3 A_weaponready (wrf_nosecondary|WRF_NOBOB)
		goto ready
	}
}


//--GAUNTLET PROJECTILES--//


//Bullet

actor BlazBullet
{
	+notimefreeze
	projectile
	species "friendly"
	+thruspecies
	+FORCEXYBILLBOARD	
	+bloodsplatter
	+LOOKALLAROUND
	radius 2
	speed 60
	damage (55)
	Scale 2
	states
	{
	Spawn: 
		GBLT A 1 bright
		loop
	death:
		TNT1 A 0 a_stop
		TNT1 A 0 a_playsound ("gauntlet/miss",0)
		SPRK ABCD 2 bright 
		stop
	crash:
		TNT1 A 0 a_stop
		TNT1 A 0 a_playsound ("gauntlet/miss",0)
		SPRK ABCD 3 bright
		stop		
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gauntlet/hit",0)
		TNT1 A 0 a_radiusgive ("bulletstunner",65,RGF_MONSTERS)
		MBS1 ABCDE 2 bright 
		stop
	}
}

actor bulletstunner : custominventory
{
	+inventory.alwayspickup
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("highstunCD",1,"death")
		TNT1 A 0 a_jumpifinventory ("midstunCD",1,"death")
		TNT1 A 0 a_jumpifinventory ("shortstunCD",1,"death")
		TNT1 A 0 a_jumpifhealthlower (1500,"weakstun")
		TNT1 A 0 a_jumpifhealthlower (3500,"midstun")
		TNT1 A 0 a_jumpifhealthlower (5001,"highstun")
		TNT1 A 1
		stop
	Highstun:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("HighstunCD",1)
		TNT1 A 0 ACS_NamedExecuteWithResult("HighStun")
		TNT1 A 0 a_playsound ("Blazter/Stun",0,0.8,0,1.2)
		TNT1 A 1 a_spawnitemex ("Highcrystal",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION|SXF_SETMASTER)
		stop
	midstun:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("MidstunCD",1)
		TNT1 A 0 ACS_NamedExecuteWithResult("MidStun")
		TNT1 A 0 a_playsound ("Blazter/Stun",0,0.8,0,1.2)
		TNT1 A 1 a_spawnitemex ("Midcrystal",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION|SXF_SETMASTER)
		stop
	weakstun:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("shortstunCD",1)
		TNT1 A 0 ACS_NamedExecuteWithResult("ShortStun")
		TNT1 A 0 a_playsound ("Blazter/Stun",0,0.8,0,1.2)
		TNT1 A 1 a_spawnitemex ("shortcrystal",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION|SXF_SETMASTER)
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}

actor shortstunCD : powerup
{
	powerup.duration 250
}

actor MidstunCD : powerup
{
	powerup.duration 450
}

actor HighstunCD : powerup
{
	powerup.duration 850
}

actor shortcrystal
{
	radius 10
	height 10
	projectile
	speed 20
	+NOCLIP
	+bright
	species "friendly"
	+thruspecies
	renderstyle add
	alpha 0.50
	Damage (0)
	scale 2
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",150,"break")
		BCRS A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1,AAPTR_TARGET)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		BCRS A 1 a_jumpifInventory ("shortstunCD",1,"Spawn",AAPTR_TARGET)
		goto death
	break:
		TNT1 A 0
		TNT1 A 0 a_playsound ("Blazter/Stunbreak",0)
		BCRS ABCDEFGHI 2 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		goto cooldown
	cooldown:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",250,"death")
		TNT1 AA 0 a_spawnitemex ("MAXparticle",random(-16,16),random(-16,16),random(20,50),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		TNT1 A 0 a_jumpifInventory ("shortstunCD",1,"cooldown",AAPTR_TARGET)
		goto death
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}


actor midcrystal : shortcrystal
{
	scale 3
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",300,"break")
		BCRS A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1,AAPTR_TARGET)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		BCRS A 1 a_jumpifInventory ("midstunCD",1,"Spawn",AAPTR_TARGET)
		goto death
	break:
		TNT1 A 0
		TNT1 A 0 a_playsound ("Blazter/Stunbreak",0)
		BCRS ABCDEFGHI 2 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		goto cooldown
	cooldown:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",450,"death")
		TNT1 AA 0 a_spawnitemex ("MAXparticle",random(-16,16),random(-16,16),random(20,50),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		TNT1 A 0 a_jumpifInventory ("midstunCD",1,"cooldown",AAPTR_TARGET)
		goto death
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}

actor highcrystal : shortcrystal
{
	scale 5
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",400,"break")
		BCRS A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1,AAPTR_TARGET)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		BCRS A 1 a_jumpifInventory ("highstunCD",1,"Spawn",AAPTR_TARGET)
		goto death
	break:
		TNT1 A 0
		TNT1 A 0 a_playsound ("Blazter/Stunbreak",0)
		BCRS ABCDEFGHI 2 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		goto cooldown
	cooldown:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("stuntimer",800,"death")
		TNT1 AA 0 a_spawnitemex ("MAXparticle",random(-16,16),random(-16,16),random(20,50),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 1 a_warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 a_giveinventory ("stuntimer",1)
		TNT1 A 0 a_jumpifInventory ("highstunCD",1,"cooldown",AAPTR_TARGET)
		goto death
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}


actor stuntimer : inventory
{inventory.maxamount 800}

actor Stunspawner : custominventory
{
	+inventory.alwayspickup
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 AA 0 a_spawnitemex ("MAXparticle",random(-16,16),random(-16,16),random(20,50),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 1
		stop
	}
}


ACTOR BulletCasingSpawner //Shamelessly stolen from probably one of Weasel's mods, yoink. (Then taken by me, double yoink)
{
	Speed 13
	PROJECTILE
	+NOCLIP
	States
	{
	Spawn:
		TNT1 AA 0 A_CustomMissile("BulletCasing",0,0,random(-100,-80),CMF_AIMDIRECTION,random(-15,15))
		Stop
	}
}

ACTOR BulletCasing
{
	Radius 2
	Height 4
	Speed 8
	Scale 0.2
	PROJECTILE
	-NOGRAVITY
	+BOUNCEONACTORS
	+DONTSPLASH
	Gravity 0.75
	BounceType Doom
	BounceCount 6
	BounceFactor 0.6  
	+clientsideonly
	States
	{
	Spawn:
		TNT1 A 0
		CAS1 ABCDEFGH 1 bright
		Goto rollingloop
	rollingloop:
		CAS1 A 0 A_Jump(128,1,3,5,7)
		CAS1 ABCDEFGH 1 bright
		Loop
	Death:
		TNT1 A 0 a_jump (256, "dead1","dead2")
		loop
	dead1:
		CAS1 I 60 bright
		CAS1 I 1 bright a_fadeout (0.01)
		wait
 	dead2:
		CAS1 J 60 bright
		CAS1 J 1 bright a_fadeout (0.01)
		wait
	}
}


actor ringpellettrail
{
	+dontblast
	+notimefreeze
	+nointeraction
	+clientsideonly
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	radius 2
	speed 3
    Scale 0.80
	renderstyle add
	alpha 0.50
	states
	{
	spawn:
		RRNG E 2 bright
		RRNG D 2 bright
		RRNG C 1 bright
		RRNG B 1 bright
		stop
	death:
		TNT1 A 0
		stop
	}
}

//Debris code borrowed from Wildweasel's Stylemod
//Please don't kill me Weasel.

actor pelletdebris
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	scale 0.8
	Alpha	1
	Mass	0
	+missile
	+doombounce
	+FLOORCLIP
	+clientsideonly
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		PDBR AAAA 1  Bright A_SetTranslucent(.6,1)
		TNT1 AA 1  Bright 
		PDBR AA 1 Bright 
		TNT1 A 1  Bright 
		PDBR A 1 Bright 
		Stop
	}
}

actor MAXparticle
{
	projectile
	+clientsideonly
	speed 10
	+NOINTERACTION
	states
	{
	spawn:	
		PDBR AAAAAA 1  Bright A_SetTranslucent(.6,1)
		TNT1 AA 1  Bright 
		PDBR AA 1 Bright 
		TNT1 AA 1  Bright 
		PDBR A 1 Bright 
		TNT1 A 1  Bright 
		PDBR A 1 Bright 
		Stop
	}
}

actor pellettrail
{
	+notimefreeze
	+nointeraction
	+clientsideonly
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+DONTBLAST
	radius 2
	speed 50
    Scale 1
	renderstyle add
	alpha 0.40
	states
	{
	Spawn: 
		GPLT A 4 bright
		stop
	death:
		SPRK ABCD 2 bright 
		stop
	xdeath:
		SPRK ABCD 3 bright
		stop
	}
}

//Low Charge shot

actor lowchargeshot
{
	+notimefreeze
	projectile
	species "friendly"
	+thruspecies
	+bloodsplatter
	+bright
	height 15
	radius 10
	speed 40
	damage (100)
	deathsound "wavegun/weakhit"
	Scale 2
	states
	{
	spawn:
		LSHO A 1
		loop
	death:
		WSHO BC 2
		stop
	}
}


//Mid charge shot

actor midchargeshot
{
	+notimefreeze
	projectile
	species "friendly"
    +thruspecies
	+bright
	+bloodsplatter
	+hexenbounce
	height 15
	radius 14
	speed 45
	bouncecount 3
	damage (250)
	Scale 2
	gravity 1.20
	deathsound "wavegun/midhit"
	states
	{
	spawn:
		TNT1 A 0
		WSHO A 1 a_jumpifinventory ("flytimer",3,"falling")
		WSHO A 1 a_spawnitemex("waveshottrail")	
		TNT1 A 0 a_giveinventory ("flytimer",1)
		loop
	falling:
		TNT1 A 0
		WSHO A 0 a_changeflag ("NOGRAVITY",0)
	falling2:
		WSHO A 1
		WSHO A 1 a_spawnitemex("waveshottrail")	
		loop
	death:
		TNT1 A 0 a_stop
		WSHO A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 A 0 a_playsound ("gauntlet/miss",0)
		TNT1 A 0 Radius_Quake (2,6,0,10,0)
		TNT1 A 0 a_explode (300,180,0,0,180)
		TNT1 A 0 a_radiusthrust (1000, 50,0,50)
		WSHO BCDE 2
		stop
	}
}

actor weaktrail
{
	+notimefreeze
	+nointeraction
	+clientsideonly
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bright
	+DONTBLAST
	radius 2
	speed 50
    Scale 0.70
	renderstyle translucent
	alpha 0.60
	states
	{
	Spawn:
		TNT1 A 0
		WSHO A 5
		stop
	death:
		TNT1 A 0 bright 
		TNT1 A 1 bright 
		stop
	xdeath:
		TNT1 A 0 bright 
		TNT1 A 1 bright 
		stop
	}
}



// MAX charge shot

actor waveshot
{
	+notimefreeze
	+bloodsplatter
	+extremedeath
	projectile
	+bright
	species "friendly"
    +thruspecies
	radius 12
	height 12
	speed 35
	damage (380)
	deathsound "wavegun/fullhit"
    Scale 2
	states
	{
	spawn:
		TNT1 A 0
		WSHO A 3
	waveloop:
		WSHO A 1 a_weave (8,0,5,0)
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 a_weave (8,0,5,0) 
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 a_weave (8,0,5,0) 
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 a_weave (8,0,5,0) 
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 Radius_Quake (2,10,0,32,0)
		TNT1 A 0 a_explode (80,180,0,0,100)
		TNT1 A 0 a_radiusthrust (1500, 30,0,30)
		WSHO BCDEF 2
		stop
	}
}

actor straightwave : waveshot
{
	radius 10
	height 10
	states
	{
	spawn:
		TNT1 A 0
		WSHO A 3
	waveloop:
		WSHO A 1 
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 
		TNT1 A 0 a_spawnitemex ("waveshottrail")
		WSHO A 1 
		loop
	}
}

actor waveshottrail : weaktrail
{
    Scale 2
	renderstyle translucent
	alpha 0.90
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		WSHO B 2
		stop
	}
}

actor hyperbullet : waveshot
{
	speed 80
	damage (320)
	+extremedeath
    Scale 2
	states
	{
	spawn:
		TNT1 A 0
		HSHO A 1 a_spawnitemex ("hypershottrail")
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 Radius_Quake (2,10,0,32,0)
		TNT1 A 0 a_radiusgive ("bulletstunner",85,RGF_MONSTERS)
		TNT1 A 0 a_radiusthrust (1200, 120,RTF_NOIMPACTDAMAGE,120)
		HSHO BCDEF 1
		stop
	}
}

actor hypershottrail : weaktrail
{
    Scale 2
	renderstyle translucent
	alpha 0.50
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		HSHO B 3
		stop
	}
}

	


//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//===SUB SHOT PROJECTILES===


//Spike vulcan bolt

actor gauntletbolt 
{
	+notimefreeze
	projectile
    +BLOODSPLATTER
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+BRIGHT
	+dontblast
	species "friendly"
    +thruspecies
	radius 2
	speed 95
	damage (95)
    Scale 1
	states
	{
	spawn:
		GSPK A 1 a_spawnitemex ("smallbolttrail")
		loop
	death:
		TNT1 A 0 a_spawndebris ("bladespark")
		TNT1 A 0 a_playsound ("gauntlet/boltbounce")
		TNT1 A 0 a_spawnitemex("boltrebound",0,0,0,random(2,10),random(2,10),5, SXF_NOCHECKPOSITION)
		stop
	crash:
		TNT1 A 0 a_spawndebris ("bladespark")
		TNT1 A 0 a_playsound ("gauntlet/boltbounce")
		TNT1 A 0 a_spawnitemex("boltrebound",0,0,0,random(2,10),random(2,10),5, SXF_NOCHECKPOSITION)
		stop
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gauntlet/darthit",0)
		TNT1 A 0 a_spawnitemex ("bolthit")
		TNT1 A 1
		stop		
	}
}

actor homingbolt : gauntletbolt
{
	+notimefreeze
	projectile
	+THRUSPECIES
	species "friendly"
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	height 12
	radius 5
	speed 15
	damage (35)
	Projectile
	+SEEKERMISSILE
	+FOILINVUL
	+SKYEXPLODE
	+NOEXPLODEFLOOR
	+bright
	reactiontime 10
	states
	{
	spawn:
		GSPK A 1 a_spawnitemex ("smallbolttrail")
		GSPK A 1 a_spawnitemex ("smallbolttrail")
		GSPK A 1 a_spawnitemex ("smallbolttrail")
		GSPK A 1 a_spawnitemex ("smallbolttrail")
		TNT1 A 0 A_SeekerMissile(60,90,SMF_PRECISE|SMF_LOOK,80)
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 1 a_spawnitemex("boltrebound",0,0,0,random(2,10),random(2,10),5, SXF_NOCHECKPOSITION)
		stop		
	}
}


actor bolthit
{
	+dontblast
	+notimefreeze
	+nointeraction
	+clientsideonly 
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+BRIGHT
	radius 2
	speed 50
    Scale 0.5
	renderstyle translucent
	alpha 0.70
	states
	{
	spawn:
		TNT1 A 0
		GSPK BCDEDFGH 1
		stop
	death:
		TNT1 A 1
		stop
	}
}


actor boltrebound
{
	+notimefreeze
	projectile
	+bounceonwalls
	+bounceonceilings
	+ripper
	bouncecount 2
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+CLIENTSIDEONLY
	+painless
	+bright
	-nogravity
	gravity 1.5
	speed 40
	bouncefactor 0.40
	radius 2
	damage (0)
	scale 0.70
	states
	{
	spawn:
		DFLC ABCDE 2 
		stop
	death:
		TNT1 A 1
		stop
	}
}


actor smallbolttrail
{
	+dontblast
	+notimefreeze
	+nointeraction
	+clientsideonly 
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	radius 2
	speed 50
    Scale 0.60
	renderstyle add
	alpha 0.20
	states
	{
	spawn:
		TRNG E 2 bright
		TRNG D 2 bright
		TRNG C 1 bright
		stop
	death:
		TNT1 A 0
		stop
	}
}



//crushmissile

actor crushmissile
{
	+notimefreeze
	+bloodlessimpact
	projectile
    +FORCEXYBILLBOARD	
	+thruspecies
	+extremedeath
	species "friendly"
	radius 12
	speed 50
	damage (450)
    Scale 2
	+bright
	states
	{
	Spawn: 
		CMIS AB 2
		loop
	death:
		TNT1 A 0
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_Explode(50,128,1,0,1)
		TNT1 A 0 A_Explode(30,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 A_Explode(10,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 A_Explode(10,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 A_Explode(10,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 A_Explode(10,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake(2,3,0,8,0)
		TNT1 A 0 A_SpawnItemEx ("extrabang", frandom(-3,3),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_SETMASTER)
		TNT1 A 0 A_Explode(10,128,0,0,128)
        TNT1 A 0 A_Explode(95,160,0,1,100)
        TNT1 A 5
        Stop
	}
}

actor extrabang 
{
	+NOINTERACTION
	+extremedeath
	+thruspecies
	species "friendly"
	scale 2
	Radius 4
	Height 5
	+bright
	states
	{
	spawn:
		TNT1 A 0
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",0)
		SPRK A 2 a_spawnitemex ("missileblast")
		SPRK B 3 
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",6)
		SPRK C 2 a_spawnitemex ("missileblast")
		SPRK D 3 
		stop
	}
}


actor missileblast
{
	projectile
    Radius 40
    Height 50
    Speed 0
	damage (15)
	Damagetype "crushmissile"
	+bloodlessimpact
	+noblood
	+RIPPER
	+NOBOSSRIP
	+extremedeath
	+thruspecies
	species "friendly"
	+DONTBLAST
	states
	{
	spawn:
		TNT1 A 1
		stop
	death:
		TNT1 A 0
		stop
	}
}



//scatter shot bullet

actor scatterbullet : fastprojectile
{
	+notimefreeze
	projectile
    +dontblast
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+thruspecies
	species "friendly"
	radius 6
	height 8
	speed 90
	damage (80)
    missileheight 8
	missiletype "pellettrail"
	Scale 1
	alpha 0.95
	states
	{
	Spawn: 
		GPLT A 1 bright
		loop
	death:
		SPRK ABCD 2 bright
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_jump (80, "blast")
		SPRK ABCD 2 bright
		stop
	blast:
		TNT1 A 0
		TNT1 A 0 a_radiusthrust (5000,10,RTF_NOIMPACTDAMAGE,10)
		TNT1 A 1
		stop
		
	}
}

actor scatterblowback
{
	radius 6
	height 6
	mass 400
	+notimefreeze
	projectile
    +FORCEXYBILLBOARD	
	+extremedeath
	+LOOKALLAROUND
	+thruspecies
	species "friendly"
	damage (40)
	speed 30
	states
	{
	spawn:
		TNT1 AAA 2
		stop
	death:
		TNT1 A 1
		stop
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 0 a_radiusthrust (50000,100,RTF_NOIMPACTDAMAGE)
		TNT1 A 1
		stop
	}
}

//Rolling Bomb

actor rollingbomb
{
	+notimefreeze
	projectile
	-nogravity
	+floorclip
	+extremedeath
	+bloodlessimpact
	+hexenbounce
	+bright
	species "friendly"
	seesound "subweapons/earthshakerbounce"
	bouncefactor 1
	bouncecount 400
	damage (1)
	Radius 8
	height 8
	scale 2
	speed 30
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("silence", CHAN_VOICE)
		ROBM ABCDEFGHABCDEFGHABCD 1
		goto death
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_nogravity
		TNT1 A 0 a_scalevelocity (0)
		ROBM ABCDEFGH 1
		ROBM ABCDEFGH 1
		goto death
	death:
		TNT1 A 0 a_nogravity
		TNT1 A 0 a_scalevelocity (0)
		TNT1 A 0 a_playsound ("subweapons/earthshakerexplode",0,1,0,0.5)
		TNT1 A 0 Radius_Quake(5,20,0,62,0)
		TNT1 A 0 a_explode (450, 200, 0, 0, 200)
		TNT1 A 0 a_explode (80, 300, 1, 0, 100)
		TNT1 A 0 A_RadiusThrust(20000,300,0)
		TNT1 A 0 a_spawnitemex ("shakerexplosion",0,0,80)
		TNT1 A 25
		stop
	}
}

actor shakerexplosion
{
	+notimefreeze
	+nointeraction
	+clientsideonly
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+DONTBLAST
	radius 2
	speed 50
    Scale 5
	states
	{
	spawn:
		TNT1 A 0
		RBXP ABCDEFGHI 5 bright		
		stop
	death:
		TNT1 A 1
		stop
	}
}


//Heat beam
actor heatbeamer
{
	PROJECTILE
	+NOINTERACTION
	Speed 1
	Radius 4
	Height 8
	Damage (0)
	RenderStyle None
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("ringpellettrail",18,2,2)
		TNT1 A 1 A_SpawnItemEx("heatbeam1",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam2",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam3",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam4",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam5",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam5",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam5",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam5",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("heatbeam5",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		Stop
	}
}

actor heatbeam1 : fastprojectile
{
	+notimefreeze
	projectile
    +dontblast
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+NODAMAGETHRUST
	+thruspecies
	species "friendly"
	radius 6
	height 8
	speed 100
	damage (200)
    missileheight 8
	missiletype "beamtrail1"
	Scale 6
	alpha 0.95
	states
	{
	Spawn: 
		HBEM A 2 bright
		HBEM B 1 bright
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_fadeout (0.50)
		SPRK ABCD 1 bright
		stop
	Xdeath:
		TNT1 A 0
		TNT1 AAAAA 0 a_spawnitemex ("MAXparticle",random(-16,16),random(-16,16),random(-5,5),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0)
		TNT1 A 0 a_fadeout (0.50)
		SPRK ABCD 1 bright
		stop
	}
}


actor beamtrail1
{
	+notimefreeze
	+nointeraction
	+clientsideonly
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+DONTBLAST
	radius 2
	speed 50
    Scale 5
	renderstyle translucent
	alpha 0.20
	states
	{
	Spawn:
		TNT1 A 0
		HBEM A 2 bright
		HBEM B 1 bright
		HBEM A 2 bright
		stop
	death:
		TNT1 A 0 bright 
		TNT1 A 1 bright 
		stop
	xdeath:
		TNT1 A 0 bright 
		TNT1 A 1 bright 
		stop
	}
}

actor heatbeam2 : heatbeam1
{
	missiletype "beamtrail2"
	Scale 5
}

actor beamtrail2 : beamtrail1
{
	scale 4
}

actor heatbeam3 : heatbeam1
{
	missiletype "beamtrail3"
	Scale 4
}

actor beamtrail3 : beamtrail1
{
	scale 3
}

actor heatbeam4 : heatbeam1
{
	missiletype "beamtrail4"
	Scale 3
}

actor beamtrail4 : beamtrail1
{
	scale 2
}

actor heatbeam5 : heatbeam1
{
	missiletype "beamtrail4"
	Scale 2
}


//Heavy Macer
actor heavymacer
{
	+notimefreeze
	projectile
	+ripper
	+noblood
	+bright
	+FORCEXYBILLBOARD
	+thruspecies
	+hexenbounce
	bouncecount 5
	species "friendly"
	radius 10
	height 10
	damage (0)
	speed 15
	reactiontime 11
	states
	{
	spawn:
		SPRJ ABCD 1 a_spawnitemex ("weakmacer")
		SPRJ ABCD 1 a_spawnitemex ("weakmacer")
		SPRJ ABCD 1 a_spawnitemex ("weakmacer")
		SPRJ ABCD 1 a_spawnitemex ("weakmacer")
		goto level2
	level2:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("macetier",1)
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		SPRJ EFGH 1 a_spawnitemex ("midmacer")
		TNT1 A 0 a_giveinventory ("macetier",1)
		goto level3
	level3:
		SPRJ IJKL 1 a_spawnitemex ("maxmacer")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 90, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 270, CMF_AIMDIRECTION)
		SPRJ IJKL 1 a_spawnitemex ("maxmacer")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 140, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 220, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 320, CMF_AIMDIRECTION)
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("macetier",2,"level3explode")
		TNT1 A 0 a_jumpifinventory ("macetier",1,"level2explode")
		TNT1 A 0 a_explode (80,100,0,30)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		SPRK A 0 a_playsound ("subweapons/crushmissileexplode",1,1,0,0.6)
		TNT1 A 0 Radius_Quake (2,10,0,15,0)
		TNT1 A 0 a_spawnitemex ("level1boom")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		TNT1 A 5
		stop
	level2explode:
		TNT1 A 0
		TNT1 A 0 a_explode (140,150,0,60)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 0 a_playsound ("magegunner/missileexplode",0,1,0,0.7)
		TNT1 A 0 Radius_Quake (3,15,0,25,0)
		TNT1 A 0 a_spawnitemex ("level2boom")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 90, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 270, CMF_AIMDIRECTION)
		TNT1 A 10
		stop
	level3explode:
		TNT1 A 0
		TNT1 A 0 a_explode (180,200,0,100)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 0 Radius_Quake (4,15,0,35,0)
		TNT1 A 0 a_playsound ("subweapons/earthshakerexplode",0,1,0,0.7)
		TNT1 A 0 a_spawnitemex ("level3boom")
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 60, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 300, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 90, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 180, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 270, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 140, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 220, CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("homingbolt", 8,0, 320, CMF_AIMDIRECTION)
		TNT1 A 10
		stop
	}
}

actor weakmacer
{
	projectile
	+noblood
	+shootable
	+notimefreeze
	+bloodlessimpact
	+thruspecies
	+notargetswitch
	+NORADIUSDMG
	-bloodsplatter
	-noblockmap
	painchance 255
	species "friendly"
	radius 16
	height 32
	speed 40
	mass 88000
	projectilekickback 1000
	damage (15)
	states
	{
	spawn:
		TNT1 A 3
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	Xdeath:
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/jabhit",0)
		TNT1 A 0 A_SpawnItemEx ("macehitFX", frandom(-3,3),frandom(-10,10),frandom(-10,10), 0,0,0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 0 a_radiusthrust (2000,80,0,80)
		TNT1 A 5
		stop
	}
}

actor midmacer : weakmacer
{
	radius 24
	height 38
	speed 40
	mass 88000
	damage (25)
	projectilekickback 5000
	scale 3
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/straighthit",0)
		TNT1 A 0 Radius_Quake (2,5,0,10,0)
		TNT1 A 0 A_SpawnItemEx ("macehitFX", frandom(-5,5),frandom(-15,15),frandom(-15,15), 0,0,0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 0 a_radiusthrust (3000,120,0,120)
		TNT1 A 8
		stop
	}
}

actor maxmacer : weakmacer
{
	radius 32
	height 42
	speed 40
	mass 88000
	damage (40)
	projectilekickback 8000
	scale 6
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/haymakerhit",0)
		TNT1 A 0 Radius_Quake (3,8,0,10,0)
		TNT1 A 0 A_SpawnItemEx ("macehitFX", frandom(-6,6),frandom(-20,20),frandom(-20,20), 0,0,0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 0 a_radiusthrust (5000,120,0,120)
		TNT1 A 10
		stop
	}
}

actor macetier : inventory
{inventory.maxamount 2}	

actor level1boom
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	scale 3
	+bright
	States
	{
	spawn:
		TNT1 A 0
		SPRK ABCD 1 bright
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}

actor level2boom : level1boom
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	scale 5
	+bright
	States
	{
	spawn:
		TNT1 A 0
		SPRK ABCD 2 bright
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}

actor level3boom : level1boom
{
	scale 6
	states
	{
	spawn:
		TNT1 A 0
		SPRK ABCD 3 bright
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}

	

actor macehitFX
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	scale 1
	+bright
	States
	{
	Spawn:
		TNT1 A 0
		SWHT ABC 1
		stop
	}
}


//--TOKENS--//





actor overcharge : inventory
{inventory.maxamount 11}	

actor boltcounter : inventory
{inventory.maxamount 30}

actor pelletcounter : inventory
{inventory.maxamount 3}

actor usinggauntlet : inventory
{inventory.maxamount 1}	
	
actor wavecharge : inventory
{inventory.maxamount 30}

actor hypercharge : inventory
{inventory.maxamount 80}

actor hypermode : inventory
{inventory.maxamount 1}

actor overheat : inventory
{inventory.maxamount 350}

actor flytimer : inventory
{inventory.maxamount 30}


actor hypertimer : inventory
{inventory.maxamount 280}

actor Subheat : inventory
{inventory.maxamount 1000}
