/// Made because Unreal 1 lacks a Superweapon at all

ACTOR TKRWU1InstaGib : UWeapon
{
	Weapon.SelectionOrder 1500
	Weapon.SlotNumber 3
	Weapon.AmmoType "TKRWNukeAmmo"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Inventory.PickupMessage "You got the ASMD"
	obituary "%k electrified %o with the Enhanced ASMD."
	Tag "InstaGib ASMD"
	scale 0.1
	Decal plasmascorchlower
	inventory.Icon "TE70A0"
	+WEAPON.NOAUTOAIM
	+CHEATNOTWEAPON
	States
	{
	Select:
		TNT1 A 0 A_PlaySound("TurokRageWars/Weapons/TekCrossbowUp",6)
		ASMD C 1 Offset(67, 100)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD C 1 Offset(54, 81)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD C 1 Offset(32, 69)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD C 1 Offset(22, 58)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD C 1 Offset(10, 47)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD B 1 Offset(7, 39)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD B 1 Offset(2, 34)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD C 1 A_Raise
		Goto Ready
	Deselect:
		TNT1 A 0 a_playsound ("weapons/holster", 0)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(2, 34)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(7, 39)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(10, 47)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(22, 58)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(32, 69)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(54, 81)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		ASMD A 1 Offset(67, 100)
		TNT1 A 1 A_Lower
		Wait
	Ready:
		ASMD A 1 A_Weaponready
		loop
	Fire:
		TNT1 A 0 A_Playsound("Unreal/Weapons/asmd/fire",7)
		TNT1 A 0 A_FireBullets(0,0,1,random(9999,9999),"ASMDpuff",FBF_USEAMMO|FBF_NORANDOM)
		TNT1 A 0 A_FireCustomMissile("ASMDTracer",1,0,8,-2,0,2)
		ASMD BCDEFGHIJKLMNOPQRSTU 2
		ASMD A 6
		TNT1 A 0 A_Refire
		goto Ready
Spawn:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("TKRWNuke",0,0,0,random(1,2),0,5,random(0,360),SXF_NOCHECKPOSITION,0)
    Stop
	}
}

ACTOR ASMDtracer
{
	Damage (0)
	Speed 25
	Radius 2
	Height 2
	PROJECTILE
	-BLOODSPLATTER
	States
	{
	Spawn:
		TNT1 A 1
	Spawnloop:
		TNT1 A 2 A_Spawnitem("ASMDTrail")
		Loop
	Death:
	Crash:
		TNT1 A 0
		Stop
	XDeath:
		TNT1 A 0
		stop
	}
}

ACTOR ASMDTrail
{
	Speed 0
	Mass 0
	+Missile
	scale 0.6
	+LOWGRAVITY
	+NOBLOCKMAP
	+NOGRAVITY
	+NOTELEPORT
	+CANNOTPUSH
	+NODAMAGETHRUST
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0 Nodelay A_Setscale(0.05,0.05)
		SRTR A 1 BRIGHT
		TNT1 A 0 A_Setscale(0.1,0.1)
		SRTR A 1 BRIGHT
		TNT1 A 0 A_Setscale(0.15,0.15)
		SRTR A 1 BRIGHT
		TNT1 A 0 A_Setscale(0.2,0.2)
		SRTR A 2 BRIGHT
		TNT1 A 0 A_Setscale(0.25,0.25)
		SRTR A 2 BRIGHT
		TNT1 A 0 A_Setscale(0.3,0.3)
		SRTR A 2 BRIGHT
		TNT1 A 0 A_Setscale(0.4,0.4)
		SRTR B 1 BRIGHT
		TNT1 A 0 A_Setscale(0.5,0.5)
		SRTR B 1 BRIGHT
		TNT1 A 0 A_Setscale(0.6,0.6)
		SRTR B 1 BRIGHT A_Fadeout(0.15)
		wait
	}
}

Actor ASMDpuff : Bulletpuff
{
	+LOWGRAVITY
	+PUFFONACTORS
	+FORCEXYBILLBOARD
	vspeed 0
	scale 1
	mass 0
	renderstyle add
	damagetype combo
	states
	{
		Spawn:
			TNT1 A 0 Nodelay A_Playsound("asmd/explosion",6,2,0,ATTN_NONE)
			TNT1 A 0 A_SpawnDebris("ASMDSpark",0,0.4,0.2)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(1.4,1.4)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(1.9,1.9)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(2.4,2.4)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(2.9,2.9)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(3.4,3.4)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(3.9,3.9)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(4.4,4.4)
			SRTR B 1 BRIGHT
			TNT1 A 0 A_Setscale(4.9,4.9)
			SRTR B 2 BRIGHT A_Fadeout(0.07)
			wait
	}
}

Actor ASMDcombopuff : Bulletpuff
{
	+LOWGRAVITY
	+PUFFONACTORS
	+FORCEXYBILLBOARD
	mass 0
	vspeed 0
	renderstyle add
	states
	{
		Spawn:
			TNT1 A 0 Nodelay A_Playsound("asmd/comboex",6,2,0,ATTN_NONE)
			TNT1 A 0 A_SpawnDebris("ASMDSpark",0,0.4,0.2)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(1.5,1.5)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(2.0,2.0)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(2.5,2.5)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(3.0,3.0)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(3.5,3.5)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(4.0,4.0)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(4.5,4.5)
			SRTR C 1 BRIGHT
			TNT1 A 0 A_Setscale(5.0,5.0)
			SRTR C 2 BRIGHT A_Fadeout(0.09)
			wait
	}
}

ACTOR ASMDSpark
{
	Health 20
	radius 5
	height 5
	speed 1
	Alpha 0.50
	Scale 0.1
	Mass 0
	+missile
	+LOWGRAVITY
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	+FORCEXYBILLBOARD
	States
	{
		spawn:
			SPRK CCCBBBAAA 1 BRIGHT A_SetTranslucent(.8,1)
			SPRK CCCBBBAAA 1 BRIGHT A_SetTranslucent(.5,1)
			SPRK CCCBBBAAA 1 BRIGHT A_SetTranslucent(.3,1)
			SPRK CCCBBBAAA 1 BRIGHT A_SetTranslucent(.1,1)
			Stop
	}
}