actor NewZarach : Weapon
{
	weapon.ammotype "arcaneforce"
	Tag "Zarach/melee"
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.ALT_AMMO_OPTIONAL  	
    +UNDROPPABLE
	+CHEATNOTWEAPON
	+noautoaim
	+noautofire
	weapon.bobstyle smooth
	weapon.bobrangex 0.1
	weapon.bobrangey 0.6
	weapon.bobspeed 2
	Weapon.SelectionOrder 1000
	states
	{
	Select:
		TNT1 A 0
		TNT1 A 0 a_raise
		TNT1 A 0 a_giveinventory ("usingsword", 1)
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		TNT1 A 1 a_raise
		loop
	unarmedselect:
		TNT1 A 0
		TNT1 A 0 a_giveinventory ("usingsword", 1)
		TNT1 A 0 a_jumpifinventory ("thrownswordcooldown", 1, "unarmedready")
		goto swordrecall
	unarmedraise:
		UNAR A 0 a_raise
		UNAR A 0 a_raise
		UNAR A 1 a_raise
		loop
	ready:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedselect")
		FDSH HGFE 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_playsound ("sword/draw")
		FDSH DCBA 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 2 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SLWR DBA 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto realready
	RealReady:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedready")
		TNT1 A 0 A_jumpifinventory ("fataldrawgo", 1, "fataldrawsheathe")
		TNT1 A 0 a_takeinventory ("subcombo", 999)
		SRDG A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		loop
	Deselect:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower (1,"deadlower")
		TNT1 A 0 A_jumpifinventory ("swordpowercheck", 1, "powersworddeselect")
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmeddeselect")
		SLWR D 1
		FDSH BCD 1
		SRDG A 0 a_playsound ("sword/away")
		FDSH FH 1
	swordlower:	
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("usingsword", 99)		
		SRDG A 0 A_Lower
		SRDG A 0 A_Lower
		SRDG A 0 A_Lower
		TNT1 A 1 A_Lower
		loop
	deadlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 0 a_stopsound (6)
		TNT1 A 1 a_lower
		wait	
	unarmeddeselect:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("usingsword", 99)		
		UNAR A 0 a_lower
		UNAR A 0 a_lower
		UNAR A 0 a_lower
		UNAR A 1 a_lower
		loop
	powersworddeselect:
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/powerdown")
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		SWTR GDB 1 BRIGHT
		SRDG A 1 BRIGHT 
		SLWR D 1
		FDSH BCD 1
		SRDG A 0 a_playsound ("sword/away")
		FDSH FH 1
		goto swordlower
	unarmedready:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_jumpifinventory ("fataldrawgo", 1, "fatalfist")		
		UNAR A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto unarmedcheck
	unarmedcheck:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("thrownswordcooldown", 1, "unarmedready")
		goto swordrecall
	zoom:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		TNT1 A 0 a_takeinventory ("staffready",99)
		TNT1 A 0 a_jumpifinventory ("swordpowercheck", 1, "powergrapple")
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedgrapple")
		SRDG AC 1	 
		UGRP ABC 1
		TNT1 A 0 A_PlaySound("Weapons/grapplegloveshoot", 0)
		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")
		UGRP D 1 A_FireCustomMissile("grapplerglove")
		UGRP D 3 a_weaponready (wrf_nosecondary)
		UGRP DCBA 1 a_weaponready (wrf_nosecondary)
		SRDG CBA 1 a_weaponready (wrf_nosecondary)
		SRDG A 3 a_weaponready (wrf_allowreload)
		/*TNT1 A 0 A_PlaySound("Weapons/grapplegloveshoot", 0)
		RIPT E 1 A_FireCustomMissile("grapplerglove")
		RIPT EDCBAF 2 A_WeaponReady (WRF_NOSECONDARY)*/
		goto realready
	unarmedgrapple:
		TNT1 A 0
		TNT1 A 0
		UNAR ACBD 1
		UGRP ABC 1
		TNT1 A 0 A_PlaySound("Weapons/grapplegloveshoot", 0)
		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")
		UGRP D 1 A_FireCustomMissile("grapplerglove")
		UGRP D 3 a_weaponready (wrf_nosecondary)
		UGRP DCBA 1 a_weaponready (wrf_nosecondary)
		UGRP A 3  a_weaponready (wrf_allowreload)
		goto ready
	powergrapple:
		TNT1 A 0
		TNT1 A 0
		PSRD ABC 1 
		UGRP ABC 1
		TNT1 A 0 A_PlaySound("Weapons/grapplegloveshoot", 0)
		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")
		UGRP D 1 A_FireCustomMissile("grapplerglove")
		UGRP D 3 a_weaponready (wrf_nosecondary)
		UGRP DCBA 2 a_weaponready (wrf_nosecondary)
		PSRD CBA 1 a_weaponready (wrf_nosecondary)
		PSRD A 3 a_weaponready (wrf_allowreload)
		goto powerswordcheck
	powerswordready:
		TNT1 A 0
		TNT1 A 0 A_jumpifinventory ("fataldrawgo", 1, "fataldrawsheathe")
		PSRD A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto powerswordcheck
	powerswordcheck:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("swordpowercheck", 1, "powerswordcheck2")
		TNT1 A 0 A_jumpifinventory ("fataldrawgo", 1, "fataldrawsheathe")
		PSRD A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto ready
	powerswordcheck2:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("swordpowercheck", 1, "powerswordready")
		TNT1 A 0 A_jumpifinventory ("fataldrawgo", 1, "fataldrawsheathe")
		PSRD A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto ready
	reload:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("shieldcount",999)
		TNT1 A 0 a_takeinventory ("staffready",99)
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "knucklecrack")
		TNT1 A 0 a_jumpifinventory ("swordpowercheck", 1, "swordpowerdown")
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_giveinventory ("swordpowercheck", 1)
		SRDG A 1 BRIGHT a_playsound ("sword/powerup")
		TNT1 A 0 a_giveinventory ("swordpowercheck", 1)
		SWTR ABCDEFG 2 BRIGHT A_WeaponReady (WRF_ALLOWZOOM)
		goto powerswordready
	knucklecrack:
		TNT1 A 0
		TNT1 A 0
		UNAR ABCD 1
		BZKC ABCD 1
		TNT1 A 0 a_giveinventory ("thrownswordcooldown",400)
		BZKC EF 2 a_weaponready 
		BZKC G 1 a_playsound ("fists/knucklecrack",0)
		BZKC HIJKLMNBA 2 a_weaponready 
		UNAR BA 1 a_weaponready
		goto realready
	swordpowerdown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/powerdown")
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		SWTR GFEDCBA 1 BRIGHT a_weaponready
		SRDG A 1 BRIGHT 
		goto realready
	swordpowerdownstrike:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/powerdown")
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		SWTR GBA 1 BRIGHT a_weaponready
		goto swordstrike
	swordrecall:
		TNT1 A 0
		TNT1 A 0
		UNAR ABCD 1
		TNT1 A 0 a_takeinventory ("unarmedcheck", 1)
		TNT1 A 0 a_takeinventory ("leftsuper",99)
		FDSH HGFE 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_playsound ("sword/draw")
		FDSH DCBA 1  a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 2 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SLWR DBA 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		goto realready
	Fire:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("swordcharge",99)
		TNT1 A 0 a_takeinventory ("subcombo", 999)
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		TNT1 A 0 a_takeinventory ("staffready",99)
		SRDG A 0 a_jumpifinventory ("fataldrawtoken", 1, "fataldraw")
		SRDG A 0 a_jumpifinventory ("unarmedcheck", 1, "jab")
		SRDG A 0 a_jumpifinventory ("swordpowercheck", 1, "powerswordfire")		
		SRDG A 0 a_jumpifinventory ("combocount3", 1, "finalslash")
		SRDG A 0 a_jumpifinventory ("combocount2", 1, "thrust")
		SRDG A 0 a_jumpifinventory ("combocount1", 1, "backslash")
		goto swordstrike		
	swordstrike:
		TNT1 A 0
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("combocount3", 1, "finalslash")
		SRDG A 0 a_jumpifinventory ("combocount2", 1, "thrust")
		SRDG A 0 a_jumpifinventory ("combocount1", 1, "backslash")
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		SRDG B 1
		SRDG DE 1 
		SRDG F 1 A_PlaySound("sword/attack1")		
		SRDG HIJ 1 
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "mightystrike")
		SRDG J 0 A_firecustommissile ("swordattack1",0,0,0,2)
		SRDG KLM 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SRDG CB 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	Mightystrike:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ATKRingStrike",0,0,0,3)
		TNT1 A 0 a_playsound ("powerups/POWeffect", 0)
		SRDG J 0 A_firecustommissile ("swordattack1",0,0,0,3)
		SRDG KLM 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SRDG CB 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("throwprep",1,"throwcharge")
		goto realready
		
		
//==SWORD COMBO SHIT==
//I apologize in advance cus oh god this is so hacky and shitty
	backslash:
		TNT1 A 0
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("combocount3", 1, "finalslash")
		SRDG A 0 a_jumpifinventory ("combocount2", 1, "thrust")
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		SRDG B 1
		BCKS AB 1
		BCKS C 1 a_playsound ("sword/attack2",0)
		BCKS D 1
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "mightybackslash")
		BCKS E 2 a_firecustommissile ("swordattack2",0,0,0,3)
		BCKS F 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		BCKS GH 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SRDG B 2 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	Mightybackslash:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ATKRingStrike",0,0,0,3)
		TNT1 A 0 a_playsound ("powerups/POWeffect", 0)
		BCKS E 2 a_firecustommissile ("swordattack2",0,0,0,3)
		BCKS F 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		BCKS GH 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SRDG B 2 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready

	thrust:
		TNT1 A 0
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("combocount3", 1, "finalslash")
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		SRDG B 1
		TNT1 A 0 a_playsound ("sword/attack3",0)
		RTST A 2
		RTST B 2
		TNT1 A 0 Radius_Quake (2,5,0,10,0)
		RTST C 1 a_firecustommissile ("Swordattack3",0,0,0,3)
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "mightythrust")
		RTST C 2  A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		RTST BA 2 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	mightythrust:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("powerups/POWeffect", 0)
		RTST C 1 a_firecustommissile ("ATKRingStrike",0,0,0,3)
		RTST C 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_firecustommissile ("ATKRingStrike",0,0,0,3)
		RTST B 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_firecustommissile ("ATKRingStrike",0,0,0,3)
		RTST A 1 A_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	finalslash:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		SRDG B 1
		WIDS AB 1
		WIDS C 1 a_playsound ("sword/attack4",0)
		WIDS D 1
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "mightyslash")
		WIDS E 0 a_firecustommissile ("swordattack4",25,0,0,3)
		WIDS E 0 a_firecustommissile ("swordattack4",-25,0,0,3)
		WIDS E 1 a_firecustommissile ("swordattack4",0,0,0,3)
		TNT1 A 0 Radius_Quake (2,5,0,10,0)
		WIDS F 1 a_jumpifinventory ("slashbook",1,"multistrike")
		WIDS G 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		SRDG B 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	mightyslash:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("powerups/POWeffect", 0)
		WIDS E 0 a_firecustommissile ("ATKringwave",25,0,0,3)
		WIDS E 0 a_firecustommissile ("ATKringwave",-25,0,0,3)
		WIDS E 1 a_firecustommissile ("ATKringwave",0,0,0,3)
		TNT1 A 0 Radius_Quake (3,9,0,10,0)
		WIDS F 1
		WIDS F 1 a_jumpifinventory ("slashbook",1,"multistrike")
		WIDS G 1 
		SRDG B 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
	multistrike:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		WIDS G 1
		TNT1 A 1
		SRDG DE 1 
		SRDG F 1 A_PlaySound("sword/multistrike",0)		
		MLST A 1 A_firecustommissile ("multistrike",0,0,0,3)
		MLST B 1 A_firecustommissile ("multistrike",0,0,0,3)
		MLST C 1 A_firecustommissile ("multistrike",0,0,0,3)
		MLST D 1 A_firecustommissile ("multistrike",0,0,0,3)
		SRDG J 0 A_firecustommissile ("multistrike",0,0,0,3)
		MLST E 1 A_firecustommissile ("multistrike",0,0,0,3)
		MLST F 1 A_firecustommissile ("multistrike",0,0,0,3)
		MLST G 1 A_firecustommissile ("multistrike",0,0,0,3)
		TNT1 A 2
		SRDG CB 1 a_weaponready (WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		TNT1 A 0 a_jumpifinventory ("Throwprep",1,"throwcharge")
		goto realready
		
//==SWORD THROW STUFF==
//"HERE CATCH"

	throwcharge:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("throwcharge", 10, "throwready")
		SRDG A 0 a_giveinventory ("throwcharge", 1)
		SRDG A 1 
		TNT1 A 0 a_refire ("throwcharge")
		SRDG A 0 a_takeinventory ("throwcharge", 99)
		goto realready
	throwready:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("throwcharge", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		TNT1 A 0 a_takeinventory ("incombat", 99)
		SRDG A 1
		SRDG B 1
		SRDG C 1
		STHW A 1
		STHW B 1
		STHW C 2
	throwwait:
		TNT1 A 0
		STHW D 1
		TNT1 A 0 a_refire ("throwwait")
		goto swordthrow
	swordthrow:
		STHW E 2
		STHW F 2
		STHW G 2
		STHW H 2
		STHW I 1 a_playsound ("subweapons/chakramfly")
		STHW J 2 a_firecustommissile ("thrownsword",0,0,5,1)
		TNT1 A 0 a_giveinventory ("unarmedcheck",1) 
		TNT1 A 0 a_giveinventory ("thrownswordcooldown",400) 
		STHW K 2
		STHW L 2 
		UNAR DCBA 2 a_weaponready 
		goto realready

		
//==UNARMED COMBO SHIT==
//"Dost thou lack any problems I can't mitigate with mine hands?"
	jab:		
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("punchshield", 1, "superpunch")
		SRDG A 0 a_jumpifinventory ("combocount1", 1, "straight")
		SRDG A 0 a_jumpifinventory ("combocount2", 1, "haymaker")
		SRDG A 0 a_jumpifinventory ("combocount3", 1, "finisher")
		PFST AB 1
		TNT1 A 0 a_playsound ("subweapons/jabswing")
		PFST C 1 A_firecustommissile ("leftjab",0,0,-5,1)
		PFST BA 1 a_weaponready (WRF_NOSWITCH)
		UNAR CBA 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto unarmedready
	Manacheck1:
		TNT1 A 0 
		UNAR A 1 a_jumpifinventory ("ArcaneForce",5,"lariatcharge")
		TNT1 A 0 a_refire ("Manacheck1")
		goto unarmedready
	Lariatcharge:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("lariatcharge",3, "doublelariat")
		UNAR A 1 a_giveinventory ("lariatcharge",1)
		TNT1 A 0 a_refire ("Lariatcharge")
		goto unarmedready
	DoubleLariat:
		UNAR B 1 
		TNT1 A 1
		TNT1 A 0 a_setpitch (0)
		TNT1 A 0 a_playsound ("blaz/powerattack",CHAN_VOICE)
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		LRAT A 1
		TNT1 A 0 a_playsound ("subweapons/haymakerswing")
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		LRAT B 1 A_SetAngle(angle-11.25)
		LRAT C 1 A_SetAngle(angle-22.5)
		LRAT D 1
		TNT1 A 0 A_RadiusGive ("LariatPunch",280,RGF_MONSTERS)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		LRAT D 1 A_SetAngle(angle-45)
		LRAT D 1 A_SetAngle(angle-50)
		LRAT E 1 A_SetAngle(angle-55)
		LRAT F 1 A_SetAngle(angle-55)
		LRAT H 1 A_SetAngle(angle-50)
		LRAT I 1 A_SetAngle(angle-45)
		LRAT J 1 A_SetAngle(angle-22.5)
		TNT1 A 1 A_SetAngle(angle-11.25)
		TNT1 A 2
		UNAR BA 1 
		goto ready

	straight:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		FOTN D 1 
		FOTN E 1 
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		TNT1 A 0 a_playsound ("subweapons/straightswing")
		FOTN F 1 A_firecustommissile ("leftstraight",0,0,5,1)
		TNT1 A 0 a_recoil (-1)		
		FOTN F 3 a_weaponready (WRF_NOSWITCH)
		FOTN FED 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto unarmedready
	haymaker:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		HMKR AB 1
		HMKR CDE 1		
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		TNT1 A 0 a_playsound ("subweapons/haymakerswing")
		HMKR FG 1
		HMKR HI 1 
		TNT1 A 0 a_recoil (-1)
		HMKR J 3 A_firecustommissile ("lefthaymaker",0,0,-5,1)
		HMKR KL 1 a_weaponready (WRF_NOSWITCH)
		HMKR MN 1 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto unarmedready
	superpunch:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		TNT1 A 0 a_jumpifinventory ("leftsuper",1,"superRight")
		UNAR B 1
		FOTN A 1
		FOTN B 1
		FOTN C 1 
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		TNT1 A 0 a_playsound ("subweapons/straightswing")
		FOTN C 1 A_firecustommissile ("superpunch",0,0,0,1)
		TNT1 A 0 a_giveinventory ("leftsuper",1)
		FOTN B 1 a_weaponready (WRF_NOSWITCH)
		FOTN BA 1 a_weaponready (WRF_NOSWITCH)
		UNAR BA 1 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto unarmedready
	SuperRight:
		TNT1 A 0
		UNAR B 1
		FOTN D 1
		FOTN E 1
		FOTN F 1
		TNT1 A 0 a_takeinventory ("leftsuper",99)
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		TNT1 A 0 a_playsound ("subweapons/straightswing")
		FOTN F 1 A_firecustommissile ("superpunch",0,0,0,1)
		FOTN E 1 a_weaponready (WRF_NOSWITCH)
		FOTN ED 1 a_weaponready (WRF_NOSWITCH)
		UNAR BA 1 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto unarmedready
		
	
	finisher:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		TNT1 A 0 a_playsound ("subweapons/haymakerswing")
		TNT1 A 0 a_playsound ("blaz/powerattack",CHAN_VOICE)
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "poweruppercut")
		UPCT ABCD 1 
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		UPCT E 1 a_firecustommissile ("uppercut")
		UPCT FGH 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto realready
	poweruppercut:
		TNT1 A 0
		TNT1 A 0
		UPCT ABCD 1 
		TNT1 A 0 a_takeinventory ("Lariatcharge",99)
		UPCT E 1 a_firecustommissile ("ATKringuppercut")
		UPCT FGH 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 2 a_weaponready (WRF_NOSWITCH)
		TNT1 A 0 a_jumpifinventory ("lariatprep",1,"manacheck1")
		goto ready
		

//==POWER SWORD==//

	powerswordfire:
		TNT1 A 0
		TNT1 A 0
		PSRD A 0 a_jumpifinventory ("arcaneforce", 5, "powerswordattack")
		goto swordpowerdownstrike
	powerswordattack:
		TNT1 A 0
		TNT1 A 0
		PSRD A 0
		PSRD B 1
		TNT1 A 0 a_takeinventory ("incombat", 99)
		TNT1 A 0 a_takeinventory ("combocount1", 99)
		TNT1 A 0 a_takeinventory ("combocount2", 99)
		TNT1 A 0 a_takeinventory ("combocount3", 99)
		PSRD C 1 Bright
		PSRD DE 1 Bright 
		PSRD F 2 Bright A_PlaySound("blaz/powerattack",CHAN_VOICE) 
		TNT1 A 0 A_playsound("poweredtear/swish")
		PSRD H 1 Bright 
		PSRD H 0 a_takeinventory ("arcaneforce", 5)
		PSRD I 1 Bright
		PSRD J 0  A_fireCustommissile("powercleave")
		TNT1 A 0 a_jumpifinventory ("ATKringpowerup", 1, "SpreadCleaver")
		PSRD J 2 Bright 
		PSRD KL 3 Bright A_WeaponReady (WRF_NOSECONDARY)
		TNT1 AAAA 1 A_WeaponReady
		PSRD C 1
		PSRD B 1
		goto powerswordready
	spreadcleaver:
		TNT1 A 0
		PSRD J 0 a_firecustommissile ("PowerATKRingWave", 0,0,0,0,0,0)
		PSRD J 0 a_firecustommissile ("ATKRingThrust", 10,0,0,0,0,0)
		PSRD J 0 a_firecustommissile ("ATKRingThrust", -10,0,0,0,0,0)
		TNT1 A 0 a_playsound ("powerups/POWeffect", 0)
		PSRD J 2 
		PSRD KL 3 A_WeaponReady (WRF_NOSECONDARY)
		TNT1 AAAA 1 A_WeaponReady
		PSRD C 1
		PSRD B 1
		goto powerswordready
		


	powerswordaltfire:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("orbitcheck",1, "triswordshot")	
		PSRD A 0 a_jumpifinventory ("arcaneforce", 5, "powerswordaltcheck")
		goto powerswordready
	powerswordaltcheck:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("daggercheck", 1, "RapidSlash")
		TNT1 A 0 a_jumpifinventory ("hatchetcheck", 1, "moonslash")
		TNT1 A 0 a_jumpifinventory ("lancecheck", 1, "stingerstart")
		TNT1 A 0 a_jumpifinventory ("torchcheck", 1, "firebrand")
		TNT1 A 0 a_jumpifinventory ("shieldcheck", 1, "galeforce")
		TNT1 A 0 a_jumpifinventory ("hammercheck", 1, "judgement")
		TNT1 A 0 a_jumpifinventory ("boomerangcheck", 1, "SwordRang")
		TNT1 A 0 a_jumpifinventory ("crystalbombcheck", 1, "RocketSword")
		TNT1 A 0 a_jumpifinventory ("TrineVoulgecheck", 1, "TriSword")
		PSRD A 1
		goto powerswordready

//thunder stinger
	stingerstart:
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/zapup",0)
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		STCH ABCDEGHIJ 2 bright
		STIN ABC 2 bright
		THNS ABC 1 bright
		//TNT1 A 0 ACS_ExecuteAlways (849, 0)
		//TNT1 A 0 a_setpitch (0)
        //TNT1 A 0 A_ChangeVelocity(0,0,0,CVF_REPLACE)
	stingerattack:	
		TNT1 A 0 a_playsound ("sword/zapping",0)
		THNS DEFG 1 bright
		TNT1 A 0 a_playsound ("sword/zapping",0)
		TNT1 A 0 a_playsound ("sword/zapend",0)
		TNT1 A 0 a_playsound ("subweapons/shielddash")
		THNS OP 1 bright
		TNT1 A 0 a_firecustommissile ("thunderstinger")
		THNS QRST 1 bright 
		goto powerswordready

	
	/*dashloop:
		TNT1 A 0
		TNT1 A 0 a_recoil (-10)
		TNT1 A 0 a_jumpifinventory ("stingcharge",5,"chargedash")
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS C 1 bright a_firecustommissile ("normalstinger") 
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		loop
	chargedash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/zapping",0)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_recoil (-7)
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS D 1 bright a_firecustommissile ("superstinger") 
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_recoil (-7)
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS D 1 bright a_firecustommissile ("superstinger") 
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_recoil (-7)
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS E 1 bright a_firecustommissile ("superstinger") 
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_recoil (-7)
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS E 1 bright a_firecustommissile ("superstinger")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_recoil (-7)
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS F 1 bright a_firecustommissile ("superstinger")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS F 1 bright a_firecustommissile ("superstinger")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS G 1 bright a_firecustommissile ("superstinger")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		TNT1 A 0 a_jumpifinventory ("stingmonster", 1, "stinghit")
		TNT1 A 0 a_jumpifinventory ("stingwall", 1, "stingmiss")
		THNS G 1 bright a_firecustommissile ("superstinger")
		TNT1 A 0 a_giveinventory ("stingcharge",1)
		TNT1 A 0 a_jumpifinventory ("stingcharge",15,"burnout")
		loop
	burnout:
		TNT1 A 0
		//TNT1 A 0 ACS_ExecuteAlways (850, 0)
		TNT1 A 0 a_takeinventory ("stingcharge",99)
		THNS CBA 1
		TNT1 A 1
		TNT1 A 0 a_takeinventory ("stingcharge",99)
		TNT1 A 0 a_takeinventory ("stingmonster",99)
		TNT1 A 0 a_takeinventory ("stingwall",99)
		goto powerswordready*/
	stinghit:
		TNT1 A 0
		//TNT1 A 0 a_stop
		//TNT1 A 0 a_recoil (15)
		//TNT1 A 0 ACS_ExecuteAlways (850, 0)
		TNT1 A 0 a_playsound ("sword/zapend",0)
		THNS OPQR 2 bright
		THNS ST 1 bright
		TNT1 A 0 a_takeinventory ("stingcharge",99)
		TNT1 A 0 a_takeinventory ("stingmonster",99)
		TNT1 A 0 a_takeinventory ("stingwall",99)
		goto powerswordready
	stingmiss:
		TNT1 A 0
		TNT1 A 0 a_stop
		TNT1 A 0 a_recoil (10)
		TNT1 A 0 thrustthingz (0,10,0,1)
		THNS UV 1 bright
		THNS WXY 2 bright
		//TNT1 A 0 ACS_ExecuteAlways (850, 0)
		TNT1 A 0 a_takeinventory ("stingcharge",99)
		TNT1 A 0 a_takeinventory ("stingmonster",99)
		TNT1 A 0 a_takeinventory ("stingwall",99)
		goto powerswordready
	
//Ice slash
	RapidSlash:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("arcaneforce", 5)
		TNT1 A 0 a_playsound ("swordtech/swordfreeze")
		ISTF ABCDEFGH 1 bright
		TNT1 A 0 a_playsound ("swordtech/swordshatter",0)
		ISTF IJKLMNOPQR 1 bright
		PSRD BC 1
	Rapidslashing:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("swordtech/iceattack1")
		RPDS AB 1  bright
		RPDS C 0 a_firecustommissile ("iceslash",25,0,0,3)
		RPDS C 0 a_firecustommissile ("iceslash",-25,0,0,3)
		RPDS C 1 A_firecustommissile ("iceslash")
		RPDS DEF 1 bright
		TNT1 A 1
		TNT1 A 0  A_PlaySound("swordtech/iceattack2")
		RPDS GH 1 bright
		RPDS I 0 a_firecustommissile ("iceslash",25,0,0,3)
		RPDS I 0 a_firecustommissile ("iceslash",-25,0,0,3)
		RPDS I 1 a_firecustommissile ("iceslash")
		RPDS JKL 1 bright
		TNT1 A 1
		TNT1 A 0 a_refire ("rapidmanacheck")
		goto slashfinisher
	Rapidmanacheck:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("arcaneforce",4)
		TNT1 A 0 a_jumpifinventory ("arcaneforce",2,"rapidslashing")
		goto slashfinisher
	Slashfinisher:
		TNT1 A 1
		ISRD B 1 bright a_takeinventory ("slashcounter",99)
		IFSR H 1 bright A_PlaySound("swordtech/iceattack1",0)	
		IFSR HJ 1 
		IFSR K 0 A_firecustommissile ("iceslash")
		IFSR LM 1 bright
		TNT1 A 1 
		IWID A 1
		IWID B 1 bright
		IWID C 1 bright a_playsound ("swordtech/iceattack3",0)
		TNT1 A 0 a_playsound ("blaz/powerattack",CHAN_VOICE)
		TNT1 A 0 a_firecustommissile ("icicle",-40)
		TNT1 A 0 a_firecustommissile ("icicle",-20)
		TNT1 A 0 a_firecustommissile ("icicle",-10)
		IWID D 1 bright a_firecustommissile ("icicle")
		IWID E 1 bright a_firecustommissile ("icicle",3)
		IWID E 1 bright a_firecustommissile ("icicle",20)
		IWID E 1 bright a_firecustommissile ("icicle",40)
		IWID FGGG 3 bright
		TNT1 A 2
		ISRD CBA 1
		goto powerswordready
	
//Firebrand
	Firebrand:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("swordtech/firebrandstart",0)
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		TNT1 AAAA 0 a_spawnitemex("clusterfire",5,0,20,random(3,10),random(-5,5),5)
		FBPU ABCDEFGHIJKLMN 1 Bright
		TNT1 AAA 0 a_spawnitemex("clusterfire",5,0,20,random(3,10),random(-5,5),5)
		FBPU N 1 Bright offset (2,38)
		FBPU O 1 Bright offset (5,43)
		FBPU P 1 Bright offset (8,55)
		FBPU Q 1 Bright offset (15,75)
		FBPU R 1 Bright offset (25,90)
		TNT1 A 1 offset (0,32)
		TNT1 A 0 a_playsound ("swordtech/firebrandattack",0)
		FBRA AABB 1 Bright
		TNT1 A 0 a_firecustommissile ("firebrandstrike")
		FBRA CDE 1 Bright
		FBRA FG 1 Bright
		FBRA HIJ 2 Bright
		TNT1 A 2
		PSRD A 1 offset (25,90)
		PSRD A 1 offset (8,55)
		PSRD A 1 offset (2,38)
		PSRD A 1 offset (0,32)	
		goto powerswordready		
		
//Crescent Slash
	moonslash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("swordtech/moonwavestart",0)
		CSCH ABCDEFGHI 1 bright
		CSCH JK 1 bright
		CSCH LMNOP 1 bright
		CSCH QRS 1 bright
		TNT1 A 1
		MNSL A 1 bright
		MNSL B 1 bright
		MNSL C 1 bright a_playsound ("swordtech/moonwaveshot",0)
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		TNT1 A 0 a_playsound ("blaz/powerattack",CHAN_VOICE)
		TNT1 A 0 a_gunflash ("slasheffect")
		MNSL D 1 bright a_firecustommissile ("crescentwave",-20)
		MNSL E 1 bright a_firecustommissile ("crescentwave",0)
		MNSL E 1 bright a_firecustommissile ("crescentwave",20)
		MNSL FGG 2 bright
		TNT1 A 2
		PSRD CBA 1
		goto powerswordready				
	slasheffect:
		CSMF ABCDEF 1 bright
		stop
		
//galeforce
	galeforce:
		TNT1 A 0
		TNT1 A 0 a_playsound ("swordtech/galestart",0)
		GFCH ABCDEFGHIJKL 2
		GFCH M 2
		GLFR ABC 1
		TNT1 A 1
		GLFR DEF 1
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		GLFR F 1 a_firecustommissile ("wardingcyclone")
		TNT1 A 2
		PSRD CBA 1
		goto powerswordready
		
//Judgement
	Judgement:
		PSRD ABC 1
		OMEN A 4
		OMEN B 2
		OMEN C 1
		OMEN C 1 a_firecustommissile ("judgementmelee")
		OMEN D 1 
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "judgementimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "judgementwall")
		OTHW A 1 a_throwgrenade ("judgementhammer",3,15,8,0)
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		OTHW B 2
		OTHW C 2
		TNT1 A 10
		OWAL C 0 a_takeinventory ("hammerhit", 99)
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		PSRD CBA 1
		goto powerswordready
	judgementimpact:
		TNT1 A 0
		TNT1 A 0
		OMEN DEF 1 
		OMEN G 1
		OMEN H 1
		OMEN I 1
		OMEN J 1
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		OMEN J 1 a_takeinventory ("hammerhit", 99)
		OMEN J 0 a_takeinventory ("hammermiss", 99)
		TNT1 A 2
		PSRD CBA 1
		goto powerswordready
	judgementwall:
		OMEN D 1
		TNT1 A 0 a_recoil (30)
		OWAL ABC 1
		OWAL C 0 a_takeinventory ("hammerhit", 99)
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		goto powerswordready
		
		
//SWORDRANG
	swordrang:
		TNT1 A 0
		TNT1 A 0 a_playsound ("swordtech/boomerangstart",0)
		BMRU ABCDEFGHIJKLMNOP 1 bright
		BMRU PQRST 1
		TNT1 A 4
		BSTH A 1
		BSTH B 1
		BSTH CD 1
		STHW I 1 a_playsound ("subweapons/chakramfly")
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		STHW J 1 a_firecustommissile ("powerboomerangsword",0,0,5,1)
		TNT1 A 0 a_giveinventory ("unarmedcheck",1) 
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		TNT1 A 0 a_giveinventory ("thrownswordcooldown",400) 
		STHW K 1
		STHW L 2
		TNT1 A 2
		UNAR DCBA 2 a_weaponready 
		goto unarmedready


//Rocket Sword
	rocketsword:
		TNT1 A 0 a_playsound ("swordtech/rocketfuse",0)
		RSTF ABCDEFGHIJKLMNOPQRST 1 bright
		RSWD A 3 
		RSWD BCD 2
		TNT1 A 2
		RSWD EEFGH 1
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		RSWD I 1 a_firecustommissile ("RocketSword")
		TNT1 A 0 a_giveinventory ("unarmedcheck",1) 
		TNT1 A 0 a_takeinventory ("swordpowercheck", 99)
		TNT1 A 0 a_giveinventory ("thrownswordcooldown",400) 
		RSWD IJKL 2
		TNT1 A 2
		UNAR DCBA 2 a_weaponready 
		goto unarmedready
		
//Tri Sword

	TriSword:
		TNT1 A 0
		TNT1 A 0 a_playsound ("swordtech/orbitcharge",0)
		TNT1 A 0 a_jumpifinventory ("orbitcheck",1, "triswordshot")	
		VLSW ABCDEFGHIJKLMN 1
		VLSW N 4
		VLSW O 2
		VLSA ABCD 2
		TNT1 A 0 a_takeinventory ("arcaneforce",5)
		TNT1 A 0 a_playsound ("swordtech/orbitslash",0)
		TNT1 A 0 a_firecustommissile ("orbitsword1")
		TNT1 A 0 a_firecustommissile ("orbitsword2")
		TNT1 A 0 a_firecustommissile ("orbitsword3")
		VLSA EFG 1
		TNT1 A 4
		PSRD CBA 1
		goto powerswordready				
	TriSwordShot:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("orbitcheck",99)
		TNT1 A 0 a_playsound ("swordtech/orbitcharge",0)
		VLSW ABCDEFGHIJKLMN 1
		VLSW N 2
		VLSW O 1
		VLSA ABC 1
		VLSA D 2 a_giveinventory ("orbitshot",1)
		TNT1 A 0 a_playsound ("sword/attack4",0)
		TNT1 A 0 a_firecustommissile ("TriSword",0,0,-18)
		TNT1 A 0 a_firecustommissile ("TriSword")
		TNT1 A 0 a_firecustommissile ("TriSword",0,0,18)
		TNT1 A 0 a_takeinventory ("orbitshot",99)	
		VLSA EFG 1
		TNT1 A 4
		PSRD CBA 1
		goto powerswordready				
		
		
		
//--FATAL DRAW ATTACK--

	fataldrawsheathe:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("swordpowercheck",1, "powersheathe")
		SLWR ABCDE 1
		TNT1 A 2
		FDSH ABC 1
		FDSH DEF 1
		TNT1 A 0 a_playsound ("fataldraw/charge",0)
		FDSH GHI 1
		TNT1 A 0 a_playsound ("fataldraw/ready",6,1,1)
		TNT1 A 0 a_playsound ("Blaz/focus",CHAN_VOICE)
		TNT1 A 0 A_giveinventory ("fataldrawtoken",1)
		goto fataldrawready
	powersheathe:
		PLWR ABCDE 1
		TNT1 A 2
		FDSH ABC 1
		FDSH DEF 1
		TNT1 A 0 a_playsound ("fataldraw/charge",0)
		FDSH GHI 1
		TNT1 A 0 a_playsound ("fataldraw/ready",6,1,1)
		TNT1 A 0 a_playsound ("Blaz/focus",CHAN_VOICE)
		TNT1 A 0 A_giveinventory ("fataldrawtoken",1)
		goto fataldrawready	
	fataldrawready:
		TNT1 AA 0 a_spawnitemex ("fatalchargespawner",10,-4,-2,0,0,0,0,SXF_SETMASTER)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		TNT1 A 0 a_giveinventory ("focusing",1)
		FDSH I 1 a_weaponready (WRF_NOSWITCH)
		loop
	fataldraw:
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("unarmedcheck", 1, "100crackfist")
		FDAT AABC 1 a_stopsound (6)
		TNT1 A 2
		TNT1 A 0 a_takeinventory ("fataldrawgo", 99)
		TNT1 A 0 A_takeinventory ("fataldrawtoken",99)
		TNT1 A 0 A_takeinventory ("spiritforce",5)
		TNT1 A 0 a_stopsound (CHAN_VOICE)
		TNT1 A 0 a_playsound ("Blaz/fatalslash",0)
		FDAT DEF 1
		TNT1 A 0 a_playsound ("fataldraw/attack",0)
		TNT1 A 0 a_firecustommissile ("fatalslash")
		TNT1 A 0 a_firecustommissile ("fatalwave")
		FDAT GHI 1
		TNT1 A 0 a_takeinventory ("focusing",99)
		TNT1 A 0 a_jumpifinventory ("swordpowercheck",1, "powerfinish")
		TNT1 A 15
		SRDG CB 3
		goto realready
	powerfinish:
		TNT1 A 15
		PSRD CB 2
		goto powerswordready
	drawcancel:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("unarmedcheck",1, "unarmedcancel")
		TNT1 A 0 a_jumpifinventory ("swordpowercheck",1, "powercancel")
		TNT1 A 0 a_takeinventory ("fataldrawgo", 99)
		TNT1 A 0 A_takeinventory ("fataldrawtoken",99)
		TNT1 A 0 a_takeinventory ("focusing",99)
		FDAT ABC 1 a_stopsound (6)
		TNT1 A 1
		SLWR DBA 1 a_weaponready
		goto realready
	powercancel:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("fataldrawgo", 99)
		TNT1 A 0 A_takeinventory ("fataldrawtoken",99)
		TNT1 A 0 a_takeinventory ("focusing",99)
		FDAT ABC 1 a_stopsound (6)
		TNT1 A 1
		PLWR DBA 1 a_weaponready
		goto powerswordready
	unarmedcancel:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("fataldrawgo", 99)
		TNT1 A 0 A_takeinventory ("fataldrawtoken",99)
		TNT1 A 0 a_takeinventory ("focusing",99)
		TNT1 A 1 a_stopsound (6)
		TNT1 A 1
		UNAR CBA 2 a_weaponready
		goto unarmedready
		

	fatalfist:
		UNAR ABCD 1
		BZKC ABCD 1
		BZKC EF 1
		BZKC G 1 a_playsound ("fists/knucklecrack",0)
		TNT1 A 0 a_playsound ("fataldraw/charge",0)
		TNT1 A 0 a_playsound ("fataldraw/ready",6,1,1)
		TNT1 A 0 a_playsound ("Blaz/focus",CHAN_VOICE)
		TNT1 A 0 A_giveinventory ("fataldrawtoken",1)
		BZKC HIJKLMNBA 1
		goto fatalfistready
	fatalfistready:
		TNT1 AA 0 a_spawnitemex ("fatalchargespawner",10,-4,-2,0,0,0,0,SXF_SETMASTER)
		TNT1 A 0 a_quake (1,2,0,3,"silence")
		TNT1 A 0 a_giveinventory ("focusing",1)
		BZKC A 1 a_weaponready (WRF_NOSWITCH)
		loop
	100crackfist:
		TNT1 A 0
		TNT1 A 0 a_playsound ("Blaz/FOTNstart",0)
		TNT1 A 8 a_stopsound (6)
		TNT1 A 0 a_takeinventory ("fataldrawgo", 99)
		TNT1 A 0 a_takeinventory ("focusing",99)
		TNT1 A 0 A_takeinventory ("fataldrawtoken",99)
		TNT1 A 0 A_takeinventory ("spiritforce",5)
		TNT1 A 0 a_playsound ("Blaz/FOTNLoop",6,1,1)
		Goto ATATATATA
	ATATATATA:
		FOTN A 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN B 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN C 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN D 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN E 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		FOTN F 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		FOTN G 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN H 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN I 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN J 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN K 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		FOTN L 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		FOTN M 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN N 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN O 1 a_firecustommissile ("crackfist",random(-5,5),0,-5,0,0,random(-4,4))
		FOTN P 1 a_playsound ("subweapons/crackfistswing",0)
		FOTN Q 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		FOTN R 1 a_firecustommissile ("crackfist",random(-5,5),0,5,0,0,random(-4,4))
		TNT1 A 0 a_giveinventory ("fistloop",1)
		TNT1 A 0 a_jumpifinventory ("fistloop", 8, "100crackfistfinisher")
		loop
	100crackfistfinisher:
		TNT1 A 0
		TNT1 A 0 a_stopsound (6)
		TNT1 A 4
		TNT1 A 0 a_takeinventory ("fistloop",99)
		TNT1 A 0 a_recoil (-5)
		TNT1 A 0 a_playsound ("Blaz/FOTNend",0)
		TNT1 A 0 a_playsound ("subweapons/haymakerswing")
		FOTN D 1 
		FOTN E 1 
		TNT1 A 0 a_playsound ("subweapons/shielddash")
		FOTN F 1 a_firecustommissile ("Finalcrackfist",0,0,5)
		FOTN F 6 
		FOTN FED 2
		UNAR CBA 2
		goto unarmedready

		
//==SUB WEAPONS==//

	Altfire:
		TNT1 A 0
		TNT1 A 0
		SRDG A 0 a_jumpifinventory ("fataldrawtoken", 1, "drawcancel")
		TNT1 A 0 a_giveinventory ("usingsubweapon", 1)
		TNT1 A 0 a_jumpifinventory ("swordpowercheck", 1, "powerswordaltfire")
		TNT1 A 0 a_jumpifinventory ("subcombo",1, "altfirestart")
		TNT1 A 0 a_jumpifinventory ("staffready",1,"StaffShot")
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedaltfirestart")
		TNT1 A 0 a_jumpifinventory ("shieldcount", 1, "shieldthrow")
		SRDG A 1 a_weaponready (WRF_NOFIRE)
		goto altfirestart
	altfirestart:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("subweaponammo", 1, "subweaponcheck")
 		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedready")
		SRDG A 1 a_weaponready (WRF_NOFIRE)
		goto realready
	unarmedaltfirestart:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("throwcharge", 99)
		TNT1 A 0 a_jumpifinventory ("subweaponammo", 1, "subweaponcheck")
		TNT1 A 0 a_takeinventory ("throwcharge", 99)
		UNAR A 1 a_weaponready (WRF_NOFIRE)
		goto realready
	subweaponcheck:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("throwcharge", 99)
		TNT1 A 0 a_jumpifinventory ("hatchetcheck", 1, "hatchetthrow")
		TNT1 A 0 a_jumpifinventory ("lancecheck", 1, "lancethrow")
		TNT1 A 0 a_jumpifinventory ("daggercheck", 1, "daggerthrow")
		TNT1 A 0 a_jumpifinventory ("torchcheck", 1, "torchthrow")
		TNT1 A 0 a_jumpifinventory ("shieldcheck", 1, "shieldstart")		
		TNT1 A 0 a_jumpifinventory ("Boomerangcheck", 1, "BoomerangThrow")
		TNT1 A 0 a_jumpifinventory ("CrystalBombcheck", 1, "BombToss")
		TNT1 A 0 a_jumpifinventory ("TrineVoulgecheck", 1, "StaffDraw")
		TNT1 A 0 a_jumpifinventory ("Hammercheck", 1, "hammersmash")
 		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedready")
		SRDG A 1 a_weaponready (WRF_NOFIRE)
		goto realready

		
//shield

	shieldstart:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("shieldcount", 1, "shieldthrow")
		goto shieldraise
	shieldraise:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedshieldraise")
		RIPT F 1 
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK ABC 1 
		TNT1 A 0 a_playsound ("gauntlet/powupclang",0)
		goto shieldblock	
	shieldblock:
		TNT1 A 0
		TNT1 A 0
		SBLK D 1 A_WeaponReady (wrf_nobob|wrf_noswitch|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		SBLK E 0 a_jumpifinventory ("shieldcount", 80, "shieldlower")
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		TNT1 A 0 A_WeaponReady (wrf_nobob|wrf_noswitch|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		TNT1 A 0 a_giveinventory ("shieldcount", 1)
		loop
	shieldlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		SBLK DCBA 3 A_WeaponReady (WRF_NOSECONDARY|wrf_nobob|wrf_noswitch)
		goto realready
	shieldthrow:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedshieldthrow")
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		SHTW A 2
		SHTW B 1
		SHTW C 1
		SHTW D 1
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		SHTW E 1 a_firecustommissile ("thrownshield")
		SHTW F 1
		goto realready
	unarmedshieldthrow:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		UATW A 1
		UATW B 1
		UATW C 1
		UATW D 1
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UATW E 1 a_firecustommissile ("thrownshield")
		UATW F 1
		goto realready
	unarmedshieldraise:	
		UNAR ACD 1
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SDSH ABC 1
		TNT1 A 0 a_playsound ("gauntlet/powupclang",0)
		goto unarmedshieldblock
	unarmedshieldblock:
		SDSH D 1 A_WeaponReady (wrf_nobob|wrf_noswitch|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		SBLK E 0 a_jumpifinventory ("shieldcount", 80, "unarmedshieldlower")
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+35,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+20,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",-16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",0,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",16,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		SBLK E 0 A_SpawnItemEx("shieldblocker",32,25,(sin(pitch)*-63)+5,0,0,0,-270,32)		
		TNT1 A 0 A_WeaponReady (wrf_nobob|wrf_noswitch|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		TNT1 A 0 a_giveinventory ("shieldcount", 1)
		loop
	unarmedshieldlower:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("shieldcount", 999)
		SDSH DCBA 3 A_WeaponReady (WRF_NOSECONDARY|wrf_nobob|wrf_noswitch)
		goto realready


//hatchet

	hatchetthrow:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhatchetthrow")
		THRW A 2
		THRW B 2 a_playsound ("subweapons/hatchetthrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 2 a_firecustommissile ("hatchet",0,0,-5,1)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		THRW D 2 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_weaponready (wrf_nosecondary|wrf_noswitch)
		SRDG A 5 a_weaponready (wrf_noswitch)
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmedhatchetthrow:
		UTHR A 2
		UTHR B 2 a_playsound ("subweapons/hatchetthrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 2 a_firecustommissile ("hatchet",0,0,-5,1)
		UTHR D 2 a_weaponready (wrf_noswitch)
		UTHR E 1 a_weaponready (wrf_noswitch)
		UNAR DCBA 1 a_weaponready (wrf_noswitch)
		goto ready
		
//Lance
	
	lancethrow:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedlancethrow")
		THRW A 1
		THRW B 2 a_playsound ("subweapons/lancethrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 2 a_firecustommissile ("lance",0,0,-5,1)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		THRW D 2 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_weaponready (wrf_nosecondary|wrf_noswitch)
		SRDG A 5 a_weaponready (wrf_noswitch)
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmedlancethrow:
		UTHR A 1
		UTHR B 2 a_playsound ("subweapons/lancethrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 2 a_firecustommissile ("lance",0,0,-5,1)
		UTHR D 2 a_weaponready (wrf_noswitch)
		UTHR E 1 a_weaponready (wrf_noswitch)
		UNAR DBCA 1 a_weaponready (wrf_noswitch)
		goto ready
		

//dagger
	
	daggerthrow:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmeddaggerthrow")
		THRW A 1
		THRW B 1 a_playsound ("subweapons/daggerthrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 1 a_firecustommissile("dagger",random(-5,5),0,-5,-1,0,random(-4,4))
		THRW C 1 a_playsound ("subweapons/daggerthrow")
		TNT1 A 0 a_firecustommissile("dagger",random(-3,3),0,-5,-1,0,random(-3,3))
		TNT1 A 0 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW D 1 a_playsound ("subweapons/daggerthrow") 
		TNT1 A 0 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_firecustommissile("dagger",random(-6,6),0,-5,-1,0,random(-2,3))
		TNT1 A 0 a_weaponready (wrf_nosecondary|wrf_noswitch)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		SRDG A 5 a_weaponready (wrf_noswitch)		
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmeddaggerthrow:
		UTHR A 1
		UTHR B 1 a_playsound ("subweapons/daggerthrow")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 1 a_firecustommissile("dagger",random(-3,3),0,-5,-1,0,random(-3,3))
		UTHR C 1 a_playsound ("subweapons/daggerthrow")
		TNT1 A 0 a_firecustommissile("dagger",random(-3,3),0,-5,-1,0,random(-3,3))
		UTHR D 1 a_playsound ("subweapons/daggerthrow")
		TNT1 A 0 a_firecustommissile("dagger",random(-3,3),0,-5,-1,0,random(-3,3))		
		UNAR DCBA 1 a_weaponready (wrf_noswitch)
		goto ready
		

//torch

	torchthrow:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedtorchthrow")
		THRW A 2
		THRW B 2
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 3 a_firecustommissile ("torch",0,0,-5,1)
		THRW D 3 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_weaponready (wrf_nosecondary|wrf_noswitch)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		SRDG A 5 a_weaponready (wrf_noswitch)
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmedtorchthrow:	
		TNT1 A 0 
		TNT1 A 0 
		UTHR A 2
		UTHR B 2
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 2 a_firecustommissile ("torch",0,0,-5,1)
		UTHR D 2 a_weaponready (wrf_noswitch)
		UTHR E 1 a_weaponready (wrf_noswitch)
		UNAR DCBA 1 a_weaponready (wrf_noswitch)
		goto ready

//boomerang
	
	boomerangthrow:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedboomerangthrow")
		THRW A 1
		THRW B 2 
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 2 a_firecustommissile ("boomerang",0,0,-5,1)
		THRW D 2 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_weaponready (wrf_nosecondary|wrf_noswitch)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		SRDG A 5 a_weaponready (wrf_noswitch)
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmedboomerangthrow:
		UTHR A 1
		UTHR B 2
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 2 a_firecustommissile ("boomerang",0,0,-5,1)
		UTHR D 2 a_weaponready (wrf_noswitch)
		UTHR E 1 a_weaponready (wrf_noswitch)
		UNAR DBCA 1 a_weaponready (wrf_noswitch)
		goto ready


//Shatter Bomb
	
	BombToss:
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedBombToss")
		THRW A 2
		THRW B 2 
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		THRW C 3 a_firecustommissile ("ShatterBomb",0,0,0,1)
		THRW D 3 a_weaponready (wrf_nosecondary|wrf_noswitch)
		THRW E 1 a_weaponready (wrf_nosecondary|wrf_noswitch)
		TNT1 A 0 a_giveinventory ("subcombo",1)
		SRDG A 5 a_weaponready (wrf_noswitch)
		TNT1 A 0 a_takeinventory ("subcombo",99)
		goto realready
	unarmedBombToss:
		UTHR A 2
		UTHR B 2
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		UTHR C 2 a_firecustommissile ("ShatterBomb",0,0,-5,1)
		UTHR D 2 a_weaponready (wrf_noswitch)
		UTHR E 1 a_weaponready (wrf_noswitch)
		UNAR DBCA 1 a_weaponready (wrf_noswitch)
		goto ready
		


//Trine Volgue

	StaffDraw:
		TNT1 A 0
		TNT1 A 2
		TNT1 A 0 a_giveinventory ("usingsubweapon", 1)
		TRVL ACEF 1	
	Staffshot:
		TNT1 A 0
		TNT1 A 0 A_FireCustomMissile("spreadarrow",-8,0,0,0,0)
		TNT1 A 0 A_FireCustomMissile("spreadarrow",8,0,0,0,0)
		TNT1 A 0 a_playsound ("subweapons/Trineshot1",0)
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		TNT1 A 0 a_giveinventory ("usingsubweapon", 1)
		TRVL G 2 bright a_firecustommissile ("TwoArrow")
		TRVL HIJK 1 bright
		TNT1 A 0 a_giveinventory ("staffready",1)
		TNT1 A 0 a_refire ("staffammocheck")
		goto staffwait
	staffammocheck:
		TNT1 A 0
		TRVL F 1 a_jumpifinventory ("subweaponammo",1,"staffshot")
		goto stafflower
	Staffwait:
		TRVL F 10 a_weaponready (WRF_NOBOB|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		TNT1 A 0 a_takeinventory ("staffcharge",99)
		TRVL F 20 a_weaponready (WRF_NOBOB|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
	stafflower:	
		TRVL LMN 1 a_weaponready (WRF_NOBOB)
		TNT1 A 0 a_takeinventory ("staffready",99)
		TNT1 A 2 
		goto realready

//Omen warhammer

	hammersmash:
		TNT1 A 0
		TNT1 A 0 a_checkfloor ("hammerthrow")
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhammersmash")
		SRDG B 1 a_firecustommissile ("hammermelee")
		OMEN A 1 ThrustThingZ (0, 80, 0, 1)
		OMEN A 1 
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "hammerimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "hammerwall")
		goto hammerfall
	unarmedhammersmash:
		TNT1 A 0
		TNT1 A 0 a_checkfloor ("hammerthrow")
		OMEN A 1 a_firecustommissile ("hammermelee")
		OMEN A 1 ThrustThingZ (0, 80, 0, 1)
		OMEN A 1
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "hammerimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "hammerwall")
	hammerfall:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_checkfloor ("hammerthrow")
		OMEN A 1 ThrustThingZ (0, 80, 1, 1)
		TNT1 A 0 A_JumpIf (velz <= -45, "grandfall")
		loop
	grandfall:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_JumpIf (velz < 0, "grandhammer")
		OMEN A 1 ThrustThingZ (0, 80, 1, 1)
		loop
	grandhammer:
		TNT1 A 0
		OMEN BCH 1
		OMEN J 1
		OMEN K 1
		TNT1 A 0 a_firecustommissile ("grandhammerattack")
		TNT1 A 0 ThrustThingZ (0, 30, 0, 1)
		TNT1 A 30
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhammerend")
		SRDG CB 1
		goto realready
	hammerthrow:
		TNT1 A 0 
		TNT1 A 0 
		OMEN A 2
		OMEN B 1
		OMEN C 1 a_firecustommissile ("hammermelee")
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "hammerimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "hammerwall")
		OMEN D 1 
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "hammerimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "hammerwall")
		OMEN D 1 
		TNT1 A 0 a_jumpifinventory ("hammerhit", 1, "hammerimpact")
		TNT1 A 0 a_jumpifinventory ("hammermiss", 1, "hammerwall")
		TNT1 A 0 a_takeinventory ("subweaponammo",1)
		TNT1 A 0 a_throwgrenade ("crashhammer",3,15,8,0)
		OTHW AB 1 
		OTHW C 1
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhammerend")
		OWAL C 0 a_takeinventory ("hammerhit", 99)
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		TNT1 A 8
		SRDG CB 1
		goto realready
	hammerimpact:
		OMEN DEF 1 
		OMEN G 1
		OMEN H 1
		OMEN I 1
		OMEN J 1
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		OMEN K 1 a_takeinventory ("hammerhit", 99)
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhammerend")
		SRDG CB 1
		goto realready
	hammerwall:
		OMEN D 1
		TNT1 A 0 a_recoil (15)
		OWAL ABC 1
		OWAL C 0 a_takeinventory ("hammerhit", 99)
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		TNT1 A 0 a_jumpifinventory ("unarmedcheck", 1, "unarmedhammerend")
		SRDG CB 1
		goto realready
	unarmedhammerend:
		TNT1 A 0
		OWAL C 0 a_takeinventory ("hammerhit", 99)
		OWAL C 0 a_takeinventory ("hammermiss", 99)
		UNAR DCBA 1 a_weaponready (wrf_noswitch)
		goto ready
	}
}



//==================================================
//============PROJECTILES AND MELEE=================
//==================================================

actor thrownsword
{
	+notimefreeze
	+skyexplode
	+thruspecies
    +EXTREMEDEATH
	+bright
	+forcepain
	+thruactors
	+hexenbounce
    species "friendly"
	projectile
	-noblockmap
	xscale 0.75
	yscale 0.50
	radius 13
	height 10
	speed 40
	Bouncecount 3
	damage (750)
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		BMSR ABCD 1 bright a_spawnitemex ("throwstrike",0,0,0)
		BMSR ABCD 1 bright a_spawnitemex ("throwstrike",0,0,0)
		TNT1 A 0 a_changeflag ("thruactors",0)
		BMSR ABCD 1 bright a_spawnitemex ("throwstrike",0,0,0)
		BMSR ABCD 1 bright 
		TNT1 A 0 a_changeflag ("nogravity",0)
		goto falling
	falling:
		BMSR ABCD 1 bright 
		loop
	death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("weapons/vblwal",0)
		TNT1 A 0 a_spawndebris ("bladespark")  
		TNT1 A 1 a_spawnitemex ("droppedsword",-5,0,0,frandom(-8,-3), frandom(-8,-3), frandom(3,8))
		TNT1 A 0 a_spawndebris ("bladespark")  
		FLMS ABCDE 1
		stop
	crash:
	xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 1 a_spawnitemex ("droppedsword",-5,0,0,frandom(-8,-3), frandom(-8,-3), frandom(3,8))
		TNT1 A 0 a_playsound ("sword/throwhit",0,1,0,0.7)
		TNT1 A 0 Radius_Quake (2,10,0,10,0)
		TNT1 A 0 a_explode (250,180,0,180)
		FLHT ABCDE 1
		stop
	}
}



actor droppedsword : custominventory
{
	+notimefreeze
	+dropped
	+bright
	+DONTGIB
	+floorclip
	Inventory.pickupmessage "Recovered your sword"
	Inventory.pickupsound "powerups/subweapon"
	scale 1
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		goto spinning
	spinning:
		TNT1 A 0 A_JumpIf(floorz == z, "stucksword")		
		FLSW ABCDEFGH 2 A_JumpIf(floorz == z, "stucksword")	
		TNT1 A 0 A_JumpIf(floorz == z, "stucksword")
		loop
	stucksword:
		TNT1 A 0
		FLSW I 220
		TNT1 A 3
		FLSW I 3
		TNT1 A 3
		FLSW I 3
		TNT1 A 2
		FLSW I 2
		TNT1 A 2
		FLSW I 2
		TNT1 A 2
		FLSW I 2
		TNT1 A 2
		FLSW I 2
		TNT1 A 2
		FLSW I 2
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		TNT1 A 1
		FLSW I 1
		goto death
	death:
		TNT1 A 0
		HWRP ABCD 1 bright
		stop
	pickup:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("thrownswordcooldown",999)
		TNT1 A 1 a_takeinventory ("unarmedcheck",99)
		stop
	}
}


ACTOR swordattack1 : fastprojectile
{  
   +notimefreeze
   Radius 8
   Height 8
   PROJECTILE
   RENDERSTYLE Translucent
   speed 120
   damage (60)
   ALPHA 0.90
   +bright
   +dontblast
   +LOOKALLAROUND
   +bloodsplatter
   +FORCEXYBILLBOARD
   +thruspecies
   species "friendly"
   damagetype "BlazMelee"
   scale 0.75
   States
   {
   Spawn:
		TNT1 A 1
		Stop
   xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount1", 1, AAPTR_TARGET)
		HFX8 AABBCC 1
		stop
   Death:
        TNT1 A 0
		TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop	  
   Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop
	}
}

actor ATKringstrike : swordattack1
{
	damage (50)
	speed 40
	states
	{
	Spawn:
		SWAV A 4
		goto fadeout
   xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit",0,0.3)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		HFX8 AABBCC 1
		stop
   Death:
        TNT1 A 0
		TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		VFX2 A 2 A_PlaySound("weapons/vblwal",0,0.3)
		VFX2 BCD 2
		Stop	  
   Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")
		VFX2 A 2 A_PlaySound("weapons/vblwal",0,0.3)
		VFX2 BCD 2
		Stop
	Fadeout:
		TNT1 A 1 a_stop
		stop
	}
}	

actor swordattack2 : swordattack1
{
	damage (70)
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit2",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount2", 1, AAPTR_TARGET)
		HFX9 AABBCC 1
		//BLSH ABCDEFG 1
		stop

	}
}

actor swordattack3 : swordattack1
{
	damage (80)
	xscale 0.50
	yscale 0.35
	speed 120
	+forcepain
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("gauntlet/darthit",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount3", 1, AAPTR_TARGET)
		STAB ABCDEE 1
		stop
	}
}


actor swordattack4 : swordattack1
{
	damage (100)
	scale 1
	speed 160
	+forcepain
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("shiningswordattack1",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		WLSH ABCDEFG 1
		stop
	}
}
 
actor ATKringwave : swordattack4
{
	damage (85)
	speed 30
	+extremedeath
	states
	{
	spawn:
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright
		TNT1 A 0 a_spawnitem ("wavetrail")
		SWAV A 1 bright 
		TNT1 A 0 a_spawnitem ("wavetrail")
	death:
		TNT1 A 0 a_stop
		TNT1 A 1
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("shiningswordattack1",0)
		WLSH ABCDEFG 1
		stop
	}
}

actor PowerATKringwave : ATKringwave
{
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("poweredtear/cleave",0)
		TNT1 A 0 A_GiveInventory("Smalllifedrain",1, AAPTR_TARGET)
		TNT1 A 0 A_jumpifintargetinventory ("Swordcharger", 1, "returnmana")
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespirit")
		PLSH ABCDFGHI 1 bright
		stop
	givespirit:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_givetotarget ("spiritforce", 1)
		PLSH ABCDFGHI 1 bright
		stop
	Returnmana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespiritmana")		
		TNT1 A 0 A_giveinventory ("arcaneforce", 2, AAPTR_TARGET)   
		PLSH ABCDFGHI 1 bright
		stop
	GiveSpiritMana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_giveinventory ("arcaneforce", 2, AAPTR_TARGET)   
		TNT1 A 0 a_givetotarget ("spiritforce", 1)
		PLSH ABCDFGHI 1 bright
		stop
		}
}


actor wavetrail
{
	alpha 0.60
	Xscale 2.5
	yscale 2
	projectile
	+clientsideonly
	+noclip
	+dontblast
	scale 1
	states
	{
	spawn:
		TNT1 A 0
		SWAV A 2 bright a_fadeout (0.08)
		loop
	}
}
	
actor swordattack5
{
	projectile
	-noblockmap
    +dontblast
	+shootable
	+noblood
	+ripper
	+hexenbounce
	+thruspecies
	species "friendly"
	renderstyle add
	seesound swordwavebounce
	alpha 0.80
	Radius 18
	height 18
	Xscale 2.5
	yscale 2
	speed 30
	damage (60)
    damagetype "BlazMelee"
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 A_PlaySound("shiningswordwave", CHAN_VOICE)
		SWAV AAAAAAAA 3
	death:
		SWAV A 1
		stop
	}
}

actor swordattack7 : swordattack1
{
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		SLSH ABCDEFG 1
		stop
	}
}

actor multistrike : swordattack1
{
   States
   {
   Spawn:
		TNT1 A 0
		TNT1 A 1
		Stop
   xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		HFX8 AABBCC 1
		//SLSH ABCDEFG 1
		stop
   Death:
        TNT1 A 0
		TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop	  
   Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop
	}
}

actor throwstrike
{
	projectile
    Radius 30
    Height 30
	scale 1
    Speed 0
	damage (150)
	damagetype "Macepellet"
	+DONTBLAST
	+thruspecies
	species "friendly"
	+bright
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		Stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 A_PlaySound("weapons/vblhit",0,0.5,0,1.8)
		HFX8 AABBCC 1
		//SLSH ABCDEFG 1
		stop
   Death:
        TNT1 A 0
		TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop	  
   Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop
	}
}

//========================
//---SWORD TECH ATTACKS---
//========================

//WARDING CYCLONE

actor wardingcyclone
{
    Projectile
	+bloodlessimpact
	+ripper
	+notimefreeze
	+FORCEXYBILLBOARD	
	+DONTBLAST
	+thruspecies
	seesound "subweapons/tornadoshot"
	species "friendly"
	renderstyle add
	alpha 0.95
	scale 1
	Radius 18
	Height 12
	Speed 15
	Damage (20)
	//reactiontime 7
	states
	{
	spawn:
		TNT1 A 0 radius_quake (2,8,0,20,0)
		TNT1 A 0 a_radiusthrust (-1000,120,0,120)
		TNDO AA 2 a_spawnitem ("cyclonetrail")
		TNT1 A 0 radius_quake (2,8,0,20,0)
		TNT1 A 0 a_radiusthrust (-1000,150,0,150)
		TNDO BB 2 a_spawnitem ("cyclonetrail")
		TNT1 A 0 radius_quake (2,8,0,20,0)
		TNT1 A 0 a_radiusthrust (-1000,150,0,150)
		//TNT1 A 0 a_giveinventory ("blastradius",1)
		TNDO CC 2 a_spawnitem ("cyclonetrail")
		TNT1 A 0 radius_quake (2,8,0,20,0)
		TNT1 A 0 a_radiusthrust (-1000,100,0,100)
		//TNT1 A 0 a_giveinventory ("blastradius",1)
		//TNT1 A 0 a_countdown
		goto death
	death:
		TNT1 A 0 
		TNT1 A 0 a_stop
		TNT1 A 0 radius_quake (2,20,0,20,0)
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 a_spawnitemex ("cyclonesplash",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 0 a_spawnitemex ("gemtornado")
		TNT1 A 1
		stop
	}
}


actor cyclonetrail
{
	renderstyle add
	alpha 0.80
	+nointeraction
	+clientsideonly
	scale 0.8
	+DONTBLAST
	states
	{
	spawn:
		TNT1 A 0
		TNDO CBA 3
		TNT1 A 0 a_spawnitem ("cyclonetrail2")
	death:
		TNT1 A 0 a_jump (255, "var1","var2","var3")
		loop
	var1:
		STTO ABCD 2
		TNT1 A 0 
		stop
	var2:
		STTO DBCA 2
		TNT1 A 0 
		stop
	var3:
		STTO CDAB 2
		TNT1 A 0 
		stop
	}
}

actor cyclonetrail2 : cyclonetrail
{
	alpha 0.60
	scale 0.6
	states
	{
	spawn:
		TNDO CAB 2
	death:
		TNT1 A 0 a_jump (255, "var1","var2","var3")
		loop
	var1:
		STTO ABCD 2
		TNT1 A 0 
		stop
	var2:
		STTO DBCA 2
		TNT1 A 0 
		stop
	var3:
		STTO CDAB 2
		TNT1 A 0 
		stop
	}
}

ACTOR GemTornado
{
    Radius 3
    Height 5
    Speed 0
	RenderStyle Add
	Alpha 0.3
	damage (0)
    PROJECTILE
	+thruspecies
	species "friendly"
	+BRIGHT
    +THRUACTORS
    -SHOOTABLE
	+DONTBLAST
	Reactiontime 25
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 radius_quake (1,10,0,8,0)
		TNT1 A 0 a_playsound ("swordtech/galevortex",6,1,1,0.5)
		TNT1 A 0 a_radiusthrust (-700,500,RTF_NOIMPACTDAMAGE,500)
		WTOR AA 1
		TNT1 A 0 a_radiusthrust (-600,300,RTF_NOIMPACTDAMAGE,300)
		WTOR BB 1
		TNT1 A 0 a_radiusthrust (-500,300,RTF_NOIMPACTDAMAGE,300)
		WTOR CC 1
		TNT1 A 0 a_radiusthrust (-400,300,RTF_NOIMPACTDAMAGE,300)
		WTOR DD 1
		TNT1 A 0 a_radiusthrust (-200,300,RTF_NOIMPACTDAMAGE,300)
		TNT1 A 0 a_countdown
		TNT1 A 0 a_jump (150,"flincher")
		loop
	flincher:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("windflinch")
		WTOR A 1
		goto spawn
   Death:
		TNT1 A 0
		TNT1 A 0 a_stopsound(6)
	fadeout:
		WTOR A 2
		WTOR B 2
		WTOR C 2
		WTOR D 2
		TNT1 A 0 a_fadeout(0.05,1)
		loop
   }
}

actor windflinch
{
	projectile
    Radius 150
    Height 100
    Speed 0
	damage (0)
	renderstyle add
	alpha 0.50
	+Thruspecies
	species "friendly"
	+bloodlessimpact
	+noblood
	+floorhugger
	+RIPPER
    -SHOOTABLE
	+DONTBLAST
	+FORCEPAIN
	scale 6
	states
	{
	spawn:
		TNT1 A 2
		stop
	death:
		TNT1 A 0
		stop
	}
}

	
	
//Shield Splash effect
//shamelessly referenced from Wildweasel's Terrorists
//Which in turn was referenced from LWM's hammerhound

actor shieldsplash
{
	Speed 40
	Radius 6
	Height 6
	alpha 0.90
	scale 0.50
	renderstyle add
	PROJECTILE
	+thruspecies
	species "friendly"
	+dontblast
	damage (0)
	States
	{
	Spawn:
		RKPF ABCD 2 a_bishopmissileweave
	Death:
		RKPF D 1
		Stop
	}
}


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


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


//ICE SLASHER

actor iceslash : swordattack1
{
	damagetype "blazice"
	damage (100)
	+FORCEPAIN
	states
	{
	xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 A_PlaySound("swordtech/iceslashhit",0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)
		TNT1 AAAAAAAAAAA 0 a_spawnitemex ("iceflinch",random(-4,4),random(-4,4),0,random(-100,100)/10.0,random(-100,100)/10.0,0)
		ICHT ABCDE 1
		stop
	}
}

actor iceflinch
{
	projectile
	speed 10
	damage (0)
	+forcepain
	+nointeraction
	+thruspecies 
	+bloodlessimpact
	+ripper
	species "friendly"
	scale 0.50
	states
	{
	spawn:	
		TNT1 A 0
		WTL1 A 1 bright
		TNT1 A 0 a_changeflag ("nointeraction",0)
		WTL1 A 8 Bright 
		Stop
	}
}


actor icicle
{
	projectile
	+dontblast
	+thruspecies
	+bright
	damagetype "blazice"
	species "friendly"
	Radius 12
	height 12 
	scale 1
	speed 30
	damage (80)
	states
	{
	spawn:
		STHR A 1 a_spawnitemex ("iceparticle",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		loop
	death:
		ICHT ABCDE 2
		stop
	}
}


actor icecrystal
{
	Radius 10
	Height 35
	speed 10
	-solid
	+NOICEDEATH
	+bright
	+thruspecies
	species "friendly"
	mass 2000
	xscale 2
	yscale 2
	renderstyle add
	alpha 0.80
	
	var int user_icetimer;
	states
	{
	spawn:
		ICRY A 2
		ICRY B 2
		ICRY A 1
		goto icetimer
	icetimer:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_icetimer >= 3, "break")
		ICRY BBBBCCCDDEE 2
		ICRY B 5
		TNT1 A 0 a_setuservar("user_icetimer", user_icetimer+1)
		loop
	break:
		ICRY FFGGHH 2
		ICRY A 2
		ICRY IIJJKLLMM 1
		ICRY M 40
		TNT1 A 3
		ICRY M 3
		TNT1 A 3
		ICRY M 3
		TNT1 A 3
		ICRY M 3
		stop
	}
}

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

//FIREBRAND

actor firebrandstrike : swordattack1
{
	damage (850)
	+FORCEPAIN
	scale 2
	states
	{
	spawn:
		TNT1 A 2
		stop
	xdeath:
		TNT1 A 0 
		TNT1 A 0 a_explode (250,300,0,300)
	    TNT1 A 0 Radius_quake (4,10,0,150,0)
		TNT1 A 0 a_playsound ("swordtech/firebrandhit",0,1,0,0.40)
		TNT1 AAA 0 a_spawnitemex("clusterfire",0,0,0,random(-10,10),random(-10,10),8)
		TNT1 AAA 0 a_spawnitemex("clusterfire",0,0,0,random(-10,10),random(-10,10),8)
		TNT1 AAA 0 a_spawnitemex("clusterfire",0,0,0,random(-10,10),random(-10,10),8)
		TNT1 AAA 0 a_spawnitemex("clusterfire",0,0,0,random(-10,10),random(-10,10),8)
		FRFX FGHIIJJ 2
		stop
	death:
		TNT1 A 0
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 a_spawnitemex ("emberparticle",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 AAAAAAAAAAAAA 0 a_spawnitemex ("fireparticle",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3	
		stop
	}
}		


//Firebrand flames and effects

actor clusterfire
{
	projectile
	+notimefreeze
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bloodlessimpact
	+painless
	+ripper
	+bounceonceilings
	+bounceonwalls
	+thruspecies
	+forceradiusdmg
	species "friendly"
	-nogravity
	radius 12
	speed 5
	damage (0)
	bouncecount 2
    gravity 0.8
	states
	{
	spawn:
		FBAL A 1 bright a_spawnitemex ("clustertrail1")
		FBAL B 1 bright a_spawnitemex ("clustertrail2")
		FBAL C 1 bright a_spawnitemex ("clustertrail3")
		FBAL D 1 bright a_spawnitemex ("clustertrail4")
		loop
	death:
		TNT1 A 0 A_Explode (20, 100, 0, 0, 100)
		TNT1 A 0 a_playsound ("gauntlet/midcharge",0)
		TNT1 A 0 a_spawnitemex("stickyfire",0,0,0,random(-10,10),random(-10,10),15)
		FRFX FGHIIJJ 2 bright
		stop
	}
}


actor stickyfire
{
	+notimefreeze
	projectile
	+bloodlessimpact
	+ripper
	+bright
	+forceradiusdmg
	+hexenbounce
	+floorhugger
	+nobossrip
	-nogravity
	renderstyle add
	alpha 0.80
	damage (0)
	speed 0
	+thruspecies
	species "Friendly"
	+FORCEXYBILLBOARD
	radius 20
	height 16
	scale 1
	reactiontime 6
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_stop
	burning:
		BFRE A 2 bright 
		BFRE B 2 bright 
		TNT1 AA 0 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		TNT1 A 0 a_explode (10, 45,0)
		BFRE C 2 bright 
		BFRE D 2 bright 
		TNT1 AA 0 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		TNT1 A 0 a_explode (10, 45,0)
		BFRE E 2 bright 
		BFRE F 2 bright
		TNT1 AA 0 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		TNT1 A 0 a_explode (10, 45,0)
		BFRE G 2 bright 
		BFRE H 2 bright 
		TNT1 AA 0 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		TNT1 A 0 a_explode (10, 45,0)
		BFRE I 2 bright 
		BFRE J 2 bright 
		TNT1 AA 0 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		TNT1 A 0 a_explode (10, 45,0)
		BFRE K 2 bright
		TNT1 A 0 a_countdown 
		loop
	death:
		BFRE KK 2 A_SpawnItemEx("fireparticle",frandom(-21,21),frandom(-21,21),frandom(-21,21),frandom(-1,1),frandom(-1,1),frandom(0,1))
		stop
	}
}


actor clustertrail1
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	Renderstyle Add
	scale 0.80
	Alpha 0.5
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		FBAL A 6 bright
		FBAL A 1 Bright a_fadeout (0.20)
		wait
	}
}

actor clustertrail2 : clustertrail1
{
	states
	{
	spawn:
		TNT1 A 1
		FBAL B 6 bright
		FBAL B 1 Bright a_fadeout (0.20)
		wait
	}
}

actor clustertrail3 : clustertrail1
{
	states
	{
	spawn:
		TNT1 A 1
		FBAL C 6 bright
		FBAL C 1 Bright a_fadeout (0.20)
		wait
	}
}

actor clustertrail4 : clustertrail1
{
	states
	{
	spawn:
		TNT1 A 1
		FBAL D 6 bright
		FBAL D 1 Bright a_fadeout (0.20)
		wait
	}
}

actor fireparticle
{
	radius 3
	height 6
	speed 10
	renderstyle add
	alpha 0.80
	scale 0.25
	projectile
	-nogravity
	+nointeraction
	+FLOORCLIP
	+DONTSPLASH
	+thruactors
	+NOTELEPORT
	+bright
	+clientsideonly
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jump (100,"fire2")
	Fire1:
		TNT1 A 0
		FRFX CDE 2
		TNT1 A 0 a_scalevelocity (0.50)
	fireend:
		TNT1 A 1
		TNT1 A 0 a_scalevelocity (0.50)
		TNT1 AA 0 a_spawnitemex ("emberparticle",random(-2,3),random(-4,2),random(-2,2),random(-1,1),random(-1,2),random(-1,2),0)
		stop
	fire2:
		TNT1 A 0
		TNT1 A 0 a_scalevelocity (0.75)
		FRFX PQRS 2
		TNT1 AAA 0 a_spawnitemex ("emberparticle",random(-2,3),random(-4,2),random(-2,2),random(-1,1),random(-1,2),random(-1,2),0)
		stop
	}
}

actor emberparticle
{
	projectile
	-NOGRAVITY
	+clientsideonly
	gravity 0.10
	speed 3
	+bright
	scale 0.25
	states
	{
	spawn:
		TNT1 A 0
		FRFX MMMNNNOOO 2
	fadeoutloop:
		TNT1 A 0
		TNT1 A 0 a_scalevelocity (0.50)
		FRFX O 1 a_fadeout (0.05)
		loop
	}
}


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

//THUNDER STINGER

actor normalstinger
{
	Projectile
	projectilekickback 600
	speed 48
	damage (350)
	+BLOODSPLATTER
	+thruspecies
	+dontblast
	+bright
	+forcepain
	+bounceonfloors
	species "friendly"
	height 10
	radius 18
	+noblood
	+NOEXTREMEDEATH
	mass 1000000
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		TNT1 A 1 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(floorz == z, "break")
		TNT1 A 0 A_JumpIf(ceilingz == z, "break")
		stop
	break:
		TNT1 A 0
		TNT1 A 0 a_stop
		stop
	death:
		TNT1 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		TNT1 A 1 a_givetotarget ("stingwall", 1)
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1 a_givetotarget ("stingmonster", 1)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (12000,50,0)
		TNT1 A 0 a_playsound ("gauntlet/darthit",0)  
		STAB ABCDEE 1
		TNT1 A 4
		stop
	}
}

actor thunderstinger : fastprojectile
{
	Projectile
	speed 100
	+BLOODSPLATTER
	+thruspecies
	+dontblast
	+bright
	+forcepain
	MissileHeight 8
	MissileType "LitBoltFX"
	species "friendly"
	height 10
	radius 18
	damage (950)
	+EXTREMEDEATH
	projectilekickback 100
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/zapping",0)
		GLIT A 1
		TNT1 A 0 A_Weave(3, 3, random(-5,5), random(-2,2))
		GLIT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,2), random(-2,2))
		GLIT C 1
		TNT1 A 0 A_Weave(3, 3, random(-4,3), random(-2,2))
		GLIT D 1
		TNT1 A 0 A_Weave(3, 3, random(-2,3), random(-2,2))
		GLIT E 1
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GLIT A 1
		TNT1 A 0 A_Weave(3, 3, random(-3,4), random(-2,2))
		GLIT C 1
		TNT1 A 0 A_Weave(3, 3, random(-1,2), random(-2,2))
		GLIT A 1
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GLIT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GLIT D 1
		TNT1 A 0 A_Weave(3, 3, random(-3,3), random(-2,2))
		GLIT E 1
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GLIT A 1
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_spawndebris ("bladespark")  
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/thundercrack",0)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 AAAAAAAAAA 0 a_spawnitemex ("lightningbolt", 0,0,0,random(-15,15),random(-20,20),1,0,0)
		TNT1 A 0 A_radiusthrust (8000,50,0)
		TNT1 A 0 a_explode (150,128,0,0,64)
		TNT1 A 0 a_playsound ("subweapons/lancelightning",5,1,0,0.90)
		FAXE RSTUVWX 2 bright
		TNT1 A 4
		stop
	}
}

ACTOR lightningbolt : FastProjectile
{
	Speed 30
	Damage (125)
	Radius 14
	Height 12
	+hexenbounce
	+thruspecies
	species "friendly"
	RenderStyle Add
	Alpha 0.45
	Scale 0.8
	MissileHeight 8
	MissileType "LitBoltFX"
	bouncecount 4
	PROJECTILE
	+SEEKERMISSILE
	+BRIGHT
	+DONTBLAST
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_Jump(256,"Var1","Var2","Var3")
		Loop
   Var1:
		TNT1 A 0
		TNT1 A 0 a_playsound ("sword/zapping",0)
		GRLT A 1
		TNT1 A 0 A_Weave(3, 3, random(-3,1), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,2), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-4,3), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,3), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_Weave(3, 3, random(-3,4), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-1,2), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,3), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT A 1
		Goto Var1+22
   Var2:
		TNT1 A 0 a_playsound ("sword/zapping",0)
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-3,1), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,2), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-4,3), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_Weave(3, 3, random(-2,3), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,4), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-1,2), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,3), random(-2,2))	   
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,3), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT A 1
		Goto Var2+22
   Var3:
		TNT1 A 0 a_playsound ("sword/zapping",0)
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,1), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,2), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-4,3), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,3), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-3,4), random(-2,2))
		GRLT B 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-1,2), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-4,2), random(-2,2))
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT C 1
		TNT1 A 0 A_Weave(3, 3, random(-3,3), random(-2,2))
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		GRLT A 1
		TNT1 A 0 A_SeekerMissile(10,80,SMF_LOOK,256|SMF_PRECISE)
		TNT1 A 0 A_Weave(3, 3, random(-2,4), random(-2,2))
		GRLT B 1
		Goto Var3+22
   Death:
		TNT1 A 1
		stop
   xdeath:
   crash:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0
		FAXE R 1 bright
		FAXE STUVWX 2 bright
		stop		
   }
}

ACTOR LitBoltFX //Aesthetic. Trail for LitBolt actors.
{
   Radius 8
   Height 5
   RenderStyle Add
   Alpha 0.3
   Scale 0.8
   +clientsideonly
   PROJECTILE
   +BRIGHT
   +THRUACTORS
   +DONTBLAST
   States
   {
   Spawn:
	  TNT1 A 0
      TNT1 A 1
	  TNT1 A 0 A_Jump(256,"Var1","Var2","Var3")
	  Loop
   Var1:
      GRLT ABCBA 1  
	  Stop
   Var2:
      GRLT BCABC 1  
	  Stop
   Var3:
      GRLT CABCB 1	  	
	  Stop
   Death:
      TNT1 A 0
      Stop
   }
}

Actor GemLightningBoltSpawner
{
    Radius 7
    Height 5
    Speed 0
	Scale 0.6
	PROJECTILE
	+thruspecies
	species "friendly"
	+THRUACTORS
	+NOCLIP
	+BRIGHT
	+DONTBLAST
    States
    {
    Spawn:
	   TNT1 A 8
	   TNT1 A 0 a_playsound ("subweapons/lightningstrike",0,0.60,0,0.80)
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar2",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar3",0,-50,0)
	   GLIT C 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar1",0,-50,0)
	   GLIT D 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar2",0,-50,0)
	   GLIT E 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar3",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar1",0,-50,0)
	   GLIT C 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar2",0,-50,0)
	   GLIT D 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar3",0,-50,0)
	   GLIT E 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar2",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("GemLightningBoltVar3",0,-50,0)
	   Stop
    Death:
	   TNT1 A 0
       Stop
    }
}

actor superlightningspawner : GemLightningBoltSpawner
{
	states
	{
	Spawn:
	   TNT1 A 8
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike2",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike3",0,-50,0)
	   GLIT C 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike1",0,-50,0)
	   GLIT D 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike2",0,-50,0)
	   GLIT E 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike3",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike1",0,-50,0)
	   GLIT C 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike2",0,-50,0)
	   GLIT D 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike3",0,-50,0)
	   GLIT E 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike1",0,-50,0)
	   GLIT A 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike2",0,-50,0)
	   GLIT B 1
	   TNT1 A 0 A_SpawnItem("SUPERlightningstrike3",0,-50,0)
	   Stop
    Death:
	   TNT1 A 0
       Stop
    }
}

Actor GemLightningBoltVar1
{
    Radius 7
    Height 5
    Speed 0
    Alpha 1
	Scale 0.8
    PROJECTILE
    RenderStyle Add
	+RANDOMIZE
	+THRUACTORS
	+thruspecies
	species "friendly"
	+NOCLIP
	+DONTSPLASH
	+BRIGHT
	+DONTBLAST
	ReactionTime 1
    States
    {
    Spawn:
       LBLT A 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT B 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT C 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT D 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   GXLT ABCD 1
       Stop
    }
}

actor superlightningstrike1 : GemLightningBoltVar1
{
	scale 2
	states
	{
    Spawn:
       LBLT A 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERlightningDMG",0,0,0)
	   LBLT B 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERlightningDMG",0,0,0)
	   LBLT C 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERlightningDMG",0,0,0)
	   LBLT D 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERlightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   TNT1 A 0
	   TNT1 A 0 a_playsound ("subweapons/lancelightning",5,1,0,0.80)
	   TNT1 A 0 Radius_quake (5,10,0,150,0)
	   TNT1 A 0 a_spawnitemex ("lightningbolt", 0,0,0,random(-15,15),random(-20,20),3,0,0)
	   GXLT ABCD 2
       Stop
    }
}
	
Actor GemLightningBoltVar2
{
    Radius 7
    Height 5
    Speed 0
    Alpha 1
	Scale 0.8
    PROJECTILE
    RenderStyle Add
	+thruspecies
	species "friendly"
	+RANDOMIZE
	+THRUACTORS
	+NOCLIP
	+DONTSPLASH
	+BRIGHT
	+DONTBLAST
	ReactionTime 1
    States
    {
    Spawn:
       LBLT D 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT B 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT C 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT A 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   TNT1 A 0 Radius_quake (5,10,0,150,0)
	   GXLT ABCD 1
       Stop
    }
}

actor superlightningstrike2 : GemLightningBoltVar2
{
	scale 2
	states
	{
	spawn:
	   LBLT D 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT B 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT C 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT A 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   TNT1 A 0 a_playsound ("subweapons/lancelightning",5,1,0,0.80)
	   TNT1 A 0 Radius_quake (5,10,0,150,0)
	   TNT1 A 0 a_spawnitemex ("lightningbolt", 0,0,0,random(-15,15),random(-20,20),3,0,0)
	   GXLT ABCD 2
       Stop
    }
}

Actor GemLightningBoltVar3
{
    Radius 7
    Height 5
    Speed 0
    Alpha 1
	Scale 0.8
    PROJECTILE
    RenderStyle Add
	+thruspecies
	species "friendly"
	+RANDOMIZE
	+THRUACTORS
	+NOCLIP
	+DONTSPLASH
	+BRIGHT
	+DONTBLAST
	ReactionTime 1
    States
    {
    Spawn:
       LBLT C 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT A 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT D 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   LBLT B 1
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("GemLightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   GXLT ABCD 1
       Stop
    }
}

actor superlightningstrike3 : GemLightningBoltVar3
{
	seesound "subweapons/lancelightning"
	scale 2
	states
	{
	spawn:
       LBLT C 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT A 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT D 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   LBLT B 2
	   TNT1 A 0 ThrustThingZ(0,240,1,1)
	   TNT1 A 0 A_SpawnItem("SUPERLightningDMG",0,0,0)
	   TNT1 A 0 A_Countdown
	   Loop
    Death:
	   TNT1 A 0 Radius_quake (5,10,0,150,0)
	   TNT1 A 0 a_playsound ("subweapons/lancelightning",5,1,0,0.80)
	   TNT1 A 0 a_spawnitemex ("lightningbolt", 0,0,0,random(-15,15),random(-20,20),3,0,0)
	   GXLT ABCD 2
       Stop
    }
}
		

ACTOR GemLightningDMG //Spawns as the lightning bolts do to damage enemies.
{
   Speed 2
   Radius 20
   Height 12
   Damage (20)
   PROJECTILE
   +BLOODLESSIMPACT
   +thruspecies
   species "friendly"
   +DONTSPLASH
   +DONTBLAST
   States
   {
   Spawn:
		TNT1 A 1
		Stop
   Death:
		TNT1 A 0
		Stop
   }
}

actor SUPERLightningDMG : GemLightningDMG
{
	+forcepain
	radius 20
	damage (15)
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 a_explode (20,40,0)
		Stop
	}
}

actor lancepuff
{
	+nointeraction
	+clientsideonly
	scale 1
	speed 55
	renderstyle add
	alpha 0.80
	states
	{
	spawn:
		TNT1 A 0
		RKPF ABCD 3
		stop
	death:
		TNT1 A 0
		stop
	}
}

actor particle1
{
	+nointeraction
	+clientsideonly
	scale 2
	speed 55
	renderstyle add
	alpha 0.80
	states
	{
	spawn:
		TNT1 A 0
		LFIR B 6 bright a_fadeout (0.2)
		loop
	death:
		TNT1 A 0
		stop
	}
}

actor particle2 : particle1
{
	states
	{
	spawn:
		LFIR B 6 bright a_fadeout (0.2)
		loop
	}
}

actor particle3 : particle1
{
	states
	{
	spawn:
		LFIR C 6 bright a_fadeout (0.2)
		loop
	}
}

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

//CRESCENT SLASH

actor crescentwave
{
	renderstyle add
	alpha 0.90
	+notimefreeze
	projectile
	+hexenbounce
	+bounceonactors
	-nogravity
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+USEBOUNCESTATE
	+thruspecies
	species "friendly"
	seesound "cannon/lilclang"
	reactiontime 40
	Gravity 0.80
	BounceCount 20
	BounceFactor 2  
	Radius 14
	scale 1.5
	Damage (80)
	Speed 30
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 A_PlaySound("silence", CHAN_VOICE)
	flying:
		TNT1 A 0
		TNT1 A 0 a_countdown
		MNWV A 1 bright 
		TNT1 A 0 a_spawnitemex ("moontrail1")
		MNWV B 1 bright
		TNT1 A 0 a_spawnitemex ("moontrail2")
		MNWV C 1 bright
		TNT1 A 0 a_spawnitemex ("moontrail3")
		MNWV D 1 bright
		TNT1 A 0 a_spawnitemex ("moontrail4")
		loop
	bounce:
		TNT1 A 0 
		TNT1 A 0 A_CustomMissile("axelet", 3, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("axelet", 3, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 a_countdown
		goto flying
	bounce.floor:
		TNT1 A 0 
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 ThrustThing(angle*256/360, 5, 0, 0)
		TNT1 A 0 a_countdown
		goto flying
	death:
		TNT1 A 0 a_changeflag ("nogravity", 1)
		TNT1 A 0 a_playsound ("subweapons/miss")
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile("axelet", 0, 0, random(0,360), CMF_AIMDIRECTION)
		SWMS ABC 3 bright
		stop
	}
}

actor moontrail1
{
	alpha 0.80
	projectile
	+clientsideonly
	+dontblast
	+noclip
	+bright
	scale 0.80
	states
	{
	spawn:
		TNT1 A 0
		MNWV A 1 a_fadeout (0.08)
		loop
	}
}

actor moontrail2 : moontrail1
{
	states
	{
	spawn:
		MNWV B 1 a_fadeout (0.08)
		loop
	}
}

actor moontrail3 : moontrail1
{
	states
	{
	spawn:
		MNWV C 1 a_fadeout (0.08)
		loop
	}
}

actor moontrail4 : moontrail1
{
	states
	{
	spawn:
		MNWV D 1 a_fadeout (0.08)
		loop
	}
}


actor axelet
{
	projectile
	+BLOODSPLATTER
	-nogravity
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+notimefreeze
	+doombounce
	+thruspecies
	species "friendly"
	bouncecount 5
	+nointeraction
	+bright
	seesound "cannon/lilclang"
	Gravity 0.40
	BounceFactor 1.20  
	radius 14
	scale 1
	+USEBOUNCESTATE
	damage (55)
	Speed 20
	reactiontime 30
	states
	{
	spawn:
		MNWV ABCD 1
		TNT1 A 0 thrustthingz (0,10,0,1)		
		TNT1 A 0 a_changeflag ("nointeraction", 0)
	flying:
		MNWV ABCD 2
		TNT1 A 0 a_countdown
		loop
	bounce.floor:
		TNT1 A 0 
		TNT1 A 0 thrustthingz (0,8,0,1)
		TNT1 A 0 ThrustThing(angle*256/360, 5, 0, 0)
		TNT1 A 0 a_countdown
		goto flying
	xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_changeflag ("nogravity", 1)
		TNT1 A 0 a_playsound ("subweapons/hit")
		SWHT ABC 3 bright
		stop
	}
}

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

//Boomerang Sword

actor PowerBoomerangSword 
{
	+notimefreeze
	projectile
	+bloodlessimpact
	+noblood
	+painless
	+FORCEXYBILLBOARD	
	+hexenbounce
	+bounceonactors
	+ripper
	+USEBOUNCESTATE
	+seekermissile
	species "friendly"
	wallbouncefactor 1.1
	bouncefactor 1.1
	radius 20
	height 25
	damage (15)
	xscale 0.75
	yscale 0.50
	speed 30
	reactiontime 80
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_givetotarget ("thrownswordcooldown",400) 
		BMSR EFGH 1 bright a_spawnitemex ("BoomerangSwordDamage",0,0,0,0,0,0,0,0,100)
		TNT1 A 0 a_givetotarget ("thrownswordcooldown",400)
		TNT1 A 0 a_playsound ("swordtech/boomerangswordfly",4)
		TNT1 A 0 a_countdown
		loop
	bounce.wall:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("concussion", 1,"spawn")
		TNT1 A 0 a_rearrangepointers (AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
		TNT1 A 0 A_JumpIfTargetInLOS ("cometoblaz",0,JLOSF_PROJECTILE)
		TNT1 A 0 a_giveinventory ("concussion",1)
		BMSR E 1 a_countdown
		goto spawn
	bounce.monster:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("concussion", 1,"spawn")
		TNT1 A 0 a_rearrangepointers (AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
		TNT1 A 0 A_JumpIfTargetInLOS ("cometoblaz",0,JLOSF_PROJECTILE)
		BMSR E 1 a_countdown
		goto spawn
	
	Cometoblaz:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("concussion", 1,"spawn")
		TNT1 A 0 a_seekermissile (90,90,SMF_PRECISE|SMF_CURSPEED)
		TNT1 A 0 a_seekermissile (90,90,SMF_PRECISE|SMF_CURSPEED)
		TNT1 A 0 a_seekermissile (90,90,SMF_PRECISE|SMF_CURSPEED)
		TNT1 A 0 a_seekermissile (90,90,SMF_PRECISE|SMF_CURSPEED)
		TNT1 A 0 a_giveinventory ("concussion",1)
		BMSR E 1 a_countdown
		goto spawn
	death:
		TNT1 A 0		
		TNT1 A 0 a_stopsound (8)
		TNT1 A 0 a_playsound ("subweapons/miss")
		TNT1 A 0 a_facetarget
		TNT1 A 1 a_spawnitemex ("droppedsword",-5,0,0,frandom(-8,-3), frandom(-8,-3), frandom(3,8))
		stop
	}
}

actor BoomerangSwordDamage
{
	projectile
    Radius 60
    Height 45
	scale 1
    Speed 0
	damage (70)
	+DONTBLAST
	states
	{
	spawn:
		BAL1 A 1
		stop
	death:
		TNT1 A 0
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/hit")
		SWHT ABC 3 bright
		stop
		
	}
}

ACTOR Concussion : Powerup
{
  Powerup.Duration 12
}

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

//Rocket Sword

actor Rocketsword
{
	Projectile
	Radius 10
	Height 10
	Speed 40
	Damage (2000)
	+thruspecies
	scale 1
	+randomize
	+bright
	decal scorch
	seesound "swordtech/rocketswordthrow"
	species "Friendly"
	states
	{
	spawn:
		SWRT A 1
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_explode (550,400,0,0,300)
		TNT1 A 0 a_explode (1000,100,0,0,100)
		TNT1 A 0 a_spawnitemex ("rocketswordexplosion")
		TNT1 A 0 Radius_Quake (4,30,0,60,0)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 0 a_playsound ("swordtech/rocketswordexplosion",0,1,0,0.5)
		TNT1 A 1
	timercounter:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("rockettimer", 200, "done")
		TNT1 A 1 a_givetotarget ("thrownswordcooldown",400)
		TNT1 A 0 a_giveinventory ("rockettimer",1)
		loop
	done:
		TNT1 A 1
		stop
	}
}

actor rockettimer : inventory
{inventory.maxamount 200}

actor RocketSwordExplosion 
{
	+NOINTERACTION
	+clientsideonly
	scale 2
	Radius 4
	Height 5
	+bright
	states
	{
	spawn:
		TNT1 A 0
		SWRT BBCCDDDEEF 1
		SWRT G 1 a_fadeout (0.25,1)
		wait
	}
}



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

//Orbit Sword

actor orbitsword1
{
	projectile
	+noclip
	speed 25
	+Bright
	renderstyle add
	alpha 0.50
	scale 0.60
	reactiontime 45
	translation "0:255=[0,0,0]:[255,255,255]"

	var int user_angle;
	var int user_baseangle;	
	states
	{
	spawn:
		TNT1 A 1
		TNT1 A 1 
		TNT1 A 0 a_givetotarget ("orbitcheck", 1)
		TNT1 A 0 A_SetUserVar(user_baseangle, 0)
		goto orbit
	orbit:
		FLSW A 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW B 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW C 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW D 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW E 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)	
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW F 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW G 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		FLSW H 1 A_Warp(AAPTR_TARGET, cos(user_baseangle)*60, sin(user_baseangle)*60, 32, user_angle, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
		TNT1 A 0 A_SetUserVar("user_angle", user_angle - 16)		
		TNT1 A 0 a_jumpifintargetinventory ("orbitshot", 1, "death")
		TNT1 A 0 a_spawnitemex ("OrbitDamage")
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 1 a_takefromtarget ("orbitcheck",99)
		TNT1 A 1 a_takefromtarget ("orbitcheck",99)
		stop
	}
}


actor orbitsword2 : orbitsword1
{
	states
	{
	spawn:
		TNT1 A 1
		TNT1 A 1 
		TNT1 A 0 A_SetUserVar(user_baseangle, 120)
		goto orbit
	}
}

actor orbitsword3 : orbitsword1
{
	states
	{
	spawn:
		TNT1 A 1
		TNT1 A 1 
		TNT1 A 0 A_SetUserVar(user_baseangle, 240)
		goto orbit
	}
}

actor trisword
{
    +notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD	
	+thruspecies
	+bright
	species "friendly"
	Radius 11
	Height 8
	Speed 40
	Damage (350)
	renderstyle add
	alpha 0.80
	scale 0.60
	translation "0:255=[0,0,0]:[255,255,255]"
	Projectile
	states
	{
	spawn: 
		SWRT A 1
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/miss")
		SWMS ABC 3 bright
		stop
	Crash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/miss")
		SWMS ABC 3 bright
		stop
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/hit")
		SWHT ABC 3 bright
		stop
	}
}


actor OrbitDamage
{
	projectile
    Radius 20
    Height 25
	scale 1
    Speed 0
	damage (25)
	renderstyle add
	alpha 0.50
	+thruspecies
	Species "friendly"
	Damagetype "Blazmelee"
	+DONTBLAST
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/hit",0,0.40)
		SWHT ABC 3 bright
		stop
		
	}
}


//==============================================================================================================================
//---FIST ATTACKS---
//==============================================================================================================================

actor leftjab : fastprojectile
{
	+dontblast
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD		
	+thruspecies
	+forcepain
	species "friendly"
	projectile
	radius 12
	height 16
	speed 55
	Damagetype "Blazmelee"
	damage (30)
	states
	{
	spawn:
		TNT1 AA 1
		TNT1 A 1 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,3,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/punchmiss",0)
		SWMS ABC 3 bright
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,3,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/punchmiss",0)
		SWMS ABC 3 bright
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,3,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/jabhit",0)
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount1", 1, AAPTR_TARGET)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)
		TNT1 A 0 A_giveinventory ("punchpower", 50, AAPTR_TARGET)
		SWHT ABC 3 bright
		stop
	}
}


actor DazeStar : custominventory
{
	+inventory.alwayspickup
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 AAA 0 a_spawnitemex ("StarFX",0,0,height,random(-6,6),random(-7,7),random(3,8))
		TNT1 A 1 A_spawnitemex ("FlinchSpawner",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
		stop
	}
}

Actor StarFX
{
	//+clientsideonly
	+nointeraction
	projectile
	+bright
	Radius 4
	Height 5
	speed 3
	Renderstyle Add
	scale 1
	states
	{
	spawn:
		TNT1 A 0
		STFX A 3
		TNT1 A 0 a_scalevelocity (0.75)
		STFX A 3
		TNT1 A 0 a_scalevelocity (0.50)
		STFX A 2
		TNT1 A 0 a_scalevelocity (0)
		stop
	death:
		TNT1 A 1
		stop
	}
}


actor flinchspawner
{
    Radius 6
    Height 6
    RenderStyle Add
    Alpha 0.95
    +FORCEXYBILLBOARD
    +NOINTERACTION
    +NOCLIP	
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1 A_spawnitemex ("PunchFlinch",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}


actor PunchFlinch
{
	projectile
    Radius 10
    Height 10
    Speed 0
	damage (0)
	renderstyle add
	alpha 0.50
	+bloodlessimpact
	+noblood
	+hexenbounce
	+RIPPER
	+DONTBLAST
	+FORCEPAIN
	+Thruspecies
	species "friendly"
	scale 3
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		stop
	death:
		TNT1 A 0
		stop
	}
}



actor leftstraight : fastprojectile
{
	+dontblast
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD		
	+thruspecies
	species "friendly"
	projectile
	radius 12
	height 16
	+forcepain
	speed 55
	Damagetype "Blazmelee"
	damage (40)
	states
	{
	spawn:
		TNT1 AA 1
		TNT1 A 1 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,3,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/punchmiss",0)
		SWMS ABC 3 bright
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,3,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/punchmiss",0)
		SWMS ABC 3 bright
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/straighthit",0)
		TNT1 A 0 Radius_Quake (2,3,0,10,0)
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount2", 1, AAPTR_TARGET)		
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 A_giveinventory ("punchpower", 50, AAPTR_TARGET)
		SWHT ABC 3 bright
		stop
	}
}

actor lefthaymaker : fastprojectile
{
	+dontblast
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD		
	+thruspecies
	species "friendly"
	projectile
	radius 12
	height 16
	speed 55
	+forcepain
	Damagetype "Blazmelee"
	damage (80)
	states
	{
	spawn:
		TNT1 AA 1
		TNT1 A 1 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/haymakermiss",0)
		SWMS ABC 3 bright
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/haymakermiss",0)
		SWMS ABC 3 bright
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/haymakerhit",0)
		TNT1 A 0 Radius_Quake (3,5,0,10,0)
		TNT1 A 0 a_giveinventory ("incombat", 70)
		TNT1 A 1 a_giveinventory ("combocount3", 1, AAPTR_TARGET)		
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 A_giveinventory ("punchpower", 50, AAPTR_TARGET)
		TNT1 A 0 a_radiusgive ("Dazestar",120,RGF_MONSTERS)
		SWHT ABC 3 bright
		stop
	}
}

actor superpunch : lefthaymaker
{
	damage (100)
	-forcepain
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/haymakerhit",0)
		TNT1 A 0 Radius_Quake (3,5,0,10,0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		SWHT ABC 3 bright
		stop
	}
}

actor uppercut : fastprojectile
{
	+dontblast
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD		
	+thruspecies
	+forcepain
	species "friendly"
	projectile
	radius 12
	height 16
	speed 55
	Damagetype "Blazmelee"
	damage (250)
	states
	{
	spawn:
		TNT1 AA 1
		TNT1 A 1 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/haymakermiss",0)
		SWMS ABC 3 bright
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/haymakermiss",0)
		SWMS ABC 3 bright
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/crackfisthit",0)
		TNT1 A 0 Radius_Quake (4,6,0,10,0)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 a_radiusgive ("Dazestar",150,RGF_MONSTERS)
		TNT1 A 0 A_giveinventory ("punchpower", 50, AAPTR_TARGET)
		TNT1 A 0 a_radiusthrust (6000,200,RTF_NOIMPACTDAMAGE,200)
		SWHT ABC 3 bright
		stop
	}
}

actor ATKringuppercut : uppercut
{
	damage (300)
	states
	{
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("subweapons/crackfisthit",0)
		TNT1 A 0 Radius_Quake (5,9,0,10,0)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 0 a_radiusgive ("Dazestar",150,RGF_MONSTERS)
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 A_giveinventory ("punchpower", 50, AAPTR_TARGET)
		SWHT ABC 3 bright
		stop
		}
}

actor hammermelee : uppercut
{
	damage (450)
	speed 50
	+extremedeath
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_changeflag ("NOINTERACTION",1)
		TNT1 A 0 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammermiss", 1, AAPTR_TARGET)	
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/hammermiss",0)
		TNT1 AAAAAAAAA 0 A_SpawnItemEx("EGemRockSmall",0,0,3,random(-3,3),random(-3,3),random(2,4),random(0,359),32)
		TNT1 A 10 
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammermiss", 1, AAPTR_TARGET)	
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/hammermiss",0)
		TNT1 A 10 
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammerhit", 1, AAPTR_TARGET)	
		TNT1 A 0 a_playsound ("subweapons/hammerhit",0)
		TNT1 A 0 Radius_Quake (4,10,0,10,0)
		TNT1 A 0 a_giveinventory ("blastradius",1)
		TNT1 A 8 
		stop
		}
}		


actor judgementmelee : hammermelee
{
	damage (750)
	speed 50
	states
	{
	spawn:
		TNT1 A 1
		TNT1 A 0 a_changeflag ("NOINTERACTION",1)
		TNT1 A 0 a_stop
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammermiss", 1, AAPTR_TARGET)	
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/hammermiss",0)
		TNT1 AAAAAAAAA 0 A_SpawnItemEx("EGemRockSmall",0,0,3,random(-3,3),random(-3,3),random(2,4),random(0,359),32)
		TNT1 A 10 
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammermiss", 1, AAPTR_TARGET)	
		TNT1 A 0 Radius_Quake (1,5,0,10,0)
		TNT1 A 0 a_playsound ("subweapons/hammermiss",0)
		TNT1 A 10 
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_giveinventory ("hammerhit", 1, AAPTR_TARGET)	
		TNT1 A 0 a_playsound ("subweapons/hammerhit",0)
		TNT1 A 0 Radius_Quake (4,10,0,10,0)
		TNT1 A 0 a_spawnitemex ("judgementcaller",0,0,0,20,0,0,0)
		TNT1 A 0 a_spawnitemex ("judgementcaller",0,0,0,20,0,0,45)
		TNT1 A 0 a_spawnitemex ("judgementcaller",0,0,0,20,0,0,315)
		TNT1 A 8 
		stop
		}
}		

actor LariatPunch : custominventory
{
	+inventory.alwayspickup
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/crackfisthit",0)
		TNT1 A 0 damagething (280)
		stop
	}
}

actor punchshield : powerprotection
{
	damagefactor "normal", 0.70
	Powerup.Duration -20
	Powerup.Color 0, 0, 0, 0
    inventory.maxamount 1
    +INVENTORY.AUTOACTIVATE
}




		
//Grappler and chain

Actor grapplerglove : Fastprojectile
{
	+bloodlessimpact
	+notimefreeze
	+thruspecies
	Radius 18
	Height 10
	Speed 50
	species "friendly"
	damagetype "grappler"
	Damage (1) //Won't pull at zero damage.
	Projectile
	-NoBlockMap
	+NoBlood
	+NoIceDeath
	+bright
	+DontGib
	+hittracer
	scale 1.5
	RenderStyle Normal
	MaxTargetRange 10
	MaxStepHeight 4
	seesound "grappler/shoot"
	States
	{
	Spawn:
		TNT1 A 0 
		TNT1 A 0 a_jumpifinventory ("grappletimer",20,"cease")
		LINK A 1 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		TNT1 A 0 a_giveinventory ("grappletimer",1)
		loop
	crash:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory ("dontpullme",1,"weakpull",AAPTR_TRACER)
		TNT1 A 0 A_PlaySound("grappler/hit",0)
		CCLW A 0 ACS_NamedExecuteAlways("Hook_HitEnemy", 0, 0, 0, 0)
		GPPL ABCDEF 1
		stop
	Death:
		TNT1 A 0
		//TNT1 A 0 A_CustomMissile("grapplerreturn",0,0,0,0)
		TNT1 AAAAA 0 a_spawndebris ("bladespark")  
		//CCLW A 0 ACS_NamedExecuteAlways("Hook_HitWall", 0, 0, 0, 0)
		VFX2 A 2 A_PlaySound("weapons/vblwal",0)
		VFX2 BCD 2
		Stop
	Xdeath:
		TNT1 A 0
		//TNT1 A 0 A_CustomMissile("grapplerreturn",0,0,0,0)
		TNT1 A 0 A_JumpIfInventory ("dontpullme",1,"weakpull",AAPTR_TRACER)
		TNT1 A 0 A_PlaySound("grappler/hit",0)
		CCLW A 0 ACS_NamedExecuteAlways("Hook_HitEnemy", 0, 0, 0, 0)
		GPPL ABCDEF 1
		Stop
	Weakpull:
		TNT1 A 0
		//TNT1 A 0 A_CustomMissile("grapplerreturn",0,0,0,0)
		TNT1 A 0 A_PlaySound("grappler/hit",0)
		GPPL ABCDEF 1
		Stop		
	cease:
		TNT1 A 0
		TNT1 A 0 a_stop
		//TNT1 A 0 A_CustomMissile("grapplerreturn",0,0,0,0)
		TNT1 A 1
		stop
	}
}

actor silentgrapple : grapplerglove
{
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 20
		stop
	death:
		TNT1 A 0
		TNT1 A 1
		Stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		Stop
	}
}


actor grapplerreturn : loreshot
{
	+bloodlessimpact
	+notimefreeze
	+thruspecies
	+bright
	Radius 18
	Height 10
	Speed 50
	Damage (1) 
	species "friendly"
	damagetype "grappler"
	scale 1.5
	Projectile
	-NoBlockMap
	+ripper
	+FORCEPAIN
	+NoBlood
	+NoIceDeath
	+DontGib
	+nointeraction
	states
	{
	spawn:
		LINK A 1 A_FaceTarget
		LINK A 0 a_jumpifcloser (60,"grapplestop")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 1 A_FaceTarget
		TNT1 A 0 a_changeflag ("NOINTERACTION",0)
		LINK A 0 a_jumpifcloser (60,"grapplestop")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 1 A_FaceTarget
		LINK A 0 a_jumpifcloser (60,"grapplestop")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 a_spawnitem ("grapplechain")
		LINK A 0 A_CustomMissile("grapplerreturn",0,0,0,0)
		stop
	grapplestop:
		TNT1 A 0
		stop
	crash:
		TNT1 A 0 
		stop
	death:
		TNT1 A 0
		stop
	}
}

actor grapplechain 
{
	+nointeraction
	+notimefreeze
    +FORCEXYBILLBOARD	
	+dontblast
	+bright
	scale 1.5
	radius 4
	height 4
	+clientsideonly
	states
	{
	Spawn: 
		TNT1 A 0
		LINK A 0 a_playsound ("grappler/chain",0)		
		LINK A 13
		stop
	}
}

actor dontpullme : inventory
{inventory.maxamount 1}


//--POWER SWORD PROJECTILES AND PUFF--//

actor powercleave 
{
	projectile
	+extremedeath
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+thruspecies
	+bright
	+forcepain
	species "friendly"
	radius 12
	speed 40
	damage (500)
    Scale 1
	Damagetype "Blazmelee"
	alpha 0.95
	states
	{
	spawn:
		TNT1 AAA 1
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("poweredtear/cleave",0)
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		TNT1 A 0 A_GiveInventory("lifedrain",1, AAPTR_TARGET)
		TNT1 A 0 A_jumpifintargetinventory ("Swordcharger", 1, "returnmana")
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespirit")
		PLSH ABCDFGHI 1 bright
		stop
	givespirit:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_givetotarget ("spiritforce", 1)
		PLSH ABCDFGHI 1 bright
		stop
	Returnmana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespiritmana")		
		TNT1 A 0 A_giveinventory ("arcaneforce", 3, AAPTR_TARGET)   
		PLSH ABCDFGHI 1 bright
		stop
	GiveSpiritMana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_giveinventory ("arcaneforce", 3, AAPTR_TARGET)   
		TNT1 A 0 a_givetotarget ("spiritforce", 1)
		PLSH ABCDFGHI 1 bright
		stop
		
	death:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3	
		stop
	Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3
		stop
	}
}

actor cleave1
{
	+nointeraction
	+noclip
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bounceonwalls
	bouncecount 2
	radius 12
	speed 40
	damage (100)
    Scale 1
	alpha 0.95
	states
	{
	spawn:
		TNT1 A 2
		TNT1 A 0 a_changeflag ("nointeraction", 0)
		TNT1 A 0 a_changeflag ("noclip", 0)
		SWAV AAAAAAA 2 bright
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("poweredtear/cleave",0)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 0, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 60, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 120, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 180, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 240, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 300, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 A_CustomMissile("cleave2", 0,0, 360, CMF_AIMDIRECTION | CMF_TRACKOWNER)
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		TNT1 A 0 A_GiveInventory("lifedrain",1, AAPTR_TARGET)
		PLSH ABCDFGHI 1 bright
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3
		VFX2 BCD 3	
		stop
	Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3
		stop
	}
}

actor cleave2
{
	projectile
	+dontblast
	+thruspecies
	species "friendly"
	Radius 12
	height 12 
	scale 1
	speed 30
	damage (15)
	states
	{
	spawn:
		STHR A 5 bright
		goto death
	death:
		STHR A 1 
		stop
	}
}

actor ATKringthrust : cleave2
{
	projectile
	+dontblast
	+extremedeath
	Radius 12
	height 12 
	scale 1
	speed 50
	damage (60)
	states
	{
	spawn:
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		STHR A 1 bright
		TNT1 A 0 a_spawnitem ("thrusttrail")
		goto death
	death:
		TNT1 A 0 a_stop
		TNT1 AAA 0 a_spawndebris ("missiledebris1")
		TNT1 AAAAAA 0 a_spawnitemex ("missiledebris2",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 0 a_fadeout (0.50)
		MMXP ABCDEFGHIJKL 2
		stop
	crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 a_spawndebris ("bladespark")
		VFX2 A 2 A_PlaySound("weapons/vblwal",0,0.3)
		VFX2 BCD 2
		Stop

	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gauntlet/darthit",0)
		TNT1 AA 0 a_spawndebris ("missiledebris1")
		TNT1 AAAA 0 a_spawnitemex ("missiledebris2",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 0 a_fadeout (0.50)
		TNT1 A 0 A_GiveInventory("Smalllifedrain",1, AAPTR_TARGET)
		TNT1 A 0 A_jumpifintargetinventory ("Swordcharger", 1, "returnmana")
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespirit")
		STAB ABCDEE 1 Bright
		stop
	givespirit:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_givetotarget ("spiritforce", random(0,1))
		STAB ABCDEE 1 Bright
		stop
	Returnmana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_jumpifintargetinventory ("unleasher", 1, "givespiritmana")		
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		PLSH ABCDFGHI 1 bright
		stop
	GiveSpiritMana:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_giveinventory ("arcaneforce", 1, AAPTR_TARGET)   
		TNT1 A 0 a_givetotarget ("spiritforce", random(0,1))
		PLSH ABCDFGHI 1 bright
		stop
	}
}

actor thrusttrail
{
	alpha 0.60
	projectile
	+clientsideonly
	+dontblast
	+noclip
	scale 1
	states
	{
	spawn:
		TNT1 A 0
		STHR A 2 bright a_fadeout (0.08)
		loop
	}
}


actor lifedrain : custominventory 
{
	inventory.maxamount 1
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower(100, "drain")
		stop
	drain:
		TNT1 A 0 a_giveinventory ("healchecker",1)
		TNT1 A 0 a_playsound ("cannon/lifedrain",0)
		TNT1 AAAAAAAAAAAAAA 0 a_spawnitemex ("MAXparticle",random(-8,16),random(-8,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 0 a_giveinventory ("health", 12)
		stop
	}
}

actor SmallLifedrain : Lifedrain
{
	states
	{
	drain:
		TNT1 A 0 a_giveinventory ("healchecker",1)
		TNT1 A 0 a_playsound ("cannon/lifedrain",0)
		TNT1 AAAAAAAAAAA 0 a_spawnitemex ("MAXparticle",random(-8,16),random(-8,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		TNT1 A 0 a_giveinventory ("health", 5)
		stop
	}
}
	


//----FATAL DRAW----

actor fatalslash : fastprojectile
{
	projectile
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+PUFFGETSOWNER
	species "friendly"
	+thruspecies
	+bright
	radius 12
	speed 40
	damage (4000)
    Scale 1
	DamageType "Fatalslash"	
	alpha 0.95
	states
	{
	spawn:
		TNT1 AAAAAAA 1
		stop
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("fataldraw/cut",0,1,0,0.7)
		TNT1 A 0 a_bfgspray ("FatalAOE", 50, 20)
		TNT1 A 0 a_quake (1,6,0,15)
		PLSH IHGFEDCBA 1 bright
		stop
	death:
		VFX2 A 0
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3	
		stop
	Crash:
		VFX2 A 0
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3
		stop
	}
}

actor FatalAOE
{
	+NOBLOCKMAP
	+NOGRAVITY
	+missile
	+thruspecies
	species "friendly"
	+PUFFGETSOWNER	
	DamageType "Fatalslash"	
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("poweredtear/cleave",0)
		TNT1 A 0 Radius_Quake (2,10,0,20,0)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,0)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,40)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,80)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,120)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,160)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,200)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,240)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,280)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,320)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,360)
		PLSH IHGFEDCBA 1 bright
		stop
	}
}

actor fatalcleave : cleave1
{
	+nointeraction
	+noclip
	+PUFFGETSOWNER
	projectile
    +FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bounceonwalls
	bouncecount 2
	radius 12
	speed 40
	damage (80)
    Scale 1
	alpha 0.95
	DamageType "Fatalslash"	
	states
	{
	spawn:
		TNT1 A 2
		TNT1 A 0 a_changeflag ("nointeraction", 0)
		TNT1 A 0 a_changeflag ("noclip", 0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		SWAV A 1 a_spawnitemex ("cleavetrail",0,0,0)
		stop
	xdeath:
        TNT1 A 0
        TNT1 A 1
		TNT1 A 0 a_playsound ("poweredtear/cleave",0)
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		PLSH IHGFEDCBA 1 bright
		stop
	death:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3
		VFX2 BCD 3	
		stop
	Crash:
        TNT1 A 0
        TNT1 A 1
		VFX2 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		VFX2 A 3 A_PlaySound("poweredtear/clang",0)
		VFX2 BCD 3
		stop
	}
}

actor cleavetrail
{
	+clientsideonly
	+nointeraction
	+DONTBLAST
	projectile
	Radius 4
	Height 5
	speed 3
	Renderstyle Add
	scale 0.80
	Alpha 0.70
	states
	{
	spawn:
		TNT1 A 0
		SWAV AA 1 bright a_fadeout (0.05)
		loop
	death:
		SWAV A 1 bright
		stop
	}
}


actor FatalWave
{
	projectile
    +dontblast
	+ripper
	+thruspecies
	+nobossrip
	species "friendly"
	renderstyle add
	alpha 0.80
	Radius 15
	height 18
	Xscale 4.5
	yscale 2.5
	speed 60
	damage (150)
	DamageType "Fatalslash"	
	reactiontime 6
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 A_PlaySound("shiningswordwave", CHAN_VOICE)
	flight:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("FatalDamager",0,0,0,0,0,0,0,0,0)
		SWAV A 2 
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,0)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,40)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,80)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,120)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,160)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,200)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,240)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,280)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,320)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,360)
		SWAV A 1
		stop
	}
}

actor FatalDamager
{
	projectile
    Radius 40
    Height 12
	scale 1
    Speed 0
	damage (2800)
	+thruspecies
	species "friendly"
	+DONTBLAST
	DamageType "Fatalslash"	
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		stop
	death:
		TNT1 A 1
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,0)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,40)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,80)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,120)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,160)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,200)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,240)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,280)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,320)
		TNT1 A 0 a_spawnitemex("fatalcleave",0,0,20,40,0,0,360)
		PLSH IHGFEDCBA 1 bright
		stop
		
	}
}



actor crackfist
{
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD
	+bright
	+extremedeath
	projectile
	radius 8
	height 16
	speed 45
	damage (120)
	states
	{
	spawn:
		SKYF A 1
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/crackfistmiss")
		SWMS ABC 3 bright
		stop
	crash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/crackfistmiss")
		SWMS ABC 3 bright
		stop
	xdeath:
		TNT1 A 0
		TNT1 A 0 a_playsound ("subweapons/crackfisthit")
		SWHT ABC 3 bright
		stop
	}
}

actor fistshot : crackfist
{
	damage (70)
	-extremedeath
	seesound "subweapons/magefist"
	states
	{
	spawn:
		SKYF A 25
		goto expire
	expire:
		TNT1 A 0
		TNT1 A 1 a_stop
		stop
	}	
}

actor Finalcrackfist : crackfist
{
	+notimefreeze
	+BLOODSPLATTER
	+FORCEXYBILLBOARD
	+extremedeath
	projectile
	radius 8
	height 16
	speed 65
	scale 4
	damage (1500)
	deathsound "magegunner/missileexplode"
	states
	{
	spawn:
		SKYF A 1
		loop
	death:
		TNT1 A 0 a_playsound ("subweapons/crackfistmiss")
		TNT1 A 0 Radius_Quake (2,10,0,32,0)
		TNT1 A 0 a_explode (500, 450, 0, 0, 450)
		TNT1 A 0 a_radiusthrust (50000, 200,0)
		TNT1 AAAAAAA 0 a_spawndebris ("missiledebris1")
		TNT1 AAAAAAAAAAAA 0 a_spawnitemex ("missiledebris2",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		MMXP ABCDEFGHIJKL 2
		stop
	crash:
		TNT1 A 0 a_playsound ("subweapons/crackfistmiss")
		TNT1 A 0 Radius_Quake (2,10,0,32,0)
		TNT1 A 0 a_explode (500, 450, 0, 0, 450)
		TNT1 A 0 a_radiusthrust (50000, 200,0)
		TNT1 AAAAAAA 0 a_spawndebris ("missiledebris1")
		TNT1 AAAAAAAAAAAA 0 a_spawnitemex ("missiledebris2",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		MMXP ABCDEFGHIJKL 2
		stop
	xdeath:
		TNT1 A 0 a_playsound ("subweapons/crackfistmiss")
		TNT1 A 0 Radius_Quake (2,10,0,32,0)
		TNT1 A 0 a_explode (500, 450, 0, 0, 450)
		TNT1 A 0 a_radiusthrust (50000, 200,0)
		TNT1 AAAAAAA 0 a_spawndebris ("missiledebris1")
		TNT1 AAAAAAAAAAAA 0 a_spawnitemex ("missiledebris2",random(-16,16),random(-16,16),random(-10,10),random(-100,100)/20.0,random(-100,100)/20.0,random(-100,100)/20.0,0,160)
		MMXP ABCDEFGHIJKL 2
		stop
	}
}


actor fatalchargespawner
{
	+clientsideonly
	+nointeraction
	projectile
	Radius 4
	Height 5
	speed 3
	Renderstyle Add
	scale 0.50
	Alpha 0.70
	states
	{
	spawn:
		TNT1 A 0
		TNT1 AAAAA 0 a_spawnitemex ("fatalcharge",10,-4,25,Frandom(-100,100)/20.0,Frandom(-100,100)/20.0,Frandom(-100,100)/20.0,0)
		TNT1 AAA 1 A_Warp(AAPTR_MASTER, 5, 0, 0, 0, WARPF_NOCHECKPOSITION)	
		goto death
	death:
		TNT1 A 1
		stop
	}
}

actor fatalcharge
{
	+clientsideonly
	+nointeraction
	+bright
	projectile
	Radius 4
	Height 5
	speed 3
	Renderstyle Add
	scale 0.50
	Alpha 0.70
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 10
		TNT1 A 0 a_scalevelocity (-2)
		WTL1 A 5 
		goto death
	death:
		TNT1 A 1
		stop
	}
}		

actor fatalburst
{
	+clientsideonly
	+nointeraction
	+BRIGHT
	projectile
	Radius 4
	Height 5
	speed 3
	scale 0.80
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("gibs/fatalburst",7,1,0,1.2)
		FRFX F 2
		FRFX G 2
		FRFX H 2
		FRFX I 1
		FRFX J 1
		goto death
	death:
		TNT1 A 1
		stop
	}
}		

actor focusing : powerspeed
{
	Powerup.Duration -1
	Speed 0.50
}	


//==================================================
//================MISC AND TOKENS===================
//==================================================

actor bladespark
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	scale 0.4
	Alpha	1
	Mass	0
	+missile
	+clientsideonly
	+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+bright
	+NOTELEPORT
	States
	{
		TNT1 A 0
		SSPK AAAAAA 1
		Stop
	}
}
	
actor blastradius : artiblastradius
{
+inventory.autoactivate
}

//Good lord look at all of these tokens for all this
//random crap.

actor grappletimer : inventory
{inventory.maxamount 20}

actor swordcharge : inventory
{inventory.maxamount 15}

actor healchecker : inventory
{inventory.maxamount 1}	

actor subcombo : inventory
{inventory.maxamount 1}

actor orbitcheck : inventory
{inventory.maxamount 1}

actor orbitshot : inventory
{inventory.maxamount 1}

actor throwprep : inventory
{inventory.maxamount 33}

actor fakealtfire : inventory
{inventory.maxamount 1}

actor stingcharge : inventory
{inventory.maxamount 50}


actor stingmonster : inventory
{inventory.maxamount 1}

actor stingwall : inventory
{inventory.maxamount 1}

actor slashcounter : inventory
{inventory.maxamount 15}

actor hammerhit : inventory
{inventory.maxamount 1}

actor hammermiss : inventory
{inventory.maxamount 1}

actor Staffready : inventory
{inventory.maxamount 1}

actor Staffcharge : inventory
{inventory.maxamount 30}


actor shieldcount : inventory 
{inventory.maxamount 100}

actor unarmedcheck : inventory
{inventory.maxamount 1}

actor combocount1 : inventory
{inventory.maxamount 1}

actor combocount2 : inventory
{inventory.maxamount 1}

actor combocount3 : inventory
{inventory.maxamount 1}

actor incombat : inventory
{inventory.maxamount 70}

actor swordpowercheck : inventory
{inventory.maxamount 1}

actor throwcharge : inventory
{inventory.maxamount 99}

actor thrownswordcooldown : inventory
{inventory.maxamount 400}

actor usingsword : inventory
{inventory.maxamount 1}

actor usingsubweapon : inventory
{inventory.maxamount 1}

actor powercooldown : inventory
{inventory.maxamount 99}

actor fataldrawtoken : inventory
{inventory.maxamount 1}

actor fistloop : inventory
{inventory.maxamount 8}

actor Lariatprep : inventory
{inventory.maxamount 1}

actor lariatcharge : inventory
{inventory.maxamount 10}

actor punchpower : inventory
{inventory.maxamount 300}

actor leftsuper : inventory
{inventory.maxamount 1}
