//ASSAULT RIFLES (c) 2015 SGT MARK IV tm

Actor FiredSecondary : Inventory
{
inventory.maxamount 1
}

Actor FiredPrimary : Inventory
{
inventory.maxamount 1
}

Actor StopDualWield : Inventory
{
inventory.maxamount 1
}




Actor IsFiringSecondary : Inventory
{
inventory.maxamount 1
}


ACTOR DualRifles: DoomWeapon
{
	Weapon.BobRangeX 0.4
	Weapon.BobRangeY 0.6
	Weapon.BobStyle InverseSmooth
	Weapon.BobSpeed 2.3
	Weapon.AmmoUse1 0 
	Weapon.SelectionOrder 5100
	Weapon.AmmoGive1 0 //How much ammo can be gathered with this weapon
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Clip2" //Reserve ammo type
	Weapon.AmmoType2 "DoubleRifleAmmo" //Magazine ammo type
	Obituary "%o was drilled by %k's Double Rifles." //Kill message
    AttackSound "None" //You better leave this clear
	Inventory.Pickupmessage "" //Pickup message
	Inventory.PickupSound "PICKR"
    +WEAPON.NOAUTOAIM //Makes this weapon never autoaim, so recoil can work better
    Scale 0.6 //Weapon's pickup sprite size
	+WEAPON.NOAUTOFIRE
	+WEAPON.NO_AUTO_SWITCH
	States
	{
	
	Spawn:
	TNT1 A 100//Pickup sprite
	Loop
	
	Ready:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("DSELECT", 1)
		P2SS AB 1
		P2SS CDEF 1
		TNT1 A 0 A_GunFlash
		Goto ReadyToFire
		
	RemoveDual:
	     TNT1 A 0 A_GiveInventory("Rifle", 1)
		 TNT1 A 0 A_TakeInventory("DualRifles", 1)
		 Goto Ready
		
	Fire:
	P2W2 A 1 A_WeaponReady(WRF_NOFIRE)
	Goto ReadyToFire
	
	ReadyToFire:
		P2W2 A 1 A_WeaponReady(WRF_NOFIRE)// Weapon is ready to fire
		//TNT1 A 0 A_JumpIfInventory("IsFiringSecondary", 1, 1)
		//TNT1 A 0 A_GunFlash
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun") //Check if player wants to reload
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload2") //Check if player wants to reload
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("Weaponspecial",1,"SwitchingDual")
		Loop
		
		SwitchingDual:
		TNT1 A 0 A_TakeInventory("weaponspecial",1)
		TNT1 A 0 A_SelectWeapon("Rifle")
		Goto Ready+8
		
	Deselect:
			TNT1 A 0 A_TakeInventory("Weaponspecial2")
					TNT1 A 0 A_TakeInventory("switchfiremode")
		TNT1 A 0 A_TakeInventory("Weaponspecial")
		TNT1 AAAAAA 0 A_Lower
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_Lower //Makes player switch weapons faster
		Wait
	Select:
		TNT1 A 0 A_Raise //Makes the weapon always be selected fast
		Wait
	
	DryFire:
	    P2W2 A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_PlaySound("DRYFIRE", 7)
		P2W2 A 5 A_WeaponReady(WRF_NOFIRE)
		Goto ReadyToFire
	 
	FireLeftGun:
	    P2W2 A 0 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 1, 1)//First of all, checks if there is ammo inside the gun
		Goto Reload//Couldn't find any ammo. Reload
		
		TNT1 A 0 A_JumpIfInventory("LeftRifleAmmo", 1, 1)//Checks if there is ammo inside the left Rifle
		Goto DryFire//Couldn't find any ammo. Don't fire.
		
		TNT1 A 0 A_TakeInventory("DoubleRifleAmmo", 1)//Removes 1 ammo from magazine
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_PlaySound("FLER", 1)//Play gun fire sound
		TNT1 A 0 A_PlaySound("RIFLEF", 7)
		TNT1 A 0 A_FireCustomMissile("Shakeyourassminor", 0, 0, 0, 0)
	    P2W2 B 1 BRIGHT A_WeaponReady(WRF_NOFIRE)
				TNT1 A 0 A_ZoomFactor(0.99)
		TNT1 A 0 A_FireBullets(11,3,-1,10,"MachineGunBulletPuff",1)//Horizontal Spread, Vertical Spread, Numbers of Projectiles (Leave as -1 if its a single one), Damage Factor
		TNT1 A 0 A_SetPitch(+0.6 + pitch)//Vertical recoil up
		P2W2 C 1 A_WeaponReady(WRF_NOFIRE)
				TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",0,0,-20,-10)//Ejects empty brass
		P2W2 C 0 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(-0.6 + pitch)//Vertical recoil down
		P2W2 D 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_TakeInventory("LeftRifleAmmo", 1)//Remove the fake ammo
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 1, 1)//Checks if there is ammo inside the gun
	    Goto Reload//Couldn't find any ammo. Reload.
		P2W2 A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("LeftRifleAmmo", 1, 1)//Checks if there is ammo inside the left Rifle
		Goto DryFire//Couldn't find any ammo. Don't fire.
		TNT1 A 0 A_JumpIfInventory("FiredPrimary",1,"FireLeftGun") //Check if player still is firing left gun
		P2W2 A 0
		Goto Fire//No need to reload. Get back to Ready state.
		
	Flash:	
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		P2W1 A 1 
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "FireRightGun")
		//P2W1 A 1
		Loop
	
	DontFlash:
	    TNT1 A 1
		Goto Flash
	
	FireRightGun:
	    P2W1 A 0 A_WeaponReady
		
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		TNT1 A 0 A_GiveInventory("IsFiringSecondary", 1)
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 1, 2)//First of all, checks if there is ammo inside the gun
		TNT1 A 0 //A_GiveInventory("Reloading", 1)//Couldn't find any ammo. Reload
		Goto Flash//Couldn't find any ammo. Reload
		
		TNT1 A 0 A_JumpIfInventory("RifleAmmo", 1, 1)//Checks if there is ammo inside the left Rifle
		Goto DryFire2//Couldn't find any ammo. Don't fire.
		
		TNT1 A 0 A_TakeInventory("DoubleRifleAmmo", 1)//Removes 1 ammo from magazine
		
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_PlaySound("FRIR", 1)//Play gun fire sound
		TNT1 A 0 A_PlaySound("RIFLEF", 7)
		TNT1 A 0 A_FireCustomMissile("Shakeyourassminor", 0, 0, 0, 0)
	    P2W1 B 1 BRIGHT A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_ZoomFactor(0.99)
		TNT1 A 0 A_FireBullets(11,3,-1,10,"MachineGunBulletPuff",1)//Horizontal Spread, Vertical Spread, Numbers of Projectiles (Leave as -1 if its a single one), Damage Factor
		TNT1 A 0 A_SetPitch(+0.6 + pitch)//Vertical recoil up
		P2W1 C 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",0,0,20,-10) //Ejects empty brass
		P2W1 C 0 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(-0.6 + pitch)//Vertical recoil down
		P2W1 D 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_TakeInventory("RifleAmmo", 1)//Remove the fake ammo
		P2W1 A 0 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 1, 1)//Checks if there is ammo inside the gun
		TNT1 A 0 //A_GiveInventory("Reloading", 1)//Couldn't find any ammo. Reload
		TNT1 A 0 A_JumpIfInventory("RifleAmmo", 1, 1)//Checks if there is ammo inside the right Rifle
		Goto DryFire2//Couldn't find any ammo. Don't fire.
		P2W1 A 1 A_WeaponReady(WRF_NOFIRE)
	TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "FireRightGun")
		Goto Flash
		
	DryFIre2:
	    P2W1 A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_PlaySound("DRYFIRE", 7)
		P2W1 AAAAA 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("StopDualWield", 1, "LightDone")
		Goto Flash
		
		
		
		
		
		
		
		
		
	Reload:
	    
	    P2SG A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) //Always leave one free line before the reload animation to prevent bugs
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 62, "ReadytoFire")//Checks if the weapon is not fully reloaded, if yes, cancel reload.
		TNT1 A 0 A_PlaySound("DRYFIRE", 5)
		TNT1 A 0 A_JumpIfInventory("Clip2", 1, 1)//Checks if you have spare ammo
		Goto ReadyToFire//Identified that you have no spare ammo. Get back to Ready animation
		TNT1 A 0 A_GiveInventory("StopDualWield", 1)
        
	Refill:	
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Clip2", 1, 1)//Check if you have spare ammo again. This line is necessary in case you don't have enough ammo to fill an entire clip.
		Goto FinishReload//Gun is fully loaded. Go to finish animation
	    TNT1 A 0 A_TakeInventorY("Clip2", 1)//Removes one spare bullet
		TNT1 A 0 A_GiveInventory("DoubleRifleAmmo", 1)//Puts one bullet inside the clip
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 60, "FinishReload")//Checks if weapons is full
		Loop
		
	 FinishReload:	//Weapon is fully loaded. Time to play the reloading animation.
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("LeftRifleAmmo", 31, "FinishReloadRightOnly")
		TNT1 A 0 A_JumpIfInventory("RifleAmmo", 31, "FinishReloadLeftOnly")
		TNT1 A 0 A_GiveInventory("LeftRifleAmmo", 30)
		TNT1 A 0 A_GiveInventory("RifleAmmo", 30)
		P2SS FEDCBA 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 5
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",185,0,8,-4)
		R2RR ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 10
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
		R2RL ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("StopDualWield", 1)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 A 0 A_TakeInventory("FiredSecondary", 1)
		TNT1 A 5
		P2SS ABCDEF 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		Goto ReadyToFire
		
		
		
		
		//Reload 2 is for manual reload, leaves one more bullet inside the gun.
		
	Reload2:
	    P2SG A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) //Always leave one free line before the reload animation to prevent bugs
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 62, "ReadytoFire")//Checks if the weapon is not fully reloaded, if yes, cancel reload.
		TNT1 A 0 A_JumpIfInventory("Clip2", 1, 1)//Checks if you have spare ammo
		Goto ReadyToFire//The game identified that you have no spare ammo. Get back to Ready animation
		TNT1 A 0 A_GiveInventory("StopDualWield", 1)
        
	Refill2:	
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Clip2", 1, 1)//Check if you have spare ammo again. This line is necessary in case you don't have enough ammo to fill an entire clip.
		Goto FinishReload//Gun is fully loaded. Go to finish animation
	    TNT1 A 0 A_TakeInventorY("Clip2", 1)//Removes one spare bullet
		TNT1 A 0 A_GiveInventory("DoubleRifleAmmo", 1)//Puts one bullet inside the clip
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo", 62, "FinishReload2")//Checks if weapons is full
		Loop
		
		
	FinishReload2:	//Weapon is fully loaded. Time to play the reloading animation.
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("LeftRifleAmmo", 31, "FinishReloadRightOnly")
		TNT1 A 0 A_JumpIfInventory("RifleAmmo", 31, "FinishReloadLeftOnly")
		TNT1 A 0 A_GiveInventory("LeftRifleAmmo", 62)
		TNT1 A 0 A_GiveInventory("RifleAmmo", 62)
		P2SS FEDCBA 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 5
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",185,0,8,-4)
		R2RR ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 10
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
		R2RL ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("StopDualWield", 1)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 A 0 A_TakeInventory("FiredSecondary", 1)
		TNT1 A 5
		P2SS ABCDEF 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		Goto ReadyToFire	
		
		
	
	FinishReloadLeftOnly:	//Weapon is fully loaded. Time to play the reloading animation.
		TNT1 A 0 A_GiveInventory("LeftRifleAmmo", 62)
		TNT1 A 0 A_GiveInventory("RifleAmmo", 62)
		P2SS FEDCBA 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 5
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",185,0,8,-4)
		R2RR ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("StopDualWield", 1)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 A 0 A_TakeInventory("FiredSecondary", 1)
		TNT1 A 5
		P2SS ABCDEF 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		Goto ReadyToFire	
		
	FinishReloadRightOnly:	//Weapon is fully loaded. Time to play the reloading animation.
		TNT1 A 0 A_GiveInventory("LeftRifleAmmo", 62)
		TNT1 A 0 A_GiveInventory("RifleAmmo", 62)
		P2SS FEDCBA 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 5
		TNT1 A 0 A_PlaySound("RELOAD", 5)//reload sound
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
		R2RL ABCDDDDDDEFGHIIJJKLMNO 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("StopDualWield", 1)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 A 0 A_TakeInventory("FiredSecondary", 1)
		TNT1 A 5
		P2SS ABCDEF 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("Reloading")//Always put this to make sure that the game understand that you already are reloading your weapon, and calling this state again is not necessary
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		Goto ReadyToFire		
		
		TiredKickStart:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
	    TNT1 A 0
		Goto DoKick+8
		
	TiredKickEnd:
	    TNT1 A 0
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Select
		
		StompKickFlash:
		STOM ABCDDDDE 1
		Stop
		
		Stomp:
	    TNT1 A 0 A_TakeInventory("Kicking", 1)
		TNT1 A 0 A_GunFlash("StompKickFlash")
	    NULL A 0 A_JumpIf (pitch > 90, "NormalAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperStomp")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		STOM ABCDDDDE 1
		TNT1 A 0 ThrustThingZ(0,-5,0,1)
		STOM EE 1
		TNT1 A 0 A_SetPitch(75)
        RIFF A 0 A_FireCustomMissile("StompAttack", 0, 0, 15, -11)
		RIFF A 0 A_FireCustomMissile("StompAttack", 0, 0, -15, -11)
		TNT1 A 0 A_SpawnItem("FootStepStrong")
        STOM F 5
		KICK A 0 A_Takeinventory("Kicking",1)
		STOM GH 2
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_jumpIfInventory("UsedStamina", 500, "TiredKickEnd")
		Goto Ready+8
		
	
	SuperStomp:
		TNT1 A 0 A_GunFlash("StompKickFlash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		STOM ABCDDDDE 1
		TNT1 A 0 ThrustThingZ(0,-5,0,1)
		STOM EE 1
		TNT1 A 0 A_SetPitch(75)
        RIFF A 0 A_FireCustomMissile("SuperStompAttack", 0, 0, 15, -11)
		RIFF A 0 A_FireCustomMissile("SuperStompAttack", 0, 0, -15, -11)
		TNT1 A 0 A_SpawnItem("FootStepStrong")
        STOM F 5
		KICK A 0 A_Takeinventory("Kicking",1)
		STOM GH 2
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_jumpIfInventory("UsedStamina", 600, "TiredKickEnd")
		Goto Ready+8
 	
	KickFlash:
		GRUK ABCD 1
		TNT1 D 6
		GRUK DCBA 1
		Stop
	BersFlash:
		GRUK ABCD 1
		TNT1 D 6
		GRUK DCBA 1
		Stop
	AirKikFlash:
		GRUK ABCD 1
		TNT1 A 9
		GRUK DCCBBA 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")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIfF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
		
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+8
		
	NormalKick:
	    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")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIfF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
		
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+8
		
	SlideKickChecker:
		TNT1 A 0
		NULL A 0 A_JumpIf (Vely > 0, "SlideKick")
		NULL A 0 A_JumpIf (Velx > 0, "SlideKick")
		NULL A 0 A_JumpIf (Vely < 0, "SlideKick")
		NULL A 0 A_JumpIf (Velx < 0, "SlideKick")
		Goto NormalKick

	SlideKickFlash1:
		GRUK ABCDDDDDDDDDDDDDDDDDD 1
		GRUK CBA 1
		Stop

	SlideKickFlash2:
		GRUK DDDDDDDDDDD 1
		GRUK DDD 1
		GRUK CBA 1
		Stop

	SlideKickFlash3:
		GRUK DDD 1
		GRUK DDD 1
		GRUK CBA 1
		Stop

	SlideKick:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
//		TNT1 A 0 A_GunFlash("AirKikFlash")
		TNT1 A 0 A_Jump(128, "SlideKickRight")
		TNT1 A 0 A_GunFlash("SlideKickFlash1")
		TNT1 A 0 A_PlaySound("SlideKick/Start", 0)
		TNT1 A 0 A_Recoil (-2)
		KIC4 J 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-2.50)
		KIC4 K 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3)
		KIC4 L 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3.50)
		KIC4 M 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4)
		KIC4 N 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4.50)
		RIFF A 0 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_PlaySound("SlideKick/Loop", 1)
		TNT1 A 0 A_Recoil (-5)
	SlideKickLoop1:
		KIC4 OOOOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("SlideKickFlash2")
		KIC4 OOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Jump(60, "SlideKickLoop1")
		Goto SlideKickEnd1
	SlideKickEnd1:
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_GunFlash("SlideKickFlash3")
		TNT1 A 0 A_PlaySound("SlideKick/End", 1)
		KIC4 A 0 A_TakeInventory("Kicking",1)
		KIC4 PQRST 2 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+8

	SlideKickRight:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
//		TNT1 A 0 A_GunFlash("AirKikFlash")
		TNT1 A 0 A_Jump(128, "SlideKickRight")
		TNT1 A 0 A_GunFlash("SlideKickFlash1")
		TNT1 A 0 A_PlaySound("SlideKick/Start", 0)
		TNT1 A 0 A_Recoil (-2)
		KIC5 J 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-2.50)
		KIC5 K 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3)
		KIC5 L 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3.50)
		KIC5 M 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4)
		KIC5 N 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4.50)
		RIFF A 0 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_PlaySound("SlideKick/Loop", 1)
		TNT1 A 0 A_Recoil (-5)
	SlideKickLoop2:
		KIC5 OOOOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("SlideKickFlash2")
		KIC5 OOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Jump(60, "SlideKickLoop2")
		Goto SlideKickEnd2
	SlideKickEnd2:
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_GunFlash("SlideKickFlash3")
		TNT1 A 0 A_PlaySound("SlideKick/End", 1)
		KIC5 A 0 A_TakeInventory("Kicking",1)
		KIC5 PQRST 2 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+8

	BerserkerKick:
		 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")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+8



		
		AirKick:
	    TNT1 A 0
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_GiveInventory("UsedStamina", 50)
		NULL A 0 A_JumpIf (pitch < 40, 1)
		Goto Stomp

	NormalAirKick:
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK", 0)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("AirKikFlash")
		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 Ready+8

	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK", 0)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("AirKikFlash")
		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 Ready+8

	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
        TNT1 A 10
		FUCK F 1  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		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 G 1  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_PlaySound("FUCK", 2)
        FUCK HI 1  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_AlertMonsters
		FUCK J 15  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_Takeinventory("Taunting",1)
        FUCK IHGF 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
        TNT1 A 10
		Goto ReadyToFire
	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 ReadyToFire	
	Steady:
	TNT1 A 1
	Goto ReadyToFire	
		
		
	Unload:
		TNT1 A 1 A_WeaponReady
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo",1,3)
        Goto Ready
        
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("DoubleRifleAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_Takeinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_Takeinventory("LeftRifleAmmo",1)
		TNT1 A 0 A_Giveinventory("Clip2",1)
		Goto RemoveBullets
	
	FInishUnload:
		TNT1 AAA 0
		TNT1 A 0 A_GiveInventory("StopDualWield")
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_PlaySound("Reload", 5)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		R2RL ONMLKJIHGFEDCBA 1
		R2RR ONMLKJIHGFEDCBA 1
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_TakeInventory("StopDualWield")
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto Ready+6
		
	}
}

ACTOR DoubleRifleAmmo : Ammo //Your weapon's magazine ammo.
{
   Inventory.Amount 0
   Inventory.MaxAmount 62 //Your weapon's magazine ammo limit. Always leave one more bullet, so you can do the 12+1 effect.
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 62
   Inventory.Icon "RIFLA0"
}


ACTOR LeftRifleAmmo : Ammo //Your weapon's magazine ammo.
{
   Inventory.Amount 0
   Inventory.MaxAmount 31 //Your weapon's magazine ammo limit. Always leave one more bullet, so you can do the 12+1 effect.
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 31
   Inventory.Icon SMGPA0
}


//ACTOR Right/Rifle/Ammo : Ammo //Your weapon's magazine ammo.
//{
   //Inventory.Amount 0
   //Inventory.MaxAmount 31 //Your weapon's magazine ammo limit. Always leave one more bullet, so you can do the 12+1 effect.
   //Ammo.BackpackAmount 0
   //Ammo.BackpackMaxAmount 31
   //Inventory.Icon SMGPA0
//}