Actor Satanic_KindredGenesis : Weapon
{    
	Weapon.SelectionOrder 99999
	Weapon.AmmoUse2 	0
    Weapon.AmmoUse 		0
    Weapon.AmmoType 	"Satanic_SoulAmmo"
	Inventory.PickupMessage "the unholy tome of kindred genesis is now available for your perusal."
	Tag "Kindred Genesis"
	+NOALERT	
	+FLOATBOB
	//+NO_AUTO_SWITCH
	+CHEATNOTWEAPON
	Weapon.BobStyle "Alpha"
	Weapon.BobSpeed 1.5
	States 
    { 
	Spawn: 
		NCRO A -1 
		Loop 
	Ready: 
		KIND A 1 A_WeaponReady
		Loop
	Deselect: 
		TNT1 A 0 A_TakeInventory("WeapWithNoTertChecker",1)
	DeseLoop:	
		TNT1 A 0 A_Lower
		KIND A 1 A_Lower 
		Loop 
	Select: 
		TNT1 A 0 A_GiveInventory("WeapWithNoTertChecker",1)
		TNT1 A 0 A_JumpIfInventory("PWCIsOff",1,"DefXHair")
		TNT1 A 0 A_SetCrosshair(8)
		Goto SeLoop
	DefXHair:	
		TNT1 A 0 A_SetCrosshair(0)
	SeLoop:	
		TNT1 A 0 A_Raise
		KIND A 1 A_Raise 
		Loop
	Fire:
		TNT1 A 0 A_JumpIfHealthLower(200,1)
		Goto Ready
		TNT1 A 0 A_JumpIfInventory("Satanic_SoulAmmo",4,"Restore3Health")
		Goto Ready
	Restore3Health:
		TNT1 A 0 A_GunFlash
		KIND ABC 5
		KIND D 5 BRIGHT
		TNT1 A 0 A_GiveInventory("Satanic_HealthAdder",3)
		TNT1 A 0 A_TakeInventory("Satanic_SoulAmmo",4)
		KIND E 5 BRIGHT A_XScream
		KIND FBA 5 
		Goto Ready
	Altfire:
		KIND A 1 A_JumpIfInventory("Satanic_SoulAmmo",6,1)
		Goto Ready
		KIND A 1 A_JumpIfHealthLower(200,"Restore4Health")
		Goto Ready
	Restore4Health:
		KIND ABC 3
		KIND D 3 BRIGHT
		TNT1 A 0 A_GiveInventory("Satanic_HealthAdder",4)
		TNT1 A 0 A_TakeInventory("Satanic_SoulAmmo",6)
		KIND E 3 BRIGHT
		TNT1 A 0 A_JumpIfInventory("Satanic_SoulAmmo",6,1)
		Goto Restore4HealthEnd
		TNT1 A 0 A_JumpIfHealthLower(200,1)
		Goto Restore4HealthEnd
		TNT1 A 0 A_Refire("Restore4HealthHold")
		Goto Restore4HealthEnd
	Restore4HealthHold:
		TNT1 A 0 A_JumpIfInventory("Satanic_SoulAmmo",6,1)
		Goto Ready
		KIND D 3 BRIGHT
		TNT1 A 0 A_GiveInventory("Satanic_HealthAdder",4)
		TNT1 A 0 A_TakeInventory("Satanic_SoulAmmo",6)
		KIND E 3 BRIGHT
		TNT1 A 0 A_JumpIfInventory("Satanic_SoulAmmo",6,1)
		Goto Restore4HealthEnd
		TNT1 A 0 A_JumpIfHealthLower(200,1)
		Goto Restore4HealthEnd
		TNT1 A 0 A_Refire("Restore4HealthHold")
		Goto Restore4HealthEnd
	Restore4HealthEnd:
		KIND E 3 BRIGHT A_XScream
		KIND FBA 3 
		Goto Ready
	} 
}

Actor Satanic_KindredGenesisGiver : CustomInventory Replaces Soulsphere			
{
	Inventory.PickupMessage "the unholy tome of kindred genesis is now available for your perusal."
	inventory.amount 1
	inventory.maxamount 1
	Inventory.Icon NCROB0
	Tag "Kindred Genesis"
	+FLOATBOB
	-COUNTITEM
	-INVENTORY.AUTOACTIVATE
	-INVENTORY.ALWAYSPICKUP
	+INVBAR
	-INTERHUBSTRIP
    States
    {
	Spawn: 
		NCRO A -1 
		Loop 
	Pickup: 
		TNT1 A 0 A_GiveInventory ("Satanic_KindredGenesis", 1)
		stop 
	Use: 
		TNT1 A 0 A_GiveInventory("Satanic_HealthAdder",50)
		TNT1 A 0 A_TakeInventory("Satanic_KindredGenesis",1)
		stop 
	}
}