/*

==POCKET REVENANTS==
Having dealt with his fair share of Revenants, both encountering
them in head-on combat or having them suddenly manifesting in front
of him, the Artificer has taken it upon himself to fight fire with fire.

These tiny skeletons can be hurled at enemies, splitting into more 
Revenants on impact. Incredibly aggressive, the Revenants pursue
enemies relentlessly and punch the hell out of them, they can
also launch projectiles at long range or flying victims. It should
be noted the antics and chattering of these Skeletons are incredibly
annoying to demons, so they'll often focus all of their attention on
trying to kill them.

The box comes with a supply of flags to rally active Revenants
to any point as an alternate "attack"

*/

actor Bonertoken : custominventory
{
	+notimefreeze
	scale 0.50
	Inventory.PickupSound "brickbook/pickup"
	Inventory.PickupMessage "You got a box of pocket revenants"
	states
	{
	spawn:
		RBOX ABCDE 3 bright
		loop
	pickup:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("IcarusLauncher", 1, "dropIcarus")
		TNT1 A 0 a_jumpifinventory ("SKpistol", 1, "droppistol")
		TNT1 A 0 a_jumpifinventory ("Tsbrick", 1, "dropbrick")
		TNT1 A 0 a_jumpifinventory ("ParticleSmasher", 1, "dropsmasher")
		TNT1 A 0 a_giveinventory ("RevenantBox", 1)
		stop
	dropbrick:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("DroppedBrick",1,0,15,random (-3,-6),0,random(2,4),0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_takeinventory ("tsbrick", 1)
		TNT1 A 0 a_giveinventory ("RevenantBox", 1)
		stop
	dropsmasher:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("DroppedSmasher",1,0,15,random (-3,-6),0,random(2,4),0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_takeinventory ("Particlesmasher", 1)
		TNT1 A 0 a_giveinventory ("RevenantBox", 1)
		stop
	DropPistol:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("DroppedPistol",1,0,15,random (-3,-6),0,random(2,4),0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_takeinventory ("SKPistol", 1)
		TNT1 A 0 a_giveinventory ("RevenantBox", 1)
		stop
	DropIcarus:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("DroppedIcarus",1,0,15,random (-3,-6),0,random(2,4),0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_takeinventory ("IcarusLauncher", 1)
		TNT1 A 0 a_giveinventory ("RevenantBox", 1)
		stop
	}
}

actor DroppedBoner
{
	+notimefreeze
	+dropped
	scale 0.60
	renderstyle ADD
	alpha 0.50
	states
	{
	spawn:
		RBOX A 60
		goto death
	death:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("BonerToken")
		stop
	}
}


actor RevenantBox : Weapon
{
	Weapon.SelectionOrder 160
	Weapon.SlotNumber 7
	+cheatnotweapon
	+weapon.ammo_optional	
	+NOAUTOAIM
	+INVENTORY.UNTOSSABLE
	Inventory.PickupMessage "You found a box of pocket Revenants!"
	weapon.bobstyle smooth
	weapon.bobrangex 0.1
	weapon.bobrangey 0.6
	weapon.bobspeed 2
	Tag "Pocket Revenants"
	states
	{
	spawn:
		RBOX A 10
		loop
	select:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		TNT1 A 0 a_jumpifinventory ("IAmTechMonk",1,"VisorSwap")
		Goto Draw
	VisorSwap:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_giveinventory ("CrateWeaponArmed",1)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",40)
	Draw:
		TNT1 AAAAAAA 0 a_raise
		TNT1 AAAAAAA 1 a_raise
		TNT1 A 0 a_stopsound (CHAN_WEAPON)
		TNT1 A 0 a_stopsound (6)
		loop
	deselect:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower (1, "deadlower")
		TNT1 A 0 a_jumpifinventory ("MiniCultistReady",1,"MiniCultistDown")
		TNT1 A 0 a_jumpifinventory ("BlazMimicReady",1,"BlazMimicDown")
		TNT1 A 0 a_jumpifinventory ("PocketMummyReady",1,"PocketMummyDown")
		TNT1 A 0 a_jumpifinventory ("MiniPfhorReady",1,"MiniPfhorDown")
		TNT1 A 0 a_jumpifinventory ("DoomBonerReady",1,"DoomBonerDown")
		TNT1 A 0 a_jumpifinventory ("GoldenBonerReady",1,"GoldenBonerDown")
		TNT1 A 0 a_playsound ("RevBox/bonerdown",0,0.60)
		PRV1 IFEDCBA 2
		goto realdeselect
	deadlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		TNT1 A 1 a_lower
		wait		
	GoldenBonerDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/goldenbonerlower",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV2 IFEDCBA 2
		goto realdeselect
	DoomBonerDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/doombonerlower",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV3 IFEDCBA 2
		goto realdeselect
	BlazMimicDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/BlazDown",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV4 IFEDCBA 2
		goto realdeselect
	PocketMummyDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/MummyDown",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV5 IFEDCBA 2
		goto realdeselect
	MiniPfhorDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/PfhorDown",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV6 IFEDCBA 2
		goto realdeselect
	MiniCultistDown:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/CultistDown",0)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		PRV7 IFEDCBA 2
		goto realdeselect
		
	realdeselect:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("IAmTechMonk",1,"VisorSwapAway")
		Goto Lowering
	VisorSwapAway:
		TNT1 A 0
		TNT1 A 0 a_takeinventory ("ArtiPainTimer",9999)
		TNT1 A 0 a_giveinventory ("ArtiPainTimer",40)
	Lowering:
		TNT1 A 0
		TNT1 AAAAAAA 0 a_lower
		TNT1 AAAAAAA 1 a_lower
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		loop

	ready:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jump (200,"GoldenBonerUp","DoomBonerUp","BlazMimicUp","PocketMummyUp")
		TNT1 A 0 a_jump (60,"MiniPfhorUp")
		TNT1 A 0 a_jump (40,"MiniCultistUp")
		TNT1 A 1
		Goto BonerUp
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Normal Skelly
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	BonerUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("skeleton/active",0,0.60)
		PRV1 ABCD 2
		PRV1 EGHI 2 a_weaponready
		goto BonerReady
	BonerReady:
		PRV1 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	fire:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("MiniCultistReady", 1, "MiniCultistAttack")
		TNT1 A 0 a_jumpifinventory ("MiniPfhorReady", 1, "MiniPfhorAttack")
		TNT1 A 0 a_jumpifinventory ("PocketMummyReady", 1, "PocketMummyAttack")
		TNT1 A 0 a_jumpifinventory ("BlazMimicReady", 1, "BlazMimicAttack")
		TNT1 A 0 a_jumpifinventory ("DoomBonerReady", 1, "DoomBonerAttack")
		TNT1 A 0 a_jumpifinventory ("GoldenBonerReady", 1, "GoldenBonerAttack")
		PRV1 JKLMNOPP 1
		TNT1 A 0 a_playsound ("RevBox/bonermelee",CHAN_WEAPON)		
		PRV1 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"BonerThrow")
		TNT1 A 0 a_firecustommissile ("bonermelee")
		PRV1 STU 1
		TNT1 A 12
		PRV1 ABCDEGHI 2 a_weaponready
		goto BonerReady
	BonerThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("thrownboner")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready
		
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Golden Boner
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	GoldenBonerUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("RevBox/GoldBonerActive",0,0.60)
		TNT1 A 0 a_giveinventory ("GoldenBonerReady",1)
		PRV2 ABCD 2
		PRV2 EGHI 2 a_weaponready
		goto GoldenBonerReady
	GoldenBonerReady:
		PRV2 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	GoldenBonerAttack:
		PRV2 JKLMNOPP 1
		TNT1 A 0 a_playsound ("RevBox/GoldMelee",CHAN_WEAPON)		
		PRV2 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"GoldenBonerThrow")
		TNT1 A 0 a_firecustommissile ("GoldenBonermelee")
		PRV2 STU 1
		TNT1 A 12
		PRV2 ABCDEGHI 2 a_weaponready
		goto GoldenBonerReady
	GoldenBonerThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownGoldenBoner")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready

	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Doom Boner
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	DoomBonerUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("doomboner/sight",0,0.60)
		TNT1 A 0 a_giveinventory ("DoomBonerReady",1)
		PRV3 ABCD 2
		PRV3 EGHI 2 a_weaponready
		goto DoomBonerReady
	DoomBonerReady:
		PRV3 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	DoomBonerAttack:
		PRV3 JKLMNOPP 1
		TNT1 A 0 a_playsound ("RevBox/doommelee",CHAN_WEAPON)
		PRV3 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"DoomBonerThrow")
		TNT1 A 0 a_firecustommissile ("DoomBonermelee")
		PRV3 STU 1
		TNT1 A 12
		PRV3 ABCDEGHI 2 a_weaponready
		goto DoomBonerReady
	DoomBonerThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownDoomBoner")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready
	
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Blaz Mimic
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	BlazMimicUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("RevBox/BlazUp",CHAN_WEAPON)
		TNT1 A 0 a_giveinventory ("BlazMimicReady",1)
		PRV4 ABCD 2
		PRV4 EGHI 2 a_weaponready
		goto BlazMimicReady
	BlazMimicReady:
		PRV4 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	BlazMimicAttack:
		PRV4 JKLMNOPP 1
		TNT1 A 0 a_playsound ("pipe/swing",0,0.40)
		TNT1 A 0 a_playsound ("RevBox/BlazPain",CHAN_WEAPON)
		PRV4 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"BlazMimicThrow")
		TNT1 A 0 a_firecustommissile ("MiniBlazMimicMelee")
		PRV4 STU 1
		TNT1 A 12
		PRV4 ABCDEGHI 2 a_weaponready
		goto BlazMimicReady
	BlazMimicThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownBlazMimic")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready


	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Mummy
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	PocketMummyUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("RevBox/MummyUp",0,0.60)
		TNT1 A 0 a_giveinventory ("PocketMummyReady",1)
		PRV5 ABCD 2
		PRV5 EGHI 2 a_weaponready
		goto PocketMummyReady
	PocketMummyReady:
		PRV5 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	PocketMummyAttack:
		PRV5 JKLMNOPP 1
		TNT1 A 0 a_playsound ("pipe/swing",0,0.40)
		TNT1 A 0 a_playsound ("RevBox/MummyHoot",CHAN_WEAPON)
		PRV5 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"PocketMummyThrow")
		TNT1 A 0 a_firecustommissile ("PocketMummyMelee")
		PRV5 STU 1
		TNT1 A 12
		PRV5 ABCDEGHI 2 a_weaponready
		goto PocketMummyReady
	PocketMummyThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownPocketMummy")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready

	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Mini Pfhor
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	MiniPfhorUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("RevBox/PfhorUp",0,0.60)
		TNT1 A 0 a_giveinventory ("MiniPfhorReady",1)
		PRV6 ABCD 2
		PRV6 EGHI 2 a_weaponready
		goto MiniPfhorReady
	MiniPfhorReady:
		PRV6 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	MiniPfhorAttack:
		PRV6 JKLMNOPP 1
		TNT1 A 0 a_playsound ("pipe/swing",0,0.40)
		TNT1 A 0 a_playsound ("RevBox/PfhorThrow",CHAN_WEAPON)
		PRV6 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"MiniPfhorThrow")
		TNT1 A 0 a_firecustommissile ("MiniPfhorMelee")
		PRV6 STU 1
		TNT1 A 12
		PRV6 ABCDEGHI 2 a_weaponready
		goto MiniPfhorReady
	MiniPfhorThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownMiniPfhor")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready
	
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	//Mini Cultist
	//----------------------------------------------------------------
	//----------------------------------------------------------------
	MiniCultistUp:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_playsound ("RevBox/CultistUp",0,0.60)
		TNT1 A 0 a_giveinventory ("MiniCultistReady",1)
		PRV7 ABCD 2
		PRV7 EGHI 2 a_weaponready
		goto MiniCultistReady
	MiniCultistReady:
		PRV7 I 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("SecretAction",1,"FakeReload")
		loop
	MiniCultistAttack:
		PRV7 JKLMNOPP 1
		TNT1 A 0 a_playsound ("pipe/swing",0,0.40)
		TNT1 A 0 a_playsound ("RevBox/CultistDie3",0)
		PRV7 QR 1
		TNT1 A 0 a_jumpifinventory ("CrateEnergy",20,"MiniCultistThrow")
		TNT1 A 0 a_firecustommissile ("PocketMummyMelee")
		PRV7 STU 1
		TNT1 A 12
		PRV7 ABCDEGHI 2 a_weaponready
		goto MiniCultistReady
	MiniCultistThrow:
		TNT1 A 0
		TNT1 A 0 a_firecustommissile ("ThrownMiniCultist")
		TNT1 A 0 a_takeinventory ("CrateEnergy",20)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		ZKV2 GHI 2
		TNT1 A 12
		goto ready
	
	Altfire:
		"####" "#" 1 a_jumpifinventory ("TeleportCoolDownTimer",1,"NoFlagToss")
		"####" "#" 1 offset (0,37)
		"####" "#" 1 offset (0,42)
		"####" "#" 1 offset (0,48)
		"####" "#" 1 offset (0,52)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 0 a_weaponready (WRF_NOFIRE|WRF_NOSWITCH)
		RLYF ABCCD 2
		RLYF D 1 a_playsound ("doomboner/swing",0,0.60)
		TNT1 A 0 a_giveinventory ("TeleportCoolDownTimer",1)
		RLYF E 2 a_firecustommissile ("RallyFlagSpawner")
		RLYF FGHIJ 2
		TNT1 A 12
		goto ready
	NoFlagToss:
		"####" "#" 1 a_playsound ("bustercarbine/dryfire",0)
		"####" "#" 8 a_weaponready (WRF_NOSECONDARY|WRF_NOBOB)
		TNT1 A 0 a_jumpifinventory ("MiniCultistReady",1,"MiniCultistReady")
		TNT1 A 0 a_jumpifinventory ("BlazMimicReady",1,"BlazMimicReady")
		TNT1 A 0 a_jumpifinventory ("PocketMummyReady",1,"PocketMummyReady")
		TNT1 A 0 a_jumpifinventory ("MiniPfhorReady",1,"MiniPfhorReady")
		TNT1 A 0 a_jumpifinventory ("DoomBonerReady",1,"DoomBonerReady")
		TNT1 A 0 a_jumpifinventory ("GoldenBonerReady",1,"GoldenBonerReady")
		goto BonerReady


	FakeReload:
		"####" "#" 1 offset (0,37)
		"####" "#" 1 offset (0,42)
		"####" "#" 1 offset (0,48)
		"####" "#" 1 offset (0,52)
		TNT1 A 1 a_weaponready (WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 a_takeinventory ("GoldenBonerReady",99)
		TNT1 A 0 a_takeinventory ("DoomBonerReady",99)
		TNT1 A 0 a_takeinventory ("BlazMimicReady",99)
		TNT1 A 0 a_takeinventory ("PocketMummyReady",99)
		TNT1 A 0 a_takeinventory ("MiniPfhorReady",99)
		TNT1 A 0 a_takeinventory ("MiniCultistReady",99)
		TNT1 A 6
		PBMR ABCDEF 2
		PBMR F 5
		TNT1 A 0 a_playsound ("sharpshooter/open",0)
		PBMR GHIJKJ 2
		PBMR J 3
		PBMR LMNOPQR 2
		PBSR ABCDEFGHIJ 2
	Sippy:
		TNT1 A 0
		TNT1 A 0 A_Playsound ("RevBox/sippy",CHAN_WEAPON)
		PBDR ABCDEFGHIJ 2
		PBSR J 2
		TNT1 A 0 a_playsound ("RevBox/Gulp",0)		
		TNT1 A 0 A_Playsound ("RevBox/sippy",CHAN_WEAPON)
		PBDR ABCDEFGHIJ 2
		PBSR J 2
		TNT1 A 0 a_playsound ("RevBox/Gulp",0)		
		TNT1 A 0 A_Playsound ("RevBox/sippy",CHAN_WEAPON)
		PBDR ABCDEFGHIJ 2
		PBSR J 2
		TNT1 A 0 a_playsound ("RevBox/Gulp",0)		
		Goto FinishReload
	FinishReload:
		PBSR J 2 a_stopsound (CHAN_WEAPON)
		PBRL ABCDEF 2
		TNT1 A 0 a_playsound ("BMshotgun/raise",0)
		PBRL GHI 2
		PBRL JKLMN 2
		TNT1 A 4
		goto ready
	}
}

//=================================================================
//=================================================================
//=================================================================
//BONER RALLY FLAG
//=================================================================
//=================================================================
//=================================================================

actor RallyFlagSpawner
{
	projectile
	+THRUACTORS
	+DONTBLAST
	+DONTREFLECT
	speed 18
	speed 18
	-NOGRAVITY
	gravity 1.20
	+BOUNCEONWALLS
	scale 1.50
	+bright
	states
	{
	Spawn:
		TNT1 A 0
		FL4G A 1 thrustthingz (0,20,0,1)
		goto flying
	Flying:
		FL4G A 1
		loop
	Death:
		TNT1 A 0
		FL4G B 33
		TNT1 A 1 a_spawnitemex ("BonerRallyFlag",0,0,0,0,0,1,0,SXF_NOCHECKPOSITION)
		stop
	}
}

Actor BonerRallyFlag : SpecialSpot
{
	+NOBLOCKMAP
	+NOTIMEFREEZE
	reactiontime 25
	+bright
	scale 1.50
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/FlagUp",0,1,0,0.80)
		FL4G BCEFGHIJKL 2
		goto waving
	Waving:
		FL4G MNOPQRS 3
		TNT1 A 0 a_countdown
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_setscale (0.80,0.80)
		TNT1 A 0 a_takefromtarget ("TeleportCoolDownTimer",99)
		TNT1 A 0 a_playsound ("RevBox/FlagExplode",0)
		CLTX ABCDEFGHIJKLMN 2 bright 
		stop
	}
}




//=================================================================
//=================================================================
//=================================================================
//THE SKELLIES
//=================================================================
//=================================================================
//=================================================================


//----------------------------------------------------------------
//----------------------------------------------------------------
//REVENANT 
//----------------------------------------------------------------
//----------------------------------------------------------------

actor ThrownBoner
{
	Projectile
	speed 45
	damage 20
	obituary "%o got destroyed by %k's pocket boner."
	+BLOODSPLATTER
	+dontblast
	+forcepain
	+hittracer
	species "player"
	+THRUSPECIES
	height 10
	radius 10
	scale 0.45
	+noblood
	+NOEXTREMEDEATH
	decal PocketRevenantCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		SKEL T 2 a_playsound ("RevBox/BonerShortAAA",6) 
		SKEL U 2 a_playsound ("skeleton/swing",0)
		SKEL V 2 a_playsound ("RevBox/BonerShortAAA",6) 
		SKEL W 2 a_playsound ("skeleton/swing",0)
		loop
	death:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("pocketboner",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}



actor PocketBoner
{
	monster
	Health 200
	Radius 15
	Height 40
	scale 0.45
	speed 14
	mass 300
	painchance 40
	+friendly
	MeleeRange 60
	species "player"
	+THRUSPECIES
	-solid
	-countkill
	+dontblast
	+noradiusdmg
	SeeSound "RevBox/BonerSight"
	PainSound "RevBox/BonerPain"
	DeathSound "skeleton/death"
	ActiveSound "RevBox/BonerIdle"
	MeleeSound "skeleton/melee"
	HitObituary "%o was punched in the junk by a lil skelly."
	Bloodtype "CADustBlood"


	var int user_bonertimer;
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		
		SKEL AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		SKEL AABBCC 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_look
		SKEL DDEEFF 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	See:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		SKEL AABBCCDDEEFF 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		SKEL AABBCCDDEEFF 2 A_Chase
		Goto See	


	Melee:
		SKEL G 0 
		SKEL G 4 A_SkelWhoosh
		SKEL H 5 A_FaceTarget
		SKEL I 6 A_custommeleeattack (random(20, 50), "skeleton/melee")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		TNT1 A 0
		SKEL J 0 Bright A_FaceTarget
		SKEL J 10 Bright A_FaceTarget
		TNT1 A 0 a_playsound ("RevBox/BonerShoot",0)
		SKEL K 10 A_custommissile ("PocketBonerMissile",35)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		SKEL K 10 a_facetarget
		Goto See
	pain:
		SKEL L 5
		SKEL L 5 A_Pain
		Goto See		
	death:
		SKEL L random (1,3)
		SKEL L 5
		SKEL M 5 A_Scream
		SKEL N 2 A_NoBlocking
		SKEL O 2 
		TNT1 A 0 a_playsound ("weapons/rocklx",0,0.40,0,1.60)
		TNT1 AAAAA 0 a_spawnitemex ("PocketRevbones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("PocketRevHipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("PocketRevRibcage",0,0,0,random(-10,10),random(-10,10),12)
		TNT1 A 0 a_spawnitemex ("PocketRevSkull",0,0,0,random(-10,10),random(-10,10),10)
		MISL BCD 2 bright 
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		SKEL R 4 a_playsound ("RevBox/BonerRattle",0)
		SKEL S 4 
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		SKEL R 4 a_chase
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		SKEL S 4 a_chase
		SKEL R 4 a_chase
		SKEL S 4 a_chase
		SKEL R 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		SKEL S 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		SKEL R 4 a_wander
		SKEL S 4 a_wander
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		SKEL R 4 
		SKEL S 4 
		SKEL R 4 a_wander
		SKEL S 4 a_wander
		SKEL R 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		SKEL S 4 a_wander
		goto see	
	}
}


actor PocketBonerMissile 
{
	+notimefreeze
	projectile
	+THRUSPECIES
	species "Player"
	+dontblast
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+HITTRACER
	speed 24
	damage (20)
	+SKYEXPLODE
	+bright
	radius 6
	height 4
	scale 0.60
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/BonerWoosh",0)
		PBRK AB 2 
		Loop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/BonerHit",0)
		TNT1 A 0 a_setscale (0.40,0.40)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		PBRK CDE 2
		stop
	}
}




//----------------------------------------------------------------
//----------------------------------------------------------------
//DOOM BONER
//----------------------------------------------------------------
//----------------------------------------------------------------



actor throwndoomboner : thrownboner
{
	decal PocketDoomguyRevenantCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		DBNR R 2 a_playsound ("doomboner/swing",6,0.60)
		DBNR S 2 a_playsound ("doomboner/heh",0)
		DBNR T 2 a_playsound ("doomboner/swing",6,0.60)
		DBNR U 2 a_playsound ("doomboner/heh",0)
		loop
	death:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("lildoomboner",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}

actor lildoomboner : PocketBoner
{
	SeeSound "doomboner/sight"
	PainSound "skeleton/pain"
	DeathSound "skeleton/death"
	ActiveSound "doomboner/active"
	
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		DBNR AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		DBNR AABBCC 1 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		DBNR DDEEFF 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		DBNR AABBCCDDEEFF 2 A_Chase
		Goto See		
	See:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		DBNR AABBCCDDEEFF 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	Melee:
		DBNR G 0 
		DBNR G 4 A_FaceTarget
		DBNR H 5 A_FaceTarget
		DBNR I 6 A_custommeleeattack (random(20, 50), "doomboner/punch","doomboner/swing")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		DBNR G 0 
		DBNR G 4 A_FaceTarget
		DBNR H 5 A_FaceTarget
		DBNR I 6 A_custommissile ("PocketShotty",32)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	pain:
		DBNR J 5
		DBNR J 5 A_Pain
		Goto See		
	death:
		DBNR J random (1,3)
		DBNR JK 5
		DBNR L 2 A_Scream
		DBNR M 2 A_NoBlocking
		DBNR N 2
		DBNR O 1
		TNT1 A 0 a_playsound ("weapons/rocklx",0,0.40,0,1.60)
		TNT1 AAAAA 0 a_spawnitemex ("PocketRevbones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("PocketRevHipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("PocketRevRibcage",0,0,0,random(-10,10),random(-10,10),12)
		TNT1 A 0 a_spawnitemex ("PocketRevSkull",0,0,0,random(-10,10),random(-10,10),10)
		MISL BCD 2 bright 
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("doomboner/dance",0,1,0,1.60)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		DBNR P 4
		DBNR Q 4
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		DBNR P 4 a_chase
		DBNR Q 4 a_chase
		DBNR P 4 a_chase
		DBNR Q 4 a_chase
		DBNR P 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		DBNR Q 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("doomboner/dance",0,1,0,1.60)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		DBNR P 4 a_wander
		DBNR Q 4 a_wander
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		DBNR P 4 
		DBNR Q 4 
		DBNR P 4 a_wander
		DBNR Q 4 a_wander
		DBNR P 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		DBNR Q 4 a_wander
		goto see
	}
}


Actor PocketShotty : PocketBonerMissile
{
	scale 0.80
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("doomboner/swing",0)
		PBS1 ABCDEFGH 1 
		Loop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/BonerHit",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		MISL BCD 2 bright
		stop
	}
}

//----------------------------------------------------------------
//----------------------------------------------------------------
//GOLDEN BONER
//----------------------------------------------------------------
//----------------------------------------------------------------



actor throwngoldenboner : thrownboner
{
	decal PocketRevenantCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		GBNR R 2 a_playsound ("RevBox/GoldBonerSwing",0)
		GBNR S 2 a_playsound ("RevBox/GoldBonerFly",0)
		GBNR T 2 a_playsound ("RevBox/GoldBonerSwing",0)
		GBNR U 2 a_playsound ("RevBox/GoldBonerFly",0)
		loop
	death:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("goldenboner",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}


actor goldenboner : PocketBoner
{
	SeeSound "RevBox/GoldBonerSight"
	PainSound "RevBox/GoldBonerPain"
	DeathSound "RevBox/GoldBonerSeath"
	ActiveSound "RevBox/GoldBonerActive"
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		GBNR AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		GBNR AABBCC 1 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		GBNR DDEEFF 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		GBNR AABBCCDDEEFF 2 A_Chase
		Goto See
	See:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		GBNR AABBCCDDEEFF 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	Melee:
		GBNR G 0 
		GBNR G 4 A_facetarget
		GBNR H 5 A_FaceTarget
		GBNR I 6 A_custommeleeattack (random(20, 50), "RevBox/GoldBonerPunch","RevBox/GoldBonerSwing")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		GBNR G 0 
		GBNR G 4 A_facetarget
		GBNR H 5 A_FaceTarget
		GBNR I 6 A_custommissile ("GoldBonerShot",32)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	pain:
		GBNR J 5
		GBNR J 5 A_Pain
		Goto See		
	death:
		GBNR J random (1,3)
		GBNR JM 5
		GBNR N 2 A_Scream
		GBNR O 2 A_NoBlocking
		TNT1 A 0 a_playsound ("weapons/rocklx",0,0.40,0,1.60)
		TNT1 AAAAA 0 a_spawnitemex ("goldbones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("goldhipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("goldribcage",0,0,0,random(-10,10),random(-10,10),12)
		ISKL A 0 a_spawnitemex("goldskull",0,0,0,random(-10,10),random(-10,10),12)
		MISL BCD 2 bright 
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/GoldBonerLaugh",0,1,0,1.80)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		GBNR K 4
		GBNR L 4
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		GBNR K 4 a_chase
		GBNR L 4 a_chase
		GBNR K 4 a_chase
		GBNR L 4 a_chase
		GBNR K 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		GBNR L 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/GoldBonerLaugh",0,1,0,1.80)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		GBNR K 4 a_wander
		GBNR L 4 a_wander
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		GBNR K 4 
		GBNR L 4 
		GBNR K 4 a_wander
		GBNR L 4 a_wander
		GBNR K 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		GBNR L 4 a_wander
		goto see
	}
}

Actor GoldBonerShot : PocketBonerMissile
{
	scale 2
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("GoldBonerSwing/swing",0,0.60)
		GBGB ABCD 1
		Loop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/GoldBonerPunch",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		MISL BCD 2 bright
		stop
	}
}


//----------------------------------------------------------------
//----------------------------------------------------------------
//BLAZ MIMIC
//----------------------------------------------------------------
//----------------------------------------------------------------



actor ThrownBlazMimic : thrownboner
{
	decal PocketBlazMimicCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/BlazDead",0,1)
		goto BlazFlight
	BlazFlight:
		BMMC K 2 a_playsound ("RevBox/BlazFly",6,0.80)
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-10,10),random(-10,10),10)
		BMMC L 2 
		BMMC M 2 a_playsound ("RevBox/BlazFly",6,0.80)
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-10,10),random(-10,10),10)
		BMMC N 2 
		loop
	death:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("LifeSizedBlazMimic",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}




actor LifeSizedBlazMimic : PocketBoner
{
	SeeSound "RevBox/BlazIdle"
	PainSound "RevBox/BlazPain"
	DeathSound "RevBox/BlazDead"
	ActiveSound "RevBox/BlazIdle"
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		BMMC AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		BMMC AABB 1 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		BMMC CCDD 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 AAAAAAAAAA 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		BMMC AABBCCDD 2 A_Chase
		Goto See	
	See:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		BMMC AABBCCDD 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	Melee:
		BMMC E 0 
		BMMC E 4 A_facetarget
		TNT1 A 0 a_playsound ("RevBox/BlazSwing",0,1,0,1.60)
		BMMC F 5 A_FaceTarget
		BMMC G 6 A_custommeleeattack (random(20, 50), "RevBox/BlazSwordHit")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		BMMC E 0 
		BMMC E 4 A_facetarget
		TNT1 A 0 a_playsound ("RevBox/BlazLance",0,0.80,0,1.60)
		BMMC F 5 A_FaceTarget
		BMMC G 6 A_customMissile ("MiniBlazLance",20)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	pain:
		BMMC H 5
		BMMC H 5 A_Pain
		Goto See		
	death:
		BMMC H random (1,3)
		BMMC H 5
		TNT1 A 1 a_scream
		TNT1 A 1 a_noblocking
		TNT1 A 0 a_playsound ("RevBox/SNESGib",0,0.40,0,1.60)
		TNT1 AAAAAA 0 a_spawnitemex ("Whitebones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("Whitehipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("Whiteribcage",0,0,0,random(-10,10),random(-10,10),12)
		MISL BCD 2 bright 
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		BMMC I 4
		BMMC J 4
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		BMMC I 4 a_chase
		BMMC J 4 a_chase
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		BMMC I 4 a_chase
		BMMC J 4 a_chase
		BMMC I 4 a_chase
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		BMMC J 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		BMMC I 4 a_wander
		BMMC J 4 a_wander
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		BMMC I 4 
		BMMC J 4 
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		BMMC I 4 a_wander
		BMMC J 4 a_wander
		BMMC I 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		BMMC J 4 a_wander
		TNT1 A 0 a_spawnitemex ("Whitebones",0,0,0,random(-5,5),random(-5,5),random(-5,5),0,0,180)
		goto see
	}
}


Actor MiniBlazLance : PocketBonerMissile
{
	scale 0.40
	states
	{
	spawn:
		TNT1 A 0 
		BL1N A 1
		Loop
	XDeath:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/LanceHit",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		BL2N ABC 2
		stop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/LanceMiss",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		BL2N DEF 2
		stop
	}
}


//----------------------------------------------------------------
//----------------------------------------------------------------
//MUMMY
//----------------------------------------------------------------
//----------------------------------------------------------------



actor ThrownPocketMummy : thrownboner
{
	decal PocketMummyRevenantCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		POGM C 2 a_playsound ("RevBox/MummyWoosh",0)
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		POGM D 2 a_playsound ("RevBox/MummyHoot",CHAN_VOICE)
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		POGM E 2 a_playsound ("RevBox/MummyWoosh",0)
		POGM F 2 
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		loop
	death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAA 0 a_spawnitemex("PocketMummy",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}


actor PocketMummy : PocketBoner
{
	SeeSound "RevBox/MummySee"
	PainSound "RevBox/MummyPain"
	DeathSound "RevBox/MummyDed"
	ActiveSound "RevBox/MummyIdle"
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		MUMY AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		MUMY AABBCC 1 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		MUMY DDEEFF 1 A_wander
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 AAAAAAAAAAAA 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		MUMY AABBCCDDEEFF 2 A_Chase
		Goto See	
	See:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		MUMY AABBCCDDEEFF 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	Melee:
		MUMY G 0 
		TNT1 A 0 a_playsound ("RevBox/MummyAttack",0,0.60)
		MUMY G 4 A_facetarget
		MUMY H 5 A_FaceTarget
		MUMY I 6 A_custommeleeattack (random(20, 50), "RevBox/MummyPunch")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		TNT1 A 0
		MUMY J 0 Bright A_FaceTarget
		MUMY J 10 Bright A_FaceTarget
		TNT1 A 0 a_playsound ("RevBox/MummyHORF",0,0.70,0,1.20)
		MUMY K 10 A_custommissile ("PocketMummySpitBall",10)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		MUMY K 10 A_FaceTarget
		Goto See
	pain:
		MUMY L 5
		MUMY L 5 A_Pain
		Goto See		
	death:
		MUMY L random (1,3)
		MUMY LM 5
		MUMY N 2 A_Scream
		MUMY O 2 A_NoBlocking
		MUMY P 2
		MUMY Q 1
		TNT1 A 0 a_playsound ("RevBox/MummyBoom",CHAN_VOICE,0.80,0,1.20)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 AAAAA 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 AAAAAA 0 a_spawnitemex ("Mummybones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("Mummyhipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("Mummyribcage",0,0,0,random(-10,10),random(-10,10),12)
		GRXZ A 3
		MMYS ABCDEFGHIJ 2 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		MMYS KLMNOPQRST 3 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/MummyDance",0,0.80,0,1.80)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		POGM A 4
		POGM B 4
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		POGM A 4 a_chase
		POGM B 4 a_chase
		POGM A 4 a_chase
		POGM B 4 a_chase
		POGM A 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		POGM B 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/MummyDance",0,1,0,1.80)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		POGM A 4 a_wander
		POGM B 4 a_wander
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_playsound ("RevBox/BonerRattle",0)
		POGM A 4 
		POGM B 4 
		POGM A 4 a_wander
		POGM B 4 a_wander
		POGM A 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		POGM B 4 a_wander
		goto see
	}
}

Actor PocketMummySpitBall : PocketBonerMissile
{
	scale 0.80
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		MMYP ABCD 1
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		MMYP EFGH 1
		TNT1 A 0 a_spawnitemex ("MummySmoke",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		Loop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/MummyBoom",0,0.50,0,1.50)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		GRXZ A 3
		MMYS ABCDEFGHIJ 2 
		MMYS KLMNOPQRST 3 
		stop
	}
}


actor MummySmoke
{
	+NOINTERACTION
	+clientsideonly
	+FORCEXYBILLBOARD
	Radius 4
	Height 5
	Renderstyle Translucent
	Alpha 0.8
	scale 0.25
	+bright
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2
		TNT1 A 0 a_jump (150, "FlippedSmoke")
		MMYS ABCDEFGHIJ 1 
		MMYS KLMNOPQRST 2 
		stop
	FlippedSmoke:
		TNT1 A 0
		TNT1 A 0 a_setscale (-0.25,0.25)
		MMYS ABCDEFGHIJ 1 
		MMYS KLMNOPQRST 2 
		stop
	}
}



//----------------------------------------------------------------
//----------------------------------------------------------------
//MINI PFHOR
//----------------------------------------------------------------
//----------------------------------------------------------------



actor ThrownMiniPfhor : thrownboner
{
	decal PocketPfhorCrash
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		FIMD C 2 a_playsound ("doomboner/swing",6,0.60)
		FIMD D 2 a_playsound ("RevBox/PfhorFly",0)
		FIMD E 2 a_playsound ("doomboner/swing",6,0.60)
		FIMD F 2 a_playsound ("RevBox/PfhorFly",0)
		loop
	death:
		TNT1 A 0
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("MiniPfhor",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}




actor MiniPfhor : PocketBoner
{
	SeeSound "RevBox/PfhorUp"
	PainSound "RevBox/PfhorPain"
	DeathSound "RevBox/PfhorDie2"
	ActiveSound "RevBox/PfhorIdle"
	scale 0.35
	states
	{
	Spawn:
		FIMT A 0 
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		TNT1 A 1 a_jumpifinventory ("PfhorActive",1,"Idle")
		TNT1 A random (1,2)
		TNT1 A 0 a_giveinventory ("PfhorActive",1)
		TNT1 A 0 A_PlaySound("RevBox/PfhorWarpIn",0)
		FIMI T 1 bright A_SetScale(0.03,0.35)
		FIMI T 1 bright A_SetScale(0.06,0.35)
		FIMI T 1 bright A_SetScale(0.09,0.35)
		FIMI T 1 bright A_SetScale(0.12,0.35)
		FIMI T 1 bright A_SetScale(0.15,0.35)
		FIMI T 1 bright A_SetScale(0.18,0.35)
		FIMI T 1 bright A_SetScale(0.21,0.35)
		FIMI T 1 bright A_SetScale(0.24,0.35)
		FIMI T 1 bright A_SetScale(0.27,0.35)
		FIMI T 1 bright A_SetScale(0.30,0.35)
		FIMI T 1 bright A_SetScale(0.33,0.35)
		FIMI T 1 bright A_SetScale(0.36,0.35)
		FIMI T 1 bright A_SetScale(0.35)
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		FIMA BBCC 2 A_wander
		TNT1 A 0 a_look
		FIMA DDEE 2 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing(angle * 256 / 360+(32 *random(0,7)), random(20,35), 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A random (1,2)
		TNT1 A 0 a_giveinventory ("PfhorActive",1)
		TNT1 A 0 A_PlaySound("RevBox/PfhorWarpIn",0)
		FIMI T 1 bright A_SetScale(0.03,0.35)
		FIMI T 1 bright A_SetScale(0.06,0.35)
		FIMI T 1 bright A_SetScale(0.09,0.35)
		FIMI T 1 bright A_SetScale(0.12,0.35)
		FIMI T 1 bright A_SetScale(0.15,0.35)
		FIMI T 1 bright A_SetScale(0.18,0.35)
		FIMI T 1 bright A_SetScale(0.21,0.35)
		FIMI T 1 bright A_SetScale(0.24,0.35)
		FIMI T 1 bright A_SetScale(0.27,0.35)
		FIMI T 1 bright A_SetScale(0.30,0.35)
		FIMI T 1 bright A_SetScale(0.33,0.35)
		FIMI T 1 bright A_SetScale(0.36,0.35)
		FIMI T 1 bright A_SetScale(0.35)
		FIMA BBCCDDEE 2 A_Chase
		Goto See	
	See:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		FIMA BBCCDDEE 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		TNT1 A 0 a_jump (50, "danceaway")
		Loop	
	Melee:
		FIMA F 0 
		FIMA F 4 A_facetarget
		TNT1 A 0 a_playsound ("RevBox/PfhorSwing",0)
		FIMA GH 3 A_FaceTarget
		FIMA I 6 A_custommeleeattack (random(20, 50), "RevBox/PfhorHit")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		FIMA F 0 
		FIMA F 4 A_facetarget
		TNT1 A 0 a_playsound ("RevBox/PfhorSwing",0)
		FIMA GH 3 A_FaceTarget
		FIMA I 6 A_custommissile ("MiniPfhorShot",10)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	pain:
		FIMA J 5
		FIMA J 5 A_Pain
		Goto See		
	death:
		FIMA J Random (1,3)
		FIMA K 2 A_Scream
		FIMA L 2 A_NoBlocking
		FIMA M 1
		TNT1 A 0 a_playsound ("RevBox/PfhorSplat",CHAN_VOICE)
		TNT1 A 0 a_playsound ("weapons/rocklx",0,0.40,0,1.60)
		TNT1 AAAAAA 0 a_spawnitemex ("PocketRevbones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("PocketRevHipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("PocketRevRibcage",0,0,0,random(-10,10),random(-10,10),12)
		MISL BCD 2 bright
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/PfhorDance",0,1,0,1.80)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		FIMD A 4
		FIMD B 4
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		FIMD A 4 a_chase
		FIMD B 4 a_chase
		FIMD A 4 a_chase
		FIMD B 4 a_chase
		FIMD A 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		FIMD B 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/PfhorDance",0,1,0,1.80)
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		FIMD A 4 a_wander
		FIMD B 4 a_wander
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		FIMD A 4 
		FIMD B 4 
		FIMD A 4 a_wander
		FIMD B 4 a_wander
		FIMD A 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		FIMD B 4 a_wander
		goto see
	}
}


Actor MiniPfhorShot : PocketBonerMissile
{
	scale 0.60
	states
	{
	Spawn:
		FIPR AB 4 Bright
		Loop
	Death:
		FPRE A 1 bright
		TNT1 A 0 a_playsound ("RevBox/PfhorHit",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		FPRE B 2 bright
		FPRE C 3 bright
		FPRE D 2 bright
		FPRE E 2 bright
		Stop	
	}
}


//----------------------------------------------------------------
//----------------------------------------------------------------
//Mini Cultist
//----------------------------------------------------------------
//----------------------------------------------------------------



actor ThrownMiniCultist : thrownboner
{
	decal MiniCultistCrash
	scale 0.35
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("RevBox/CultistDie",0)
		goto CultistFlight
	CultistFlight:
		CLTM T 2 a_playsound ("doomboner/swing",6,0.80)
		CLTM U 2 
		CLTM V 2 a_playsound ("doomboner/swing",6,0.80)
		CLTM W 2 
		loop
	death:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("BonerBoom")
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 0 a_spawnitemex ("bonerspawn")
		TNT1 AAAA 0 a_spawnitemex("MiniCultist",0,0,0,random(-5,5),random(-5,5),5,0,SXF_NOCHECKPOSITION)
		TNT1 A 4
		stop
	}
}




actor MiniCultist : PocketBoner
{
	SeeSound "RevBox/CultistIdle"
	PainSound "RevBox/CultistPain"
	DeathSound "RevBox/CultistDie"
	ActiveSound "RevBox/CultistBark1"
	scale 0.35
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("TagBait")
		CLTM AB 10 A_Look
		goto idle
	idle:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_look
		CLTM AABBC 1 A_wander
		TNT1 A 0 a_look
		CLTM CDDEE 1 A_wander
		TNT1 A 0 a_look
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (100, "dance")
		loop
	TeleportCoolDown:
		TNT1 A 0
		TNT1 A 1 ThrustThing (angle * 256 / 360+(32 *random(0,7)), 0, 0, 0)
		TNT1 A 1 a_stop
		TNT1 A 0 a_giveinventory ("TeleportCooldownTimer",1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		CLTM AABBCCDDEE 2 A_Chase
		goto See
	See:
		TNT1 A 0
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		CLTM AABBCCDDEE 2 A_Chase
		TNT1 A 0 a_jumpifinventory ("TeleportCoolDownTimer",1,2)
		TNT1 A 0 a_teleport ("TeleportCoolDown","BonerRallyFlag","TelePortFog")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jump (80, "dance")
		TNT1 A 0 a_jump (30, "danceaway")
		Loop	
	Melee:
		CLTM E 0 
		CLTM HIJK 2 A_facetarget
		TNT1 A 0 a_playsound ("RevBox/MummyAttack",0,1,0,1.20)
		CLTM L 5 A_FaceTarget
		CLTM M 6 A_custommeleeattack (random(20, 50), "RevBox/MummyPunch")
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	Missile:
		CLTM E 0 
		CLTM F 4 A_facetarget
		CLTM F 5 A_FaceTarget
		TNT1 A 0 a_playsound ("RevBox/CultistGun",0)
		CLTM G 6 A_customMissile ("MiniCultistTesla",20)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		TNT1 A 0 a_jumpif (user_bonertimer >= 60, "death")
		TNT1 A 0 a_jump (30, "danceaway")
		Goto See
	pain:
		CLTM N 5
		CLTM N 5 A_Pain
		Goto See		
	death:
		CLTM N random (1,3)
		CLTM O 3
		CLTM P 3 a_scream
		CLTM Q 3 a_noblocking
		TNT1 A 0 a_playsound ("RevBox/CultistExplode",CHAN_VOICE)
		TNT1 AAAAAA 0 a_spawnitemex ("Whitebones",0,0,0,random(-10,10),random(-10,10),10)
		ISKL AA 0 a_spawnitemex("Whitehipbone",0,0,0,random(-10,10),random(-10,10),10)
		ISKL A 0 a_spawnitemex("Whiteribcage",0,0,0,random(-10,10),random(-10,10),12)
		CLTX ABCDEFGHIJKLMN 2 bright 
		Stop
	dance:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		CLTM R 4
		CLTM S 4
		TNT1 A 0 a_playsound ("RevBox/CultistIdle",0)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		CLTM R 4 a_chase
		CLTM S 4 a_chase
		CLTM R 4 a_chase
		CLTM S 4 a_chase
		CLTM R 4 a_chase
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		CLTM S 4
		goto see
	danceaway:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		CLTM R 4 a_wander
		CLTM S 4 a_wander
		TNT1 A 0 a_playsound ("RevBox/CultistIdle",0)
		TNT1 A 0 a_setuservar("user_bonertimer", user_bonertimer+1)
		CLTM R 4 
		CLTM S 4 
		CLTM R 4 a_wander
		CLTM S 4 a_wander
		CLTM R 4 a_wander
		TNT1 A 0 a_radiusgive ("BaitDistractor",400,RGF_MONSTERS)
		CLTM S 4 a_wander
		goto see
	}
}


Actor MiniCultistTesla : PocketBonerMissile
{
	scale 0.30
	states
	{
	spawn:
		TNT1 A 0 
		TNT1 A 1 a_playsound ("RevBox/Tesla",0,0.70,0,1.40)
		CLTZ A 1
		Goto TeslaFly
	TeslaFly:
		TNT1 A 0 
		TNT1 A 0 a_spawnitemex ("CultistZapFX",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		CLTZ A 1
		loop
	Death:
		TNT1 A 0 
		TNT1 A 0 a_playsound ("RevBox/CultistZap",0)
		TNT1 A 0 a_setscale (0.50,0.50)
		TNT1 A 0 a_giveinventory ("BonerPuller",1,AAPTR_TRACER)
		TNT1 AAAAA 0 a_spawnitemex ("CultistZapFX",random(-8,8),random(-8,8),random(-8,8),0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 5
		stop
	}
}


actor CultistZapFX : MummySmoke
{
	Renderstyle Translucent
	Alpha 0.8
	scale 0.50
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2
		TNT1 A 0 a_jump (150, "FlippedZap")
		CLTZ BCDEFG random (1,2) 
		CLTZ GFEDCB random (1,2) 
		stop
	FlippedZap:
		TNT1 A 0
		TNT1 A 0 a_setscale (-0.25,0.25)
		CLTZ BCDEFG random (1,2)  
		CLTZ GFEDCB random (1,2)  
		stop
	}
}



//============================================
//				MELEE ATTACKS
//============================================
//These are only relevant if the player tries
//to attack when they don't have enough
//crate energy



actor Bonermelee : fastprojectile
{
	Projectile
	projectilekickback 600
	speed 84
	damage (50)
	obituary "%o got destroyed by %k's pocket boner."
	+BLOODSPLATTER
	+dontblast
	+forcepain
	species "player"
	+THRUSPECIES
	height 10
	radius 10
	+noblood
	+NOEXTREMEDEATH
	mass 1000000
	states
	{
	Spawn:
		TNT1 AA 1
		stop
	Death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 radius_quake (1,5,0,8,0)
		TNT1 A 1 
		stop
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("skeleton/melee", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}

actor DoomBonerMelee : bonermelee
{
	states
	{
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("doomboner/punch", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}


actor GoldenBonermelee : bonermelee
{
	states
	{
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("RevBox/GoldBonerpunch", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}

actor MiniBlazMimicMelee : bonermelee
{
	states
	{
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("RevBox/BlazSwordHit", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}

actor PocketMummyMelee : bonermelee
{
	states
	{
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("RevBox/MummyPunch", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}

actor MiniPfhorMelee : bonermelee
{
	states
	{
	crash:
	Xdeath:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_PlaySound("RevBox/PfhorHit", CHAN_AUTO)
		TNT1 A 0 radius_quake (2,3,0,10,0)
		TNT1 A 1 A_radiusthrust (10000,30,RTF_NOIMPACTDAMAGE)
		TNT1 A 4
		stop
	}
}



//============================================
//				BONE GIBS
//============================================



actor PocketBoneBase
{
	+notimefreeze
	+cannotpush
	+movewithsector
	+dontsplash
	+noblockmap
	+missile
	+doombounce
	+thruspecies
	Species "player"
	-nogravity
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bounceonactors
	damage (15)
	scale 0.75
	Gravity 1.2 
	bouncecount 5
    bouncefactor 0.60
	Speed 5
	reactiontime 15
    States
    {
    Spawn:
        RBNE ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		RBNE B 300
		RBNE B 10 a_fadeout (0.25)
  		RBNE B 10 a_fadeout (0.25)
		RBNE B 10 a_fadeout (0.25)
		RBNE B 10 a_fadeout (0.25)
		stop
    }
}


actor PocketRevBones : PocketBoneBase
{
	Translation "4:4=63:63", "112:249=32:79"
	states
	{
	spawn:
		GBGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GBGB C 300
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		stop
	}
}


actor PocketRevHipBone : PocketBoneBase
{
	Translation "4:4=63:63", "112:249=32:79"
	states
	{
	spawn:
		GHGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GHGB C 300
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		stop
	}
}

actor PocketRevRibcage : PocketBoneBase
{
	Translation "4:4=63:63", "112:249=32:79"
	states
	{
	spawn:
		GRGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GRGB C 300
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		stop
	}
}


actor PocketRevSkull : PocketBoneBase
{
	scale 0.55
	states
	{
	spawn:
		RVHD ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jump (150, "dead2")
		RVHD D 300
		RVHD D 10 a_fadeout (0.25)
		RVHD D 10 a_fadeout (0.25)
		RVHD D 10 a_fadeout (0.25)
		RVHD D 10 a_fadeout (0.25)
		stop
	dead2:
		RVHD B 300
		RVHD B 10 a_fadeout (0.25)
		RVHD B 10 a_fadeout (0.25)
		RVHD B 10 a_fadeout (0.25)
		RVHD B 10 a_fadeout (0.25)
		stop
		
	}
}

//------------------------------------------------------
//------------------------------------------------------
//Gold bones for Golden Boner
//------------------------------------------------------
//------------------------------------------------------


actor goldbones : PocketBoneBase
{
	states
	{
	spawn:
		GBGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GBGB C 300
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		GBGB C 10 a_fadeout (0.25)
		stop
	}
}


actor goldskull : PocketBoneBase
{
	scale 0.55
	states
	{
	spawn:
		GSK1 ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_jump (150, "dead2")
		GSK1 D 300
		GSK1 D 10 a_fadeout (0.25)
		GSK1 D 10 a_fadeout (0.25)
		GSK1 D 10 a_fadeout (0.25)
		GSK1 D 10 a_fadeout (0.25)
		stop
	dead2:
		GSK1 B 300
		GSK1 B 10 a_fadeout (0.25)
		GSK1 B 10 a_fadeout (0.25)
		GSK1 B 10 a_fadeout (0.25)
		GSK1 B 10 a_fadeout (0.25)
		stop
		
	}
}


actor goldhipbone : PocketBoneBase
{
	states
	{
	spawn:
		GHGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GHGB C 300
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		GHGB C 10 a_fadeout (0.25)
		stop
	}
}

actor goldribcage : PocketBoneBase
{
	states
	{
	spawn:
		GRGB ABCD 2
		TNT1 A 0 a_countdown
		loop
	death:
		GRGB C 300
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		GRGB C 10 a_fadeout (0.25)
		stop
	}
}

//------------------------------------------------------
//------------------------------------------------------
//White bones for Blaz Mimic
//------------------------------------------------------
//------------------------------------------------------

actor WhiteBones : goldbones
{
	scale 0.55
	Translation "48:249=16:95"
}

actor WhiteHipBone : GoldHipbone
{
	scale 0.55	
	Translation "48:249=16:95"
}

actor WhiteRibcage : GoldRibcage
{
	scale 0.55
	Translation "48:249=16:95"
}

//------------------------------------------------------
//------------------------------------------------------
//Gray bones for the Mummy
//------------------------------------------------------
//------------------------------------------------------

actor MummyBones : goldbones
{
	scale 0.55
	Translation "4:4=95:95", "7:249=11:108"
}


actor MummyHipBone : GoldHipbone
{
	scale 0.55	
	Translation "4:4=95:95", "7:249=11:108"
}

actor MummyRibcage : GoldRibcage
{
	scale 0.55
	Translation "4:4=95:95", "7:249=11:108"
}



actor bonerspawn
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	Renderstyle Add
	Alpha 0.80
	scale 0.50
	+bright
	States
	{
	spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("misc/teleport",0,1,0,0.80)
		TFOG ABABCDEFGHIJ 3 Bright
		stop
	death:
		TNT1 A 1
		stop
	}
}

actor BonerBoom
{
	+NOINTERACTION
	+clientsideonly
	Radius 4
	Height 5
	Renderstyle Add
	Alpha 0.5
	+bright
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_playsound ("weapons/rocklx",0,0.80,0,1.60)
		MISL BCD 3 Bright a_fadeout (0.06)
		wait
	death:
		TNT1 A 1
		stop
	}
}


actor BonerPuller : custominventory
{
	+inventory.alwayspickup
	+INVENTORY.AUTOACTIVATE
	states
	{
	pickup:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 1 thrustthingz (0,25,1,0)
		stop
	}
}


Actor TeleportCoolDownTimer : Powerup
{
  Powerup.Duration -30
}
	

actor bonerhit : inventory
{inventory.maxamount 1}



actor DoomBonerReady : inventory
{inventory.maxamount 1}

actor GoldenBonerReady : inventory
{inventory.maxamount 1}

actor PocketMummyReady : inventory
{inventory.maxamount 1}

actor BlazMimicReady : inventory
{inventory.maxamount 1}

actor MiniPfhorReady : inventory
{inventory.maxamount 1}

actor MiniCultistReady : inventory
{inventory.maxamount 1}


actor PfhorActive : inventory
{inventory.maxamount 1}

