Actor GezzdtBioRifle : UWeapon
{
	Weapon.SelectionOrder 1800
	Weapon.SlotNumber 6
	Weapon.AmmoType "Tarydiumsludge"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 25
	Weapon.AmmoType2 "Tarydiumsludge"
	Weapon.AmmoUse2 1
	Weapon.AmmoGive2 0
	Inventory.PickupMessage "You got the Biorifle"
	Obituary "%o drank a glass of %k's dripping green load."
	Tag "GES Bio Rifle"
	scale 0.1
	Inventory.Icon "1001D0"
	+Weapon.NOALERT
	+WEAPON.EXPLOSIVE
	states
		{
		Select:
			TNT1 A 0 A_PlaySound("TurokRageWars/Weapons/TekCrossbowUp",6)
			TNT1 A 0 A_TakeInventory("pumped",9)
			BIOF D 1 Offset(67, 100)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF D 1 Offset(54, 81)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF D 1 Offset(32, 69)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF D 1 Offset(22, 58)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF D 1 Offset(10, 47)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF C 1 Offset(7, 39)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF B 1 Offset(2, 34)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOF A 1 A_Raise
			Goto Ready
		Deselect:
			TNT1 A 0 a_playsound ("weapons/holster", 0)
			TNT1 A 0 A_TakeInventory("pumped",9)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(2, 34)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(7, 39)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(10, 47)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(22, 58)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(32, 69)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(54, 81)
			TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 Offset(67, 100)
			TNT1 A 1 A_Lower
			Wait
		Ready:
			TNT1 A 0 A_TakeInventory("pumped")
			BIOI A 1 A_WeaponReady
			loop
		Fire:
			TNT1 A 0 A_AlertMonsters
			TNT1 A 0 a_playsound ("biorifle/fire",6)
			TNT1 A 0 A_FireCustomMissile("Blob",0,1,2,-2,0,7)
			BIOF ABCDEFGH 1
			goto Ready
		AltFire:
			BIOI A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			BIOI A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 0 A_Refire("pumping1")
			goto AltFireFire
		AltFireFire:
			TNT1 A 0 A_AlertMonsters
			TNT1 A 0 A_StopSound(7)
			TNT1 A 0 a_playsound ("biorifle/fire",6)
			TNT1 A 0 A_JumpIfInventory("pumped",9,20)
			TNT1 A 0 A_JumpIfInventory("pumped",8,17)
			TNT1 A 0 A_JumpIfInventory("pumped",7,16)
			TNT1 A 0 A_JumpIfInventory("pumped",6,13)
			TNT1 A 0 A_JumpIfInventory("pumped",5,12)
			TNT1 A 0 A_JumpIfInventory("pumped",4,9)
			TNT1 A 0 A_JumpIfInventory("pumped",3,8)
			TNT1 A 0 A_JumpIfInventory("pumped",2,5)
			TNT1 A 0 A_JumpIfInventory("pumped",1,4)
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			TNT1 A 0 A_FireCustomMissile("Blob0",0,0,2,-2,0,10)
			TNT1 A 0 A_Jump(256,10)
			TNT1 A 0 A_FireCustomMissile("Blob1",0,0,2,-2,0,10)
			TNT1 A 0 A_Jump(256,8)
			TNT1 A 0 A_FireCustomMissile("Blob2",0,0,2,-2,0,10)
			TNT1 A 0 A_Jump(256,6)
			TNT1 A 0 A_FireCustomMissile("Blob3",0,0,2,-2,0,10)
			TNT1 A 0 A_Jump(256,4)
			TNT1 A 0 A_FireCustomMissile("Blob4",0,0,2,-2,0,10)
			TNT1 A 0 A_Jump(256,2)
			TNT1 A 0 A_FireCustomMissile("Blob5",0,0,2,-2,0,10)
			BIAF ABCDEFGHIJKLMNOPQRST 1
			TNT1 A 0 A_TakeInventory("pumped")
			goto Ready
		Pumping1:
			TNT1 A 0 a_playsound ("biorifle/load",7,1,1)
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			BPS1 A 1
			BPS2 A 1
			BIOP ABCDEFGHIJK 1
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping2")
			goto AltFireFire
		Pumping2:
			BIOP LMNOPQRSTU 1
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping3")
			goto AltFireFire
		Pumping3:
			BIOP VWXYZ 1
			BIPP ABCDE 1
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping4")
			BPU2 A 1
			goto AltFireFire
		Pumping4:
			BIPP FGHIJKLMNO 1
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping5")
			BPU2 A 1
			goto AltFireFire
		Pumping5:
			BIPP PQRSTUVWXY 1
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping6")
			BPU1 A 1
			BPU2 A 1
			goto AltFireFire
		Pumping6:
			BIPP Z 1
			BPPP ABCDEFGHI 1
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping7")
			BPU1 A 1
			BPU2 A 1
			goto AltFireFire
		Pumping7:
			BPPP JKLMNOPQRS 1
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping8")
			BPU1 A 1
			BPU2 A 1
			goto AltFireFire
		Pumping8:
			BPPP TUVWXYZ 1
			BPPA ABCDEFGHIJKLM 1
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping9")
			BPU1 A 1
			BPU2 A 1
			goto AltFireFire
		Pumping9:
			BPPA MNOPQRSTUVWXYZ 1
			TNT1 A 0 A_Takeinventory("Tarydiumsludge",1)
			TNT1 A 0 A_Giveinventory("pumped",1)
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping10")
			goto AltFireFire
		Pumping10:
			BPPB AB 1
			BPPB C 1 A_Settics(8 / 10)
			BPPB DE 1
			BPPB F 1 A_Settics(8 / 10)
			BPPB GH 1
			BPPB I 1 A_Settics(8 / 10)
			BPPB JK 1
			BPPB L 1 A_Settics(8 / 10)
			BPPB MN 1
			BPPB O 1 A_Settics(8 / 10)
			BPPB PQ 1
			BPPB R 1 A_Settics(8 / 10)
			BPPB ST 1
			BPPB U 1 A_Settics(8 / 10)
			BPPB VW 1
			BPPB X 1 A_Settics(8 / 10)
			BPPB YZ 1
			TNT1 A 0 A_JumpIfInventory("Tarydiumsludge",1,1)
			goto AltFireFire
			TNT1 A 0 A_Refire("pumping11")
			goto AltFireFire
		Pumping11:
			BPPC ABC 1
			BPPC D 1 A_Settics(8 / 10)
			BPPC EFG 1
			BPPC H 1 A_Settics(8 / 10)
			BPPC IJK 1
			BPPC L 1 A_Settics(8 / 10)
			BPPC MNO 1
			BPPC P 1 A_Settics(8 / 10)
			BPPC QRS 1
			goto AltFireFire
		Spawn:
			BPKU P -1
			stop
		}
}

ACTOR Blob
{
	Radius 2
	Height 2
	Speed 22
	Projectile
	scale 0.2
	gravity 0.4
	reactiontime 4
	+SHOOTABLE
	-NOGRAVITY
	+Bright
	+MOVEWITHSECTOR
	+FORCEXYBILLBOARD
	Obituary "%o drank a glass of %k's dripping green load."
	decal sludgescorch
	States
	{
	Spawn:
		TNT1 A 2
		TNT1 A 0 A_TakeInventory("stuck")
	Spawnloop:
		BLOB A 1
		Loop
	Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(0.2,-0.2)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	Stick2:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki2:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	Death:
		TNT1 A 0 A_JumpifInventory("stuck",1,"Death1")
		TNT1 A 0 A_Playsound("biorifle/hit")
		TNT1 A 0 A_NoGravity
		TNT1 A 0 A_Checkceiling("stick1")
		TNT1 A 0 A_Checkfloor("stick2")
		goto Stick
	Pain.schleim:
	Crash:
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(40,80)
		stop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(40,0)
		stop
	}
}

ACTOR Blob0 : Blob
{
	Speed 23
	scale 0.15
	gravity 0.7
	reactiontime 3
	States
	{
	Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(0.15,-0.15)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	}
}

ACTOR Blob1 : Blob
{
	Radius 3
	Height 3
	gravity 0.7
	States
	{
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(47,90)
		stop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(47,20)
		stop
	}
}

ACTOR Blob2 : Blob
{
	Speed 21
	Radius 4
	Height 4
	scale 0.3
	reactiontime 5
	States
	{
	Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(54,100)
		stop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(0.4,-0.4)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(54,30)
		stop
	}
}

ACTOR Blob3 : Blob
{
	Speed 20
	Radius 5
	Height 5
	scale 0.5
	reactiontime 5
	States
	{
	Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(68,110)
		stop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(0.6,-0.6)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(70,40)
		stop
	}
}

ACTOR Blob4 : Blob
{
	Speed 19
	Radius 6
	Height 6
	scale 0.7
	reactiontime 6
	States
	{
	Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(70,120)
		stop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(0.8,-0.8)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(80,50)
		stop
	}
}

ACTOR Blob5 : Blob
{
	Speed 18
	Radius 7
	Height 7
	scale 0.8
	reactiontime 6
	States
	{
	5Stick:
		TNT1 A 0 A_GiveInventory("stuck",1)
	Sticki:
		BLOB C 30 A_Countdown
		BLOB C 5 Bright
		loop
	Death1:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(150,130)
		stop
	Stick1:
		TNT1 A 0 A_GiveInventory("stuck",1)
		TNT1 A 0 A_Setscale(1.0,-1.0)
	Sticki1:
		BLOB B 30 A_Countdown
		BLOB B 5 Bright
		loop
	XDeath:
		TNT1 A 0 A_Playsound("weapons/explosion")
		TNT1 A 0 A_SpawnDebris("sludgespark")
		TNT1 A 0 A_SpawnItemEx("sludgesmoke",0,0,10,0,0,1)
		TNT1 A 0 A_TakeInventory("stuck")
		TNT1 A 0 A_Explode(150,60)
		stop
	}
}

ACTOR SludgeSpark
{
	Health 7
	radius 2
	height 2
	speed 0.3
	scale 0.15
	renderstyle "add"
	gravity 1.3
	bouncetype "doom"
	bouncecount 2
	bouncefactor 0.1
	+missile
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	+Bright
	+FORCEXYBILLBOARD
	States
	{
		Spawn:
			TNT1 A 0 NoDelay A_Jump(256,"spawn1","spawn2","spawn3")
			stop
		Spawn1:
			BLOB D 1
			loop
		Spawn2:
			BLOB E 1
			loop
		Spawn3:
			BLOB F 1
			loop
		Death:
			TNT1 A 0
			stop
	}
}

ACTOR SludgeSmoke
{
	VSpeed 1
	renderstyle "add"
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	+DONTSPLASH
	+NOTELEPORT
	+Bright
	+FORCEXYBILLBOARD
	scale 1.5
		States
		{
		Spawn:
			TNT1 A 0 NoDelay A_Jump(256,"Spawn1","Spawn2","Spawn3")
			stop
		Spawn1:
			TNT1 A 1
			GSM1 ABCDEF 3 Bright
			GSM1 F 2 Bright A_Fadeout(0.1)
			wait
		Spawn2:
			TNT1 A 1
			GSM2 ABCDEFGH 3 Bright
			GSM2 H 2 Bright A_Fadeout(0.1)
			wait
		Spawn3:
			TNT1 A 1
			GSM3 ABCDEFG 3 Bright
			GSM3 G 2 Bright A_Fadeout(0.1)
			wait
  }
}

Actor Stuck : Inventory
{Inventory.Maxamount 1}

Actor Pumped : Inventory
{Inventory.Maxamount 9}