//--sub weapons--//

//This candle acts as the foundation for subweapon pickups, it has a visible sprite
//That slowly diminishes with time to show how much time before the weapon vanishes
//It too uses the disguise sprite system as GMOTA's main weapons!

actor subweaponcandle : custominventory
{
	+notimefreeze
	+dropped
    +DONTGIB
	+NOTELEPORT
	Radius 13
	Height 14
	+quiet
	+bright
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
	spawn1:
		TNT1 A 0
		SCNL AB 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn2")
		loop
	Spawn2:
		TNT1 A 0
		SCNL B 1 A_TakeInventory ("subtimer",999)
	Burn2:
		TNT1 A 0
		SCNL CD 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn3")
		loop
	Spawn3:
		TNT1 A 0
		SCNL D 1 A_TakeInventory ("subtimer",999)
	Burn3:
		SCNL EF 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn4")
		loop
	Spawn4:
		TNT1 A 0
		SCNL F 1 A_TakeInventory ("subtimer",999)
	Burn4:
		TNT1 A 0
		SCNL GH 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"death")
		loop
	death:
		TNT1 A 0
		TNT1 A 1 
		stop
	Pickup:
		TNT1 A 0
		SCNL A 1 A_JumpIfInventory ("SubWeaponLocked", 1, "NoGet")
		TNT1 A 0 A_Jump (256,"PickUp2")
		Fail
	Pickup2:
		TNT1 A 0
		TNT1 A 0
		Fail
	NoGet:
		TNT1 A 0
		TNT1 A 0
		Fail
	}
}


//===========================================================================
//===========================================================================
//===========================================================================

//Spell Candle

actor spellcandle : custominventory
{
	+notimefreeze
	+dropped
    +DONTGIB
	+NOTELEPORT
	Radius 13
	Height 14
	+quiet
	+bright
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
	spawn1:
		TNT1 A 0
		BCNL AB 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn2")
		loop
	Spawn2:
		TNT1 A 0
		BCNL B 1 A_TakeInventory ("subtimer",999)
	Burn2:
		TNT1 A 0
		BCNL CD 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn3")
		loop
	Spawn3:
		TNT1 A 0
		BCNL D 1 A_TakeInventory ("subtimer",999)
	Burn3:
		BCNL EF 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"Spawn4")
		loop
	Spawn4:
		TNT1 A 0
		BCNL F 1 A_TakeInventory ("subtimer",999)
	Burn4:
		TNT1 A 0
		BCNL GH 2
		TNT1 A 0 A_GiveInventory ("subtimer",1)
		TNT1 A 0 A_JumpIfInventory ("subtimer",30,"death")
		loop
	death:
		TNT1 A 0
		TNT1 A 1 
		stop
	Pickup:
		TNT1 A 0
		BCNL A 1 A_JumpIfInventory ("SubWeaponLocked", 1, "NoGet")
		TNT1 A 0 A_Jump (256,"PickUp2")
		Fail
	Pickup2:
		TNT1 A 0
		TNT1 A 0
		Fail
	NoGet:
		TNT1 A 0
		TNT1 A 0
		Fail
	}
}



//----------------------------------------------------------
//Subweapon Tokens
//----------------------------------------------------------


actor subtimer : inventory
{inventory.maxamount 30}



actor winkout
{
	+nogravity
	scale 2
	+BRIGHT
	+clientsideonly
	states
	{
	spawn:
		GDSP FEDCBA 2
		stop
	}
}


actor Blazwinkout : Winkout
{
	scale 1
	VisibleToPlayerClass LordBlaz
	states
	{
	spawn:
		GDSP FEDCBA 2
		stop
	}
}

actor DoomslayerWinkout : Winkout
{
	scale 1
	VisibleToPlayerClass Doomslayer
}
	
actor KustamWinkout : Winkout
{
	scale 1
	VisibleToPlayerClass Kustam
}

