

ACTOR D4Shotgun : DoomWeapon Replaces Shot_Gun
{
	Weapon.SelectionOrder 1300
	Weapon.AmmoUse1 1
	Weapon.AmmoGive1 8
	Weapon.AmmoType1 "Shell"
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Shell"
	Weapon.AmmoType2 "ShotgunUpgrade"
	Inventory.PickupMessage "You got the Combat Shotgun!"
	Obituary "$OB_MPSHOTGUN"
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOAUTOAIM
	Tag "$TAG_SHOTGUN"
	States
	{
	Ready:
		SHTG A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("IsUpgradingWeapons",1,"UpgradeWeapons")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"ChangeAltMode")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Loop
		
	Steady:	
		TNT1 A 0
		TNT1 A 5
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Select2
		
	ChangeAltMode:
		SHTG A 1
		TNT1 A 0 A_TakeInventory("Reloading", 1)
		TNT1 A 0 A_JumpIfInventory("ShotgunUpgrade", 1, 1)
		Goto NoUpgrades
		SHTG A 1
		TNT1 A 0 A_JumpIfInventory("ShotgunUpgrade", 2, 1)
		Goto NoUpgrades2
		SHTG A 1
		TNT1 A 0 A_JumpIfInventory("D4AltMode", 1, "ChangeAltMode2")
		TNT1 A 0 A_GiveInventory("D4AltMode", 1)
		TNT1 A 0 A_Print("Explosive Shells Selected.", 2)
		SHTS CBAFFFFFF 1
		SHTS ABC 1
		SHTF EFGH 1
		SHTG A 0 A_PlaySound("SHTGP1", 3)
		SHTF IJKLMMLKJIHGFE 1
		Goto Ready
		
	ChangeAltMode2:	
		SHTG A 1
		TNT1 A 0 A_TakeInventory("D4AltMode", 1)
		TNT1 A 0 A_Print("Burst Fire Mode Selected.", 2)
		SHTS CBAFFFFFF 1
		SHTS ABC 1
		SHTF EFGH 1
		SHTG A 0 A_PlaySound("SHTGP1", 3)
		SHTF IJKLMMLKJIHGFE 1
		Goto Ready
		
		
		
		
	Deselect:
		SHTS CBA 0
		TNT1 A 0 A_TakeInventory("IsD4Weapon", 1)
		TNT1 A 0 A_TakeInventory("D4ShotgunSelected", 1)
		TNT1 A 0 A_TakeInventory("D4AltMode", 1)
		SHTG AAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Loop
	Select:
		TNT1 A 1 A_Raise
		TNT1 A 0 A_TakeInventory("IsFiringSecondary",1)
		TNT1 A 0 A_TakeInventory("FiredSecondary",1)
		TNT1 A 0 A_TakeInventory("IsFiringPrimary",1)
		TNT1 A 0 A_TakeInventory("FiredPrimary",1)
		TNT1 A 0 A_GiveInventory("StopDualWield", 1)
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("Kicking",1)
		TNT1 A 0 A_Takeinventory("TossGrenade",1)
		TNT1 A 0 A_Takeinventory("HasPlasmaWeapon",1)
		SHTG AAAAAAAAA 0 A_Raise
		Select2:
		SHTS ABC 1
		TNT1 A 0 A_GiveInventory("D4ShotgunSelected", 1)
		TNT1 A 0 A_GiveInventory("IsD4Weapon", 1)
		Goto Ready
		
	Fire:
		TNT1 AAAAAAA 0 A_FireCustomMissile("Tracer", random(-5,5),0,12,-12,0,random(-1,1))
		TNT1 A 0 A_FireBullets (3.0, 3.0, 7, 8, "ShotgunPuff")
		TNT1 A 0 A_PlaySound("SHTGF", 1)
		SHTF A 1 BRIGHT A_SetPitch(-4.0 + pitch)
		SHTF B 1
		SHTF CCD 1 A_SetPitch(1.0 + pitch)
		SHTG A 2 A_SetPitch(1.0 + pitch)
		SHTF EFGH 1
		TNT1 A 0 A_FireCustomMissile ("ShotCaseSpawn", 0, 0, 20, -8)
		SHTG A 0 //A_PlaySound("SHTGP1", 3)
		SHTF IJKLMMLKJIHGFE 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTG A 2
		TNT1 A 0 A_Refire
		SHTG A 5 A_WeaponReady
		Goto Ready
		
	AltFire:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("ShotgunUpgrade", 1, 1)
		Goto NoUpgrades
		TNT1 A 0 A_JumpIfInventory("D4AltMode", 1, "AltFire2")
		TNT1 A 0 A_JumpIfInventory("Shell", 3, 1)
		Goto NoAmmo
		TNT1 AAAAAAA 0 A_FireCustomMissile("Tracer", random(-5,5),0,12,-12,0,random(-1,1))
		TNT1 A 0 A_FireBullets (3.0, 3.0, 7, 8, "ShotgunBulletPuff")
		TNT1 A 0 A_PlaySound("SHTGF", 1)
		SHTF A 1 BRIGHT A_SetPitch(-5.0 + pitch)
		SHTF B 1 A_TakeInventory("Shell", 1)
		SHTF CCD 1 A_SetPitch(1.0 + pitch)
		SHTG A 1
		
		
		TNT1 AAAAAAA 0 A_FireCustomMissile("Tracer", random(-5,5),0,12,-12,0,random(-1,1))
		TNT1 A 0 A_FireBullets (3.0, 3.0, 7, 8, "ShotgunPuff")
		TNT1 A 0 A_PlaySound("SHTGF", 1)
		SHTF A 1 BRIGHT A_SetPitch(-5.0 + pitch)
		SHTF B 1 A_TakeInventory("Shell", 1)
		SHTF CCD 1 A_SetPitch(1.0 + pitch)
		SHTG A 1
		
		TNT1 AAAAAAA 0 A_FireCustomMissile("Tracer", random(-5,5),0,12,-12,0,random(-1,1))
		TNT1 A 0 A_FireBullets (3.0, 3.0, 7, 8, "ShotgunPuff")
		TNT1 A 0 A_PlaySound("SHTGF", 1)
		SHTF A 1 BRIGHT A_SetPitch(-5.0 + pitch)
		SHTF B 1 A_TakeInventory("Shell", 1)
		SHTF CCD 1 A_SetPitch(1.0 + pitch)
		SHTG A 10 A_SetPitch(1.0 + pitch)
		

		
		
		SHTF EFGH 1
		TNT1 AAA 0 A_FireCustomMissile ("ShotCaseSpawn", 0, 0, 20, -8)
		SHTG A 0 A_PlaySound("SHTGP1", 3)
		SHTF IJKLMMLKJIHGFE 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTG A 1
		TNT1 A 0 A_Refire
		SHTG A 5 A_WeaponReady
		Goto Ready	
		
	AltFire2:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Shell", 6, 1)
		Goto NoAmmo
		TNT1 A 0 A_TakeInventory("Shell", 6)
		TNT1 A 0 A_PlaySound("SHTGF", 1)
		TNT1 A 0 A_FireCustomMissile("ShotgunGrenade", random(-1,1),0,6,-2,0,random(-1,1))
		SHTF A 2 BRIGHT A_SetPitch(-4.0 + pitch)
		SHTF B 1
		SHTF CCD 1 A_SetPitch(1.0 + pitch)
		SHTG A 6 A_SetPitch(1.0 + pitch)
		SHTF EFGH 1
		TNT1 A 0 A_FireCustomMissile ("ShotCaseSpawn", 0, 0, 20, -8)
		SHTG A 0 //A_PlaySound("SHTGP1", 3)
		SHTF IJKLMMLKJIHGFE 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTG A 2
		TNT1 A 0 A_Refire
		SHTG A 5 A_WeaponReady
		Goto Ready
		
	Spawn:
		D4W3 A -1
		Stop
		
	DoKick:
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        KICK H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Select2
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Select2
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Select2
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Select2

    Taunt:
        TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
		Goto Select2
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Select2
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1)
		Goto NoGrenade
		GRTH ABCD 1
		TNT1 A 0 A_GiveInventory("FiredGrenade", 1)
		TNT1 A 0 A_PLaySound ("GRNPIN")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		TNT1 A 1 
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		Goto Select2
	NoGrenade:
		TNT1 A 0
		TNT1 A 0 A_Print("No Grenades Left.", 2)
		Goto Ready	
	NoUpgrades:
		TNT1 A 0
		TNT1 A 0 A_Print("You have no upgrades for this weapon.", 2)
		Goto Ready
	NoUpgrades2:
		TNT1 A 0
		TNT1 A 0 A_Print("You don't have a level 2 upgrade for this weapon.", 2)
		Goto Ready	
	NoAmmo:
		TNT1 A 0
		TNT1 A 0 A_Print("You don't have enough ammo to use this weapon's alt fire.", 2)
		Goto Ready	
	UpgradeWeapons:
		TNT1 A 0 
		TNT1 A 0 A_TakeInventory("IsUpgradingWeapons", 1)
		NULL A 0 SetPlayerProperty(0,1,4)
		PK4P ABCDEFGH 2
		TNT1 A 6
		PUN3 ABCDE 1
        TNT1 A 0 A_PlaySound("weapons/gswing")
		PUN3 F 1
		RIFF AA 0 A_FireCustomMissile("PickD4UpgradeAttack", 0, 0, 0, -9)
		PUN3 GHI 1
		PUN3 JK 1
		NULL A 0 SetPlayerProperty(0,0,4)
		TNT1 A 12
		TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		Goto Select2	
	}
}









ACTOR ShotgunGrenade: Rocket2
{
	Radius 4
	Height 4
	Speed 40
	Damage 6
    Gravity 0.4
	Scale 0.5
	Renderstyle Add
	States
	{
	Spawn:
	    TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails", 0, random( -2, 2))
		FR7X A 1 BRIGHT A_SpawnItem("RedFlareSmall",0,0)
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails")
		FR7X B 1 BRIGHT A_SpawnItem("RedFlareSmall",0,0)
		Loop
	}
}