//==SHOTGUN==
//Blaz gets a sword throw boost, allowing him to toss his sword 
//for extra damage

//Doomslayer gets the mourning star, a reliable, powerful shotgun.

//Kustam unlocks a spreadgun blast from his default hand cannon
//shot

Actor GMOTAShotgun : custominventory replaces shotgun
{
	Radius 14
	Height 14
	+quiet
    +DONTGIB
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
        TNT1 A 0 A_CustomMissile ("BlazThrowBoostSprite",0,0,0,CMF_AIMDIRECTION)
        TNT1 A 0 A_CustomMissile ("DoomslayerShotgunSprite",0,0,0,CMF_AIMDIRECTION)
		TNT1 A 0 A_CustomMissile ("KustamScatterUpgradeSprite",0,0,0,CMF_AIMDIRECTION)
	spawn1:
		ITRO ABCDEFGH 1 Bright
		loop
	Pickup:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory ("IamLordBlaz",1,"BlazThrowBoost")
		TNT1 A 0 A_JumpIfInventory ("IamDoomSlayer",1,"DoomSlayerShotgun")
		TNT1 A 0 A_JumpIfInventory ("IamKustam",1,"KustamScatterUpgrade")
		TNT1 A 1
		stop
	BlazThrowBoost:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_SetBlend (FFFF00,0.1,5)
		TNT1 A 0 A_PlaySound ("powerups/upgrade",CHAN_ITEM)
		TNT1 A 0 ACS_NamedExecuteAlways("WeaponLog",0,1,0,0)			
		TNT1 A 0 A_GiveInventory ("ThrowBoostTech", 1)
		TNT1 A 1 A_GiveInventory ("arcaneforce", 10)
		TNT1 A 0 A_GiveInventory ("DecayPause",1)
		stop
	DoomslayerShotgun:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("WeaponLog",0,1,0,0)			
		//TNT1 A 0 a_log ("You got the Mourning Star shotgun!")
		TNT1 A 0 A_PlaySound ("misc/w_pkup",CHAN_ITEM)
		TNT1 A 0 A_SetBlend (FFFF00,0.1,5)
		TNT1 A 0 A_GiveInventory ("SlayerMettle",8)
		TNT1 A 0 A_GiveInventory ("MourningStar",1)
		TNT1 A 1
		stop
	KustamScatterUpgrade:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("WeaponLog",0,1,0,0)			
		//TNT1 A 0 a_log ("You got the Mourning Star shotgun!")
		TNT1 A 0 A_PlaySound ("Kustam/upgradeget",CHAN_ITEM)
		TNT1 A 0 A_SetBlend (FFFF00,0.1,5)
		TNT1 A 0 A_GiveInventory ("KustamKineticBattery",2)
		TNT1 A 0 A_GiveInventory ("ScatterUpgrade",1)
		TNT1 A 1
		stop
	}
}

//Blaz item token
actor ThrowBoostTech : inventory
{inventory.maxamount 1}


//Kustam Item Token
actor ScatterUpgrade : inventory
{inventory.maxamount 1}


//Item sprites
actor BlazThrowBoostSprite : GMOTAweaponsprite
{
	VisibleToPlayerClass LordBlaz
    States
    {
	spawn:
		TNT1 A 0
		TWSC A 1 bright
		TNT1 A 0 A_Warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 A_CheckFlag ("SPECIAL","spawn",AAPTR_TARGET)
		TWSC A 1 bright
		goto death
	death:
		TNT1 A 0
		TNT1 A 1 
		stop
    }
}

actor DoomSlayerShotgunSprite : GMOTAWeaponsprite
{
    VisibleToPlayerClass DoomSlayer
    States
    {
	spawn:
		TNT1 A 0
		MSPU A 1 bright
		TNT1 A 0 A_Warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 A_CheckFlag ("SPECIAL","spawn",AAPTR_TARGET)
		MSPU A 1 bright
		goto death
	death:
		TNT1 A 0
		TNT1 A 1
		stop
    }
}

actor KustamScatterUpgradeSprite : GMOTAweaponsprite
{
    VisibleToPlayerClass Kustam
    States
    {
	spawn:
		TNT1 A 0
		HCMG A 1 bright
		TNT1 A 0 A_Warp (AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
		TNT1 A 0 A_CheckFlag ("SPECIAL","spawn",AAPTR_TARGET)
		HCMG A 1 bright
		goto death
	death:
		TNT1 A 1
		stop
    }
}




