actor DragonSword : weapon
{
	Weapon.SelectionOrder 200
	Inventory.RestrictedTo "Artificer"
	Weapon.SlotNumber 1
	+undroppable
	+noalert
	+weapon.noautofire
	weapon.bobstyle smooth
	weapon.bobrangex 0.1
	weapon.bobrangey 0.6
	Tag "Dragon Sword"
	states
	{
	Select:
		TNT1 A 0
		TNT1 A 0
	Riseup:
		D3UP AA 0 a_raise
		D3UP AAAAA 0 a_raise
		RYUS A 1
		loop
	
	Ready:
		TNT1 A 0
		RYUS A 1 a_weaponready
		loop
	Deselect:
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower (1, "deadlower")
	holster:
		TNT1 A 0
		RYUS A 1 a_lower
		TNT1 AAA 0 a_lower
		RYUS A 1 a_lower
		loop

	deadlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 1 a_lower
		wait	
	Fire:
		TNT1 A 0
		RYUS BCD 1
		TNT1 A 1
		TNT1 A 0 a_jumpifinventory ("PowerStrength",1,"SpinSlash")
		TNT1 A 0 a_playsound ("DragonSword/Slash",0)
		RYUS E 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GH 1
		RYUS I 1 a_weaponready (WRF_NOBOB)
		TNT1 A 2 a_weaponready (WRF_NOBOB)
		RYUS JKLM 1 a_weaponready (WRF_NOBOB)
		RYUS A 1 a_weaponready (WRF_NOBOB)
		goto ready
	SpinSlash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("DragonSword/SpinSlash",0)
		RYUS E 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GH 1
		TNT1 A 1

		RYUS V 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GH 1
		TNT1 A 1

		RYUS V 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GH 1
		TNT1 A 1

		RYUS V 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GH 1
		TNT1 A 1

		RYUS V 1 
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,-15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,15)
		RYUS F 0 a_firecustommissile ("ProjectileCutter",0,0,25)
		RYUS F 0 a_firecustommissile ("ProjectileCutter")
		RYUS F 1 a_firecustommissile ("dragonslash")
		RYUS GHI 1
		TNT1 A 8
		RYUS JKLM 1 a_weaponready (WRF_NOBOB)
		RYUS A 1 a_weaponready (WRF_NOBOB)
		goto ready
		
	Altfire:
		TNT1 A 0
		RYUS BCD 1
		TNT1 A 1
		TNT1 A 0 a_jumpifinventory ("PowerStrength",1,"TripleShuriken")
		RYUS NOP 1
		TNT1 A 0 a_playsound ("DragonSword/Shuriken",0)
		RYUS Q 1 a_firecustommissile ("DragonShuriken")
		RYUS ST 1
		RYUS U 1 a_weaponready (WRF_NOBOB)
		TNT1 A 1 a_weaponready (WRF_NOBOB)
		RYUS JKLM 1 a_weaponready (WRF_NOBOB)
		RYUS A 1 a_weaponready (WRF_NOBOB)
		goto ready
	TripleShuriken:
		TNT1 A 0
		RYUS NOP 1
		TNT1 A 0 a_playsound ("DragonSword/Shuriken",0)
		RYUS Q 0 a_firecustommissile ("DragonShuriken",-7)
		RYUS Q 0 a_firecustommissile ("DragonShuriken",7)
		RYUS Q 1 a_firecustommissile ("DragonShuriken")
		RYUS ST 1
		RYUS U 1 a_weaponready (WRF_NOBOB)
		TNT1 A 1 a_weaponready (WRF_NOBOB)
		RYUS JKLM 1 a_weaponready (WRF_NOBOB)
		RYUS A 1 a_weaponready (WRF_NOBOB)
		goto ready

	}
}
	

actor DragonSlash : fastprojectile
{
	Projectile
	speed 64
	damage (80)
	obituary "%o was cut down by %k's Dragon Sword."
	+BLOODSPLATTER
	+thruspecies
	+dontblast
	+bright
	+noextremedeath
	species "player"
	height 8
	radius 8
	mass 2000
	states
	{
	Spawn:
		TNT1 AA 1
		stop
	Death:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 radius_quake (1,2,0,8,0)
		TNT1 A 5 
		stop
	Xdeath:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 radius_quake (1,4,0,8,0)
		TNT1 A 0 a_playsound ("DragonSword/Hit",6)
		B1BL B 1
		B1BL B 1 a_setscale (1.60,0.40)
		B1BL B 1 a_setscale (2.50,0.20)
		B1BL B 2 a_setscale (4.50,0.05)
		stop
	}
}


actor ProjectileCutter
{
	projectile
	+noblood
	+shootable
	+notimefreeze
	+bloodlessimpact
	+thruspecies
	+notargetswitch
	+NORADIUSDMG
	+ripper
	+dontblast
	+hexenbounce
	+painless
	+bright
	-bloodsplatter
	-noblockmap
	damage (0)
	painchance 255
	species "Player"
	radius 24
	height 32
	speed 64
	mass 88000
	states
	{
	spawn:
		TNT1 AA 1
		goto death
	death:
		TNT1 A 0
		TNT1 A 1
		stop
	pain:
		TNT1 A 0
		TNT1 A 0 Radius_Quake (1,8,0,20,0)
		TNT1 A 0 a_changeflag ("NOINTERACTION",1)
		TNT1 A 0 a_playsound ("DragonSword/Hit",6)
		TNT1 A 0 a_stop
		KSPK BCDEFG 1
		stop
	Pain.Postal:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}




actor DragonShuriken : fastprojectile
{
	Radius 10
	Height 3
	Speed 80
	Damage (15)
	Projectile
	species "Player"
	+thruspecies
	+bright
	+dontblast
	+randomize
	scale 0.5
	projectilekickback 200
	states
	{
	Spawn:
		SHKN ABCD 1
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_setscale (1,1)
		TNT1 A 0 a_playsound ("BionicRifle/Miss",0)
		B1BL FGHI 1
		stop
	Xdeath:
		TNT1 A 0 a_setscale (1,1)
		TNT1 A random (1,2)
		TNT1 A 0 a_playsound ("DragonSword/Hit",6)
		B1BL BCDE 2
		stop
	}
}

