

// *** MODIFIED BY CHEBMASTER
// I mark most important places modified by me with //***Che -- unless I forget to.

//***Che: note that BD's weapons use the gun flash mechanics to run tasks in parallel
//    instead of the normal intended use.
//  So all weapons call A_GunFlash once from their Select state,
//   then the flash layer runs in a continuous loop
//   responsible for things like switching flashlight on and off
//   or interacting with the world via the Use button.

//  If you forget including A_GunFlash in the Select state,
//   that weapon becomes crippled: you can't use flashlight nor command NPCs


ACTOR ClassicWeapon : Weapon
{
 //Weapon.BobRangeX 0.5
 //Weapon.BobRangeY 0.5
 //Weapon.BobSpeed 3.0
 //Weapon.BobStyle InverseSmooth
 VisibleToPlayerClass Purist
 Inventory.ForbiddenTo FBDoomer, FBDoomer2, TacticalFBDoomer, FBD_Doomgal, FBD_Doomgal2, FBD_TacticalDoomgal, FBD_Nostalgia, FBD_NostalgiaFem, FBD_Mortal, FBD_MortalFem
	States
	{
		HoldFire: //***Che disabling player weapons for cutscenes and for the evacuation center
			"----" A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			"----" A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			"----" A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			"----" A 1 A_Jump(256, "Ready3")
			Wait
		
		
		GoingToReady:
		SelectingAnimation:
			  TNT1 A 2
			  TNT1 A 0 A_TakeInventory("BDWEaponACtion", 1)
			  TNT1 A 0 A_TakeInventory("ExecuteDownedEnemy", 1)
			  TNT1 A 0 A_TakeInventory("Kicking",1)
			  TNT1 A 0 A_TakeInventory("Salute1", 1)
			  TNT1 A 0 A_TakeInventory("Salute2", 1)
			  TNT1 A 0 A_TakeInventory("Taunting",1)
			  TNT1 A 0 A_TakeInventory("TossGrenade",1)
			  TNT1 A 0 A_TakeInventory("IsRunning",1)
			  TNT1 A 0 A_TakeInventory("Reloading",1)
			  TNT1 AAAA 1 A_Jump(256, "Ready3")
			Loop
			
		Steady:
			TNT1 A 1
			Goto GoingToReady
			
		
		WEaponActions:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("BDWEaponACtion", 1)
			TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
			TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
			TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
			TNT1 A 1
			TNT1 A 0 A_Jump(256, "Ready3")
			TNT1 A 1
			Loop
		Flash:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory("SwitchFlashlight",1,"SwitchFlashlight")
			TNT1 A 0 A_JumpIfInventory("FlashlightOn", 1, "FlashOn")
			//TNT1 A 4
			//***Che
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("PressedUse", 1, "TryUse")
			TNT1 A 1
			TNT1 A 0 A_TakeInventory("UsedStamina", 1)
			Goto Flash
			
		//***Che: ported from BrutalWeapon
		Tryuse:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("PressedUse", 100)
			RIFF A 0 A_FireCustomMissile("StealthAttack", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("UseAttack", 0, 0, 0, 0, 0, 0)

			//RIFF A 0 A_FireCustomMissile("StealthAttack", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("NPCCommandAttack", 0, 0, 0, 0, 0, 0)
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("FlashlightOn", 1, "WaitFlashlightOn")
			TNT1 A 0 A_JumpIfInventory("PressedUse", 1, "Interrupt")
			Goto Flash 			
		
		FlashOn:
			TNT1 A 1 BRIGHT
			TNT1 A 0 A_SpawnItemEx("FlashlightSource", 32, 8, 30)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile2", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile3", 0, 0, 0, 0, 0, 0)
			
			TNT1 A 1 BRIGHT
			TNT1 A 0 A_SpawnItemEx("FlashlightSource", 32, 8, 30)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile2", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile3", 0, 0, 0, 0, 0, 0)
			
			TNT1 A 1 BRIGHT
			TNT1 A 0 A_SpawnItemEx("FlashlightSource", 32, 8, 30)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile2", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile3", 0, 0, 0, 0, 0, 0)
			
			TNT1 A 1 BRIGHT
			TNT1 A 0 A_SpawnItemEx("FlashlightSource", 32, 8, 30)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile2", 0, 0, 0, 0, 0, 0)
			RIFF A 0 A_FireCustomMissile("FlashlightProjectile3", 0, 0, 0, 0, 0, 0)
			
			TNT1 A 0 A_TakeInventory("UsedStamina", 1)
			
			Goto Flash
			
			
		SwitchFlashlight:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("SwitchFlashlight", 1)
			TNT1 A 0 A_JumpIfInventory("FlashlightOn",1,"TurnFlashOff")
			TNT1 A 0 A_Giveinventory("FlashlightOn",1)
			TNT1 A 0 A_PlaySound("FLASHON", 5)
			
			Goto Flash
		TurnFlashOff:
			TNT1 A 0 A_Takeinventory("FlashlightOn",1)
			TNT1 A 0 A_Light0
			TNT1 A 0 A_PlaySound("FLASHOFF", 5)
			Goto Flash
		
		
		RifleBash:
			"----" A 0
			"----" A 0 A_Takeinventory("Zoomed",1)
			"----" A 0 A_ZoomFactor(1.0)
			"----" A 0 A_Takeinventory("ADSmode",1)
			
			
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			
			TNT1 A 0 A_PlaySound("KICK")
			RIBA ACE 1
			RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, 0)
			RIBA G 5
			RIBA A 0 A_Takeinventory("Kicking",1)
			RIBA FEDCBA 1
			TNT1 AAAA 1
			TNT1 A 0 A_JumpIfInventory("Kicking",1,"RifleBash")
			TNT1 A 0 SetPlayerProperty(0,0,0)
			TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
			RIBA A 0 A_Takeinventory("Kicking",1)
			Goto SelectingAnimation
			
		DoKick:
			TNT1 A 2
			TNT1 A 0 A_Takeinventory("Zoomed",1)
			TNT1 A 0 A_ZoomFactor(1.0)
			TNT1 A 0 A_Takeinventory("ADSmode",1)
			
			TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
			
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			NULL A 0 A_JumpIf (momZ > 0, "AirKick")
			NULL A 0 A_JumpIf (momZ < 0, "AirKick")
			TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
			//TNT1 A 0 A_JumpIfInventory("RifleSelected", 1, "RifleBash")
			
			
			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("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
			RIBA A 0 A_Takeinventory("Kicking",1)
			Goto SelectingAnimation
			
		
		BerserkerKick:
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			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("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
			RIBA A 0 A_Takeinventory("Kicking",1)
			Goto GoingToReady
		
		AirKick:
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			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("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
			RIBA A 0 A_Takeinventory("Kicking",1)
			Goto GoingToReady
			
		SuperAirKick:
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			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("ExecuteDownedEnemy", 1, "DoExecution")
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
			RIBA A 0 A_Takeinventory("Kicking",1)
			Goto GoingToReady

		Taunt:
			TNT1 A 0 A_Takeinventory("Zoomed",1)
			TNT1 A 0 A_ZoomFactor(1.0)
			TNT1 A 0 A_Takeinventory("Taunting",1)
			
			TNT1 A 10
			FVCK 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)
			FVCK B 1 A_PlaySound("FUCK", 2)
			FVCK CD 1 A_AlertMonsters
			FVCK E 15 A_Takeinventory("Taunting",1)
			FVCK DCBA 1
			TNT1 A 10
			
			Goto GoingToReady
		Salute:
			TNT1 A 0 SetPlayerProperty(0,1,0)
			TNT1 A 0 A_ALertMonsters
			NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
			TNT1 ABCDEDCDEDCDEDCBA 4
			TNT1 A 0 A_TakeInventory("Salute1",1)
			TNT1 A 0 A_TakeInventory("Salute2",1)
			 MARN A 0 ACS_ExecuteAlways(402, 0, 0, 0, 0)//Stop Camera
			TNT1 A 0 SetPlayerProperty(0,0,0)
			Goto GoingToReady
		TossGrenade:	
			"----" A 0
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			
			TNT1 A 0 A_TakeInventory("TossGrenade", 1)
			TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 4)
			TNT1 A 0
			TNT1 A 0 A_Print("No Grenades Left.")
			TNT1 A 0 A_Jump(256, "Ready3")
			TNT1 AAAAA 0
			PRTH ABCD 1
			TNT1 A 0 A_GiveInventory("FiredGrenade", 1)
			TNT1 A 0 A_PLaySound ("GRNPIN")
			PRTH EEFG 1
			TNT1 A 0 A_PLaySound ("GRNTOSS")
			PRTH HI 1
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			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)
			PRTH JKLM 1
			TNT1 A 1 
			TNT1 A 0 A_TakeInventory("TossGrenade", 1)
			Goto GoingToReady	
		NoGrenade:
			TNT1 A 0
			TNT1 A 0 A_Print("No Grenades Left.")
			Goto GoingToReady
			
			
			
			
			
		DoExecution:
			TNT1 A 1
			TNT1 A 0 A_ChangeFLag("NOPAIN", 1)
			TNT1 A 0 A_ChangeFLag("PUSHABLE", 0)
			TNT1 A 0 A_Stop
			TNT1 A 0 SetPlayerProperty(0,1,4)
			KICK A 0 A_Takeinventory("Kicking",1)
			KICK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			TNT1 A 0 A_JumpIfInventory("ExecuteBashWall", 1, "BashWall")
			TNT1 A 0 A_JumpIfInventory("ExecuteStompWall", 1, "StompWall")
			
			TNT1 A 0 A_SetPitch(80)
			
			TNT1 A 5
			TNT1 A 0 A_Jump(256, "Execution1", "Execution2", "Execution3")
			
		
		Stompwall:
			TNT1 A 0 A_Stop
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			TNT1 A 0 A_SetPitch(10)
			TNT1 A 0 A_Recoil(-1)

			KICK JKLMN 1 A_Recoil(-1)
			RIFF A 0 A_FireCustomMissile("ExecutionAttackStompWall", 0, 0, 0, -7)
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			KICK OOO 2  A_Recoil(-1)
			KICK A 0 A_Takeinventory("Kicking",1)
			KICK PQRST 1
			
			KICK A 0 A_Takeinventory("ExecuteStompWall",1)
			KICK A 0 A_Takeinventory("ExecuteBashWall",1)
			TNT1 A 5
			Goto FinishExecution+8
			
				
		Bashwall:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			TNT1 A 0 A_PlaySound("imp/pain", 4)
			TNT1 A 0 A_ZoomFactor(1.3)
			IEHW A 2
			TNT1 A 0 A_ZoomFactor(1.0)
			IEHW A 8
			IEHW AAA 1 A_SetAngle(angle+6)
			IEHW BCDEF 1 A_SetAngle(angle+6)
			IEHW G 3
			TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
			TNT1 A 0 A_PlaySound("imp/pain", 4)
			TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			IEHW HIJKKK 1 A_SetAngle(angle-3)
			IEHW KKKJIH 1 A_SetAngle(angle+3)
			IEHW FG 3
			TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
			TNT1 A 0 A_PlaySound("imp/pain", 4)
			TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
			
			IEHW HIJKKK 1 A_SetAngle(angle-3)
			IEHW KKKJIH 1 A_SetAngle(angle+3)
			IEHW FG 3
			TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
			TNT1 A 0 A_PlaySound("imp/pain", 4)
			TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
			
			IEHW HIJKKK 1 A_SetAngle(angle-3)
			IEHW KKKJIH 1 A_SetAngle(angle+3)
			TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
			TNT1 A 0 A_CustomMissile("ImpHeadExplode", 48, 0, 45, 2)
			TNT1 A 0 A_CustomMissile("XDeath2", 48, 0, 45, 2)
			TNT1 AAA 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
			IEHW LMNO 1
			IEHW O 6
			IEHW PQRST 2 A_SetAngle(angle-4)
			TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
			TNT1 A 0 A_SpawnItem("FBD_DeadImp_NoHead")
			TNT1 AAA 1 A_SetAngle(angle-3)
			
			KICK A 0 A_Takeinventory("Kicking",1)
			KICK A 0 A_Takeinventory("ExecuteBashWall",1)
			KICK A 0 A_Takeinventory("ExecuteStompWall",1)
			
			TNT1 A 5
			Goto FinishExecution+8	
			
		ExecuteAirStomp:
			TNT1 A 0
			TNT1 A 0 A_Stop
			TNT1 A 0 A_GiveInventory("IsExecutingOnAir", 1)
			TNT1 A 0 ThrustThingZ(0, 10, 0, 1)
			STOM ABCCCCC 1 A_SetPitch(80)
			STOM CCCCCCCCCCC 1 A_CheckFloor("DoAirStomp")
		DoAirStomp:
			RIFF AAA 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, 0)
			STOM D 5
			TNT1 A 0 ThrustThingZ(0, 20, 1, 1)
			TNT1 A 0 A_TakeInventory("IsExecutingOnAir", 1)
			KICK A 0 A_Takeinventory("ExecuteStompWall",1)
			KICK A 0 A_Takeinventory("ExecuteBashWall",1)
			Goto FinishExecution
			
		Execution1:	
			KICK BCD 1
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			RIFF A 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, -7)
			KICK H 5
			KICK A 0 A_Takeinventory("Kicking",1)
			KICK I 1
			KICK GFEDCBA 1
			TNT1 A 5
			Goto FinishExecution
			
		Execution2:
			TNT1 A 0
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			TNT1 A 0 A_ZoomFactor(1.5)
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			PUN4 B 1 A_Stop
			PUN4 C 1 A_PlaySound("skeleton/swing")
			PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
			PUN4 E 3 A_Stop
			PUN4 DCB 2 A_Stop
			PUN3 A 1 A_Stop
			PUN3 B 1 A_PlaySound("skeleton/swing")
			PUN3 C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
			PUN3 E 3 A_Stop
			PUN3 CBA 2 A_Stop
			
			PUN4 B 1 A_Stop
			PUN4 C 1 A_PlaySound("skeleton/swing")
			PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
			PUN4 E 3 A_Stop
			PUN4 DCB 2 A_Stop
			PUN3 A 1 A_Stop
			PUN3 B 1 A_PlaySound("skeleton/swing")
			PUN3 C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
			PUN3 E 3 A_Stop
			PUN3 CBA 2 A_Stop
			
			PUN4 B 1 A_Stop
			PUN4 C 1 A_PlaySound("skeleton/swing")
			PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
			PUN4 E 3 A_Stop
			PUN4 DCB 2 A_Stop
			
			TNT1 A 1
			PUN3 A 1 A_Stop
			PUN3 B 1 A_PlaySound("skeleton/swing")
			PUN3 C 1 
			TNT1 AAA 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, 0)
			PUN3 E 6 A_Stop
			PUN3 CBA 2 A_Stop
			TNT1 A 0 A_ZoomFactor(1.0)
			
			TNT1 A 5
			Goto FinishExecution
			
			
		Execution3:
			
			KIKF ABC 1
			TNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			TNT1 A 0 A_PlaySound("KICK")
			KIKF D 1
			TNT1 AAA 0 A_FireCustomMissile("ExecutionAttackFatality", 0, 0, 0, 0)
			KIKF DDDDDDD 1 A_SetPitch(Pitch-10)
			KIKF ECBA 2
			TNT1 A 0 SetPlayerProperty(0,0,4)
			TNT1 A 0 A_ChangeFLag("NOPAIN", 0)
			TNT1 A 0 A_ChangeFLag("PUSHABLE", 1)
			TNT1 A 5 
			KICK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
			Goto GoingToReady
			
		FinishExecution:
			TNT1 A 0
			TNT1 AAAAAAAA 1 A_SetPitch(Pitch-10)
			TNT1 A 0 A_ChangeFLag("NOPAIN", 0)
			TNT1 A 0 A_ChangeFLag("PUSHABLE", 1)
			TNT1 A 0 SetPlayerProperty(0,0,4)
			KICK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
			Goto GoingToReady
			
	}
}

ACTOR ClassicFist : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 4
	Weapon.Kickback 100
	Obituary "$OB_MPFIST"
	Tag "$TAG_FIST"
	+WEAPON.MELEEWEAPON
	
	+WEAPON.NOALERT
	Tag "Fists"
	States
	{
	
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKFS K 0 A_JumpIfInventory("Taunting",1,"Taunt")
			PKFS K 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKFS K 0 A_JumpIfInventory("Salute2", 1, "Salute")
			PKFS K 0 A_JumpIfInventory("Reloading",1,"Reload")
			PKFS K 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
			PKFS K 1 A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready	
	
		Ready:
		Ready3:
			
			PKFS A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			
			PKFS A 1 A_WeaponReady
			
			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("TossGrenade",1,"TossGrenade")
			
			
			Loop
		Deselect:
			PKFS A 1 A_Lower
			Loop
		Select:
			PKFS A 1 A_Raise
			TNT1 A 0 A_GunFlash // start the background tasks layer
			Loop
		Fire:
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			TNT1 A 0 A_jumpifinventory("PowerStrength",1,"Fire2")
			PKFS B 1 A_Giveinventory("Punching",1)
			TNT1 A 0 A_PlaySound("skeleton/swing")
			PKFS CD 1
			PKFS E 2 A_FireCustomMissile("MeleeStrike2", 0, 0, 0, -5)
			PKFS FGHIJKL 2
			Goto Ready
		Fire2:
			PKFS B 1 A_Giveinventory("Punching",1)
			TNT1 A 0 A_PlaySound("weapons/gswing")
			PKFS CD 1
			PKFS E 2 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 0, -5)
			PKFS FGHIJK 2
			Goto Ready	
	}
}




ACTOR ClassicSaw : ClassicWeapon
{
	Game Doom
	Weapon.Kickback 0
	Weapon.SelectionOrder 2
	Weapon.UpSound "weapons/sawup"
	Weapon.ReadySound "none"
	Inventory.PickupMessage "$GOTCHAINSAW"
	Obituary "$OB_MPCHAINSAW"
	Tag "$TAG_CHAINSAW"
	+WEAPON.MELEEWEAPON
	Tag "Chainsaw"
	+WEAPON.AXEBLOOD
	
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			VSAW A 0 offset(-30,52) A_JumpIfInventory("Taunting",1,"Taunt")
			VSAW A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			VSAW A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			VSAW A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"HoldFire_Blood")
			VSAW A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"HoldFire_BlueBlood")
			VSAW A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"HoldFire_GreenBlood")
			VSAW ABAB 2 offset(-30,52) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			VSAW A 0 A_PlaySound("weapons/sawidle", 2)
			VSAW A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready	

		HoldFire_Blood:
			VSRW ABAB 2 offset(-30,52) A_WeaponReady(WRF_NOFIRE)
			TNT1 A 0 A_PlaySound("weapons/sawidle", 2)
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready
			
		HoldFire_BlueBlood:
			VSBW ABAB 2 offset(-30,52) A_WeaponReady(WRF_NOFIRE)
			TNT1 A 0 A_PlaySound("weapons/sawidle", 2)
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready
			
		HoldFire_GreenBlood:
			VSGW ABAB 2 offset(-30,52) A_WeaponReady(WRF_NOFIRE)
			TNT1 A 0 A_PlaySound("weapons/sawidle", 2)
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready			
	
		Ready:
		Ready3:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
			TNT1 A 0 A_PlaySound("weapons/sawidle", 2)
			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("TossGrenade",1,"TossGrenade")
			TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Ready.Blood")
			TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Ready.BlueBlood")
			TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Ready.GreenBlood")
			VSAW ABAB 2 A_WeaponReady
			Loop
			
		Ready.Blood:
			VSRW ABAB 2 A_WeaponReady
			
			Goto Ready
			
		Ready.BlueBlood:
			VSBW ABAB 2 A_WeaponReady
			Goto Ready
			
		Ready.GreenBlood:
			VSGW ABAB 2 A_WeaponReady
			Goto Ready	
			
		Deselect:
			VSAW A 1 A_Lower
			Loop
		Select:
			VSAW A 1 A_Raise
			KICK A 0 A_Takeinventory("PowerBloodOnVisor",1)
			KICK A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
			KICK A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
			TNT1 A 0 A_GunFlash
			Loop
		Fire:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
			
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
			
			
			TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Fire.Blood")
			TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Fire.BlueBlood")
			TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Fire.GreenBlood")
			VSAW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
			SAWG B 0 A_ReFire
			Goto Ready
			
		Fire.Blood:
			TNT1 A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
			TNT1 A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
			VSRW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
			TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Fire.BlueBlood")
			TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Fire.GreenBlood")
			SAWG B 0 A_ReFire
			Goto Ready
		
		Fire.BlueBlood:
			TNT1 A 0 A_TakeInventory("PowerBloodOnVisor", 1)
			TNT1 A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
			VSBW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
			TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Fire.Blood")
			TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Fire.GreenBlood")
			SAWG B 0 A_ReFire
			Goto Ready
			
		Fire.GreenBlood:
			TNT1 A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
			TNT1 A 0 A_TakeInventory("PowerBloodOnVisor", 1)
			VSGW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
			TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Fire.Blood")
			TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Fire.BlueBlood")
			SAWG B 0 A_ReFire
			Goto Ready
		
		Spawn:
			CSAW A -1
			Stop
	}
}


ACTOR ClassicPistol : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 3
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "clip2"
	Obituary "$OB_MPPISTOL"
	
	+WEAPON.NOAUTOFIRE
	Tag "Pistol"
	Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
	Tag "$TAG_PISTOL"
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKPI A 0 offset(-100,12) A_JumpIfInventory("Taunting",1,"Taunt")
			PKPI A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKPI A 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			PKPI A 1 offset(-100,12) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			PKPI A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready						
			
	
	Ready:
	Ready3:
	    
		PKPI A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		PKPI A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		Loop
	Deselect:
		PKPI A 1 A_Lower
		
		
		Loop
	Select:
		PKPI A 1 A_Raise
		TNT1 A 0 A_GunFlash
		Loop
	Fire:
		PKPI A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		TNT1 A 0 A_FireBullets (3, 1, 1, 25, "WeakPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_PlaySound("pfire", 1)
		RIFF A 0 A_FireCustomMissile("DecorativeTracer", random(-2,2), 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
        PKPI F 1 BRIGHT
		PKPI CDE 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("PistolCaseSpawn",5,0,0,-9)
		PKPI D 1
		PKPI C 1 A_WeaponReady(1)
		PKPI B 0 A_WeaponReady(1)
		PKPI A 5 A_WeaponReady(1)
		TNT1 A 0 A_ReFire
		Goto Ready
		
 	Spawn:
		PIST G 0
		PIST G -1
		Stop
		
	}
}




ACTOR ClassicSMG : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 2
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "clip2"
	Obituary "$OB_MPPISTOL"
	
	+WEAPON.NOAUTOFIRE
	Tag "Sub-Machinegun"
	Inventory.Pickupmessage "You got the Sub-Machinegun!"
	Tag "$TAG_PISTOL"
	States
	{
	
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			VSMG A 0 offset(-100,12) A_JumpIfInventory("Taunting",1,"Taunt")
			VSMG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			VSMG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			VSMG A 1 offset(-100,12) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			VSMG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready		
	
	Ready:
	Ready3:
	    
		VSMG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
		VSMG A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		Loop
	Deselect:
		VSMG A 1 A_Lower
		
		
		Loop
	Select:
		VSMG A 1 A_Raise
		TNT1 A 0 A_GunFlash
		Loop
	Fire:
		VSMG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		

		TNT1 A 0 A_FireBullets (5, 3, -1, 20, "WeakPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_PlaySound("pfire", 1)
		RIFF A 0 A_FireCustomMissile("DecorativeTracer", random(-2,2), 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
        VSMG B 1 BRIGHT
		VSMG E 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("PistolCaseSpawn",5,0,0,-9)
		
		VSMG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
		TNT1 A 0 A_FireBullets (9, 3, -1, 20, "WeakPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_PlaySound("pfire", 1)
		RIFF A 0 A_FireCustomMissile("DecorativeTracer", random(-2,2), 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
        VSMG C 1 BRIGHT
		VSMG E 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("PistolCaseSpawn",5,0,0,-9)
		
		VSMG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
		TNT1 A 0 A_FireBullets (9, 3, -1, 20, "WeakPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_PlaySound("pfire", 1)
		RIFF A 0 A_FireCustomMissile("DecorativeTracer", random(-2,2), 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
        VSMG D 1 BRIGHT
		VSMG E 1 A_ZoomFactor(1.0)
		TNT1 A 0 A_FireCustomMissile("PistolCaseSpawn",5,0,0,-9)
		
		TNT1 A 0 A_ReFire
		Goto Ready
 	Spawn:
		SMGZ A -1
		Stop
		
	}
}




ACTOR ClassicShotgun : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 2
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "AmmoShell"
	
	Tag "Shotgun"
	Inventory.PickupMessage "$GOTSHOTGUN"
	Obituary "$OB_MPSHOTGUN"
	Tag "$TAG_SHOTGUN"
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKSG G 0 offset(-30,22) A_JumpIfInventory("Taunting",1,"Taunt")
			PKSG G 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKSG G 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			PKSG G 1 offset(-30,22) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			PKSG G 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready	
	
	Ready:
	Ready3:
	    TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
		PKSG A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		
		Loop
	Deselect:
	    
		PKSG A 1 A_Lower
		
		
		
		Loop
	Select:
		PKSG A 1 A_Raise
		TNT1 A 0 A_GunFlash
		
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		PKSG A 1
		TNT1 AAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-5,5),0,0,-12,0,random(-1,1))
		TNT1 A 0 A_FireBullets (5.5, 1.0, 5, 14, "ShotgunPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_FireBullets (2.0, 1.0, 4, 14, "ShotgunPuff", FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("weapons/sg", 1)
		PKSG B 2 BRIGHT A_SetPitch(-4.0 + pitch)
		TNT1 A 0 A_ZoomFactor(0.97)
		PKSG C 1
		TNT1 A 0 A_ZoomFactor(1.00)
		PKSG CDDE 1 A_SetPitch(1.0 + pitch)
		PKSG A 4
		PKSG FGHI 1
		TNT1 A 0 A_FireCustomMissile ("ShotCaseSpawn", 0, 0, -4, -4)
		SHTG A 0 A_PlaySound("weapons/sgpump", 3)
		PKSG JKKLLMMMLLKKJIHGF 1
		PKSG A 3
		TNT1 A 0 A_Refire
		PKSG A 10 A_WeaponReady
		Goto Ready
	Spawn:
		SHOT A -1
		Stop
	}
}	




ACTOR ClassicSSG : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 1
	Weapon.AmmoUse 2
	Weapon.AmmoGive 8
	Weapon.AmmoType "AmmoShell"
	Inventory.PickupMessage "$GOTSHOTGUN2"
	Obituary "$OB_MPSSHOTGUN"
	Tag "$TAG_SUPERSHOTGUN"
	+WEAPON.NOAUTOFIRE
	Tag "Super Shotgun"
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKSS P 0 offset(60,42) A_JumpIfInventory("Taunting",1,"Taunt")
			PKSS P 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKSS P 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			PKSS P 1 offset(60,42) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			PKSS P 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready
			
	Ready:
	Ready3:
	
		PKSS A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	    
		PKSS A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		
		Loop
	Deselect:
		PKSS A 1 A_Lower
		Loop
	Select:
		PKSS A 1 A_Raise
		TNT1 A 0 A_GunFlash
		Loop
	Fire:
	    PKSS A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		PKSS A 1
		TNT1 A 0 A_firebullets (0,0,1,15,"shotpuff",0,180)
		TNT1 AAAAAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10),0,0,-12,0,random(-3,3))
		TNT1 A 0 A_FireBullets (10.0, 3.0, 9, 14, "ShotgunPuff", FBF_NORANDOM | FBF_USEAMMO)
		TNT1 A 0 A_FireBullets (5.0, 2.0, 9, 14, "ShotgunPuff", FBF_NORANDOM)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
		TNT1 A 0 A_playsound("SSHFIRE", 1)
		PKSS B 2 BRIGHT A_SetPitch(-6.0 + pitch)
		TNT1 A 0 A_ZoomFactor(0.95)
		PKSS C 1
		TNT1 A 0 A_ZoomFactor(1.0)
		PKSS DEFAAA 1 A_SetPitch(1.0 + pitch)
		PKSS A 5
		TNT1 A 0 A_CheckReload
		PKSS GHIJKL 1
		TNT1 A 0 A_PlaySound("weapons/sshoto", 4)
		PKSS MNOPQR 1
		TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
		PKES S 4
		PKSS STUV 2
		TNT1 A 0 A_PlaySound("weapons/sshotl", 4)
		PKSS XWYZ 1
		//TNT1 A 10
		PKS2 ABCD 2
		TNT1 A 0 A_PlaySound("weapons/sshotc", 4)
		PKS2 EFG 2
		PKSS A 5
		TNT1 A 0 A_Refire
		Goto Ready
	Spawn:
		SGN2 A -1
		Stop	
	}
}




ACTOR ClassicChaingun : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 1
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "clip2"
	Inventory.PickupMessage "$GOTCHAINGUN"
	Obituary "$OB_MPCHAINGUN"
	Tag "Minigun"
	Tag "$TAG_CHAINGUN"
	States
	{

		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKCG A 0 offset(-100,42) A_JumpIfInventory("Taunting",1,"Taunt")
			PKCG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKCG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			PKCG A 1 offset(-100,42) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			PKCG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready	
			
	Ready:
	Ready3:
		PKCG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	    
		PKCG A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		
		Loop
	Deselect:
		PKCG A 1 A_Lower
		
		
		
		Loop
	Select:
	    
		PKCG A 1 A_Raise
		TNT1 A 0 A_GunFlash
		
		Loop
	Fire:
		PKCG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
	
	
		TNT1 A 0 BRIGHT A_FireBullets (5, 1, 1, 16, "MachineGunBulletPuff", FBF_NORANDOM | FBF_USEAMMO)
        TNT1 A 0 A_FireCustomMissile("DecorativeTracer", random(-3,3), 0, 0, -12, 0, random(-3,3))
		TNT1 A 0 A_PlaySound("CHGNSHOT", 1)
		TNT1 A 0 A_FireCustomMissile("rIFLECaseSpawn",5,0,12,-16)
		PKCG F 1 BRIGHT 
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		PKCG G 1 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		PKCG H 1 A_SetPitch(0.5 + pitch)
		
		
		TNT1 A 0 BRIGHT A_FireBullets (5, 1, 1, 16, "MachineGunBulletPuff", FBF_NORANDOM | FBF_USEAMMO)
        TNT1 A 0 A_FireCustomMissile("DecorativeTracer", random(-3,3), 0, 0, -12, 0, random(-3,3))
		TNT1 A 0 A_PlaySound("CHGNSHOT", 1)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,12,-16)
		PKCG E 1 BRIGHT 
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		PKCG G 1 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		PKCG H 1 A_SetPitch(0.5 + pitch)
		
		TNT1 A 0 A_ReFire
		PKCG ABCDAABBCCCDDDD 1 A_WeaponReady(1)
		Goto Ready
	Spawn:
		MGUN A -1
		Stop
		
	}
}


ACTOR ClassicRocketLauncher : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 4
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "AmmoRocket"
	
	Tag "Rocket Launcher"
	Inventory.PickupMessage "$GOTLAUNCHER"
	Tag "$TAG_ROCKETLAUNCHER"
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			PKRL F 0 offset(-30,32) A_JumpIfInventory("Taunting",1,"Taunt")
			PKRL F 0 A_JumpIfInventory("Salute1", 1, "Salute")
			PKRL F 0 A_JumpIfInventory("Salute2", 1, "Salute")
			PKRL F 1 offset(-30,32) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			PKRL F 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready		
	Ready:
	Ready3:
	    PKRL A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
		PKRL A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		
		Loop
	Deselect:
		PKRL A 1 A_Lower
		
		
		
		Loop
	Select:
		PKRL A 1 A_Raise
		TNT1 A 0 A_GunFlash
		
		Loop
	Fire:
		PKRL A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		PKRL BC 2 BRIGHT
		TNT1 A 0 A_PlaySound ("DSRFIRE")
		TNT1 A 0 A_FireCustomMissile("WeakRocket", 0, 1, 0, -10)
		TNT1 A 0 A_SetPitch(-2.0 + pitch)
		PKRL D 2 BRIGHT
		PKRL EFGHIJ 2 A_SetPitch(0.25 + pitch)
		PKRL AA 1 A_SetPitch(0.25 + pitch)
		TNT1 A 0 A_Refire
		Goto Ready
	Spawn:
		LAUN A -1
		Stop
	}
}


ACTOR ClassicPlasmaRifle : ClassicWeapon
{
	Game Doom
	Weapon.SelectionOrder 1
	Weapon.AmmoUse 1
	Weapon.AmmoGive 40
	Weapon.AmmoType "AmmoCell"
	
	Tag "Plasma Rifle"
	Inventory.PickupMessage "$GOTPLASMA"
	Tag "$TAG_PLASMARIFLE"
	States
	{
	
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			3KPL F 0 offset(-30,32) A_JumpIfInventory("Taunting",1,"Taunt")
			3KPL F 0 A_JumpIfInventory("Salute1", 1, "Salute")
			3KPL F 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			3KPL F 1 offset(-30,32) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			3KPL F 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready		
	
	Ready:
	Ready3:
	
		3LSG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	    
		3LSG A 1 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		
		
		
		Loop
	Deselect:
	    TNT1 A 0 A_Takeinventory("HasPlasmaWeapon",1)
		
		
		
		3LSG A 1 A_Lower
		Loop
	Select:
	    TNT1 A 0 A_Giveinventory("HasPlasmaWeapon",1)
		TNT1 A 0 A_GunFlash
		3LSG A 1 A_Raise
		Loop
	Fire:
		3LSG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		TNT1 A 0 A_FireCustomMissile("ClassicPlasmaBall", 0, 1, 0, -10)
		3LSF EF 1 BRIGHT
		3KPL A 1
		TNT1 A 0 A_Refire
		3KPL ABCDEFF 1
		3KPL G 6
		3KPL FFEDCBA 1
		Goto Ready
	Spawn:
		PLAS A -1
		Stop
	}
}

ACTOR ClassicPlasmaBall
{
	Game Doom
	Radius 4
	Height 4
	Speed 25
	Damage 7
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	damagetype Plasma
	Obituary "$OB_MPPLASMARIFLE"
	Species "Marines"
	+THRUSPECIES
	+MTHRUSPECIES
	States
	{
	DM:
		TNT1 A 0
		TNT1 A 0 A_ChangeFLag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFLag("MTHRUSPECIES", 0)
		Goto Spawn1
	
	Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("CheckIfDM", 0, 0, 0, 0)//Check if Coop

	Spawn1:
	    TNT1 A 1
		Goto Spawn2
	Spawn2:
		PLSS ABAB 1 Bright A_SpawnItem("BlueFlareSmall")
		Loop
	Death:
	    TNT1 A 0
		TNT1 A 0 A_CustomMissile ("BluePlasmaFire", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (0, 360))
		PLSE ABC 2 BRIGHT A_SpawnItem("BlueFlare")
		PLSE DE 2 Bright A_SpawnItem("BlueFlareSmall")
		Stop
	}
}


ACTOR VanillaBFG9000 : ClassicWeapon
{
	Game Doom
	Height 20
	Weapon.SelectionOrder 2
	Weapon.AmmoUse 40
	Weapon.AmmoGive 0
	Weapon.AmmoType "AmmoCell"
	+WEAPON.NOAUTOFIRE
	Tag "BFG 9000"
	Inventory.PickupMessage "$GOTBFG9000"
	States
	{
	
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			BFGN A 0 offset(0,52) A_JumpIfInventory("Taunting",1,"Taunt")
			BFGN A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			BFGN A 0 A_JumpIfInventory("Salute2", 1, "Salute")
				
			BFGN A 1 offset(0,52) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			BFGN A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready		
	
	Ready3:
	Ready:
		BFGN A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	
	Reload:
		BFGN A 1 A_WeaponReady
        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("TossGrenade",1,"TossGrenade")
		Loop
		
	Deselect:
	    TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		BFGN A 1 A_Lower
		Loop
		
	Select:
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("sawSelected",1)
		TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
		TNT1 A 0 A_Takeinventory("SSGSelected",1)
		TNT1 A 0 A_Takeinventory("MinigunSelected",1)
		TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
		TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		TNT1 A 0 A_Giveinventory("BFGSelected",1)
		TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
		TNT1 A 0 A_Takeinventory("RailGunSelected",1)
		TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
		TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
	
	//***Che
		"----" A 0 A_Takeinventory("UnmakerSelected",1)
		"----" A 0 A_Takeinventory("MG42Selected",1) //***Che
		"----" A 0 A_Takeinventory("MG42Selected",1) //***Che
		"----" A 0 A_Takeinventory("AxeSelected",1) //***Che
			
			"----" A 0 A_Takeinventory("DragonslayerSelected",1) //***Che
			"----" A 0 A_Takeinventory("SniperRifleSelected",1)
			"----" A 0 A_Takeinventory("ShotolverSelected",1)
			"----" A 0 A_Takeinventory("Shotolver2Selected",1)
	
		TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
		TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Takeinventory("HasBarrel",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_GunFlash
		TNT1 A 1 A_Raise
		TNT1 AAAAAAAA 0 A_Raise
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        TNT1 A 0 A_PlaySound("BFGREADY")
		SelectAnimation:
		BFGS ABCDE 1
		Goto Ready
		
		
		
	Fire:
        BFGN A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		TNT1 A 0 A_PlaySound("BFGCHARGE")
		BFGC ABCDABCDABCDABCD 1 BRIGHT
		BFGC ABCDABCDABCDABCD 1 BRIGHT
        BFGA A 2 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        TNT1 A 0 A_PlaySound("BFGFIRE")
		TNT1 AAA 0 A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        TNT1 A 0 A_Recoil(8)
        //TNT1 A 0 A_ZoomFactor(1.3)
		
        TNT1 A 0 BRIGHT A_FireCustomMissile("Alerter", 0, 0, -1, 0)
		TNT1 A 0 A_JumpIfInventory("DMgame", 1, 4)
		TNT1 A 0 BRIGHT A_FireCustomMissile("ClassicBFGBall") //"BFGBall") //***Che
		TNT1 A 0
		Goto RecoilFire
		TNT1 AAA 0
		TNT1 A 0 BRIGHT A_FireCustomMissile("ClassicBFGBallDM") //"BFGBallDM") //***Che
		
	RecoilFire:	
		BFGA B 2 BRIGHT
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
        BFGA CDEF 2 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        //TNT1 A 0 A_ZoomFactor(1.0)
        BFGN A 1 BRIGHT
		BFGN A 4
        TNT1 A 0  A_Refire
		Goto Ready
		
	Spawn:
		BFUG A -1
		Stop		
	}
}












//***Che adding railgun to the list -----------------------------------------------------------------------

ACTOR ClassicRailGun : ClassicWeapon
{
	Weapon.AmmoUse 10
	Weapon.AmmoGive 50
	Weapon.AmmoType "AmmoCell"
	Obituary "%o was pierced by %k's Railgun."
    Inventory.PickupSound "misc/w_pkup"
	Inventory.Pickupmessage "You got the Railgun!"
	+WEAPON.NOAUTOAIM
    +WEAPON.NOAUTOFIRE
	+WEAPON.NOALERT
	damagetype "Railgun"
	Weapon.SelectionOrder 80
	States
	{
	
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			RAIR B 0 offset(-100,54) A_JumpIfInventory("Taunting",1,"GoTaunt")
			RAIR B 0 A_JumpIfInventory("Salute1", 1, "Salute")
			RAIR B 0 A_JumpIfInventory("Salute2", 1, "Salute")
			RAIR B 0 A_JumpIfInventory("AmmoCell",10,"HoldFireHasAmmo")
			
			RAIR B 1 offset(-100,54) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			RAIR B 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready
			
		HoldFireHasAmmo:
			RAIL ABC 1 offset(-100,54) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			"----" A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready
			
		SelectAnimation:
			RAIS ABC 1
			TNT1 AAA 0
			
		Ready:	
		Ready3:
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			RAIL A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			RAIL A 0 A_JumpIfInventory("Taunting",1,"GoTaunt")
			RAIL A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		ReadyContinueAfterReload:	
			RAIL A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
			RAIL A 0 A_JumpIfInventory("AmmoCell",10,2)
			Goto ReadyNoAmmo
			TNT1 AAAA 0
			
			//***Che: cannot work with user variables here, because weapons run in the context of the player pawn
			TNT1 A 0 A_TakeInventory("AlerterCooldown", 3)
			TNT1 A 0 A_JumpIfInventory("AlerterCooldown", 1, 3)
			// damage type RailAvoid, everything except super archviles and enemy mechs is immune
			RAIL A 0 A_RailAttack(1, 0, 0, None, None, RGF_SILENT, 0, "RailgunAlerterPuff")
			TNT1 A 0 A_GiveInventory("AlerterCooldown", 12)
			
			RAIL ABC 1 A_WeaponReady
			Goto Ready
		Ready2:
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "NoAim")
			SNIP A 1 BRIGHT A_WeaponReady
			RAIL A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			RAIL A 0 A_JumpIfInventory("Taunting",1,"GoTaunt")
			RAIL A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
			RAIL A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
			Loop
			
		ReadyNoAmmo:
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			RAIR B 1 A_WeaponReady
			RAIL A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			RAIL A 0 A_JumpIfInventory("Taunting",1,"GoTaunt")
			RAIL A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
			Loop	
		
		ReadyUnloaded:
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
			RAIR L 1 A_WeaponReady(WRF_ALLOWRELOAD)
			RAIL A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			RAIL A 0 A_JumpIfInventory("Taunting",1,"GoTaunt")
			RAIL A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			RAIL A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
			Loop	
			
		DontNeedToReload:
			RAIL A 0 A_JumpIfInventory("Zoomed",1,"Ready2")
			TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto ReadyContinueAfterReload //Ready+6 //***Che
		
		Deselect:
			RAIS CBA 1
			RAIL A 0 A_Takeinventory("PowerLightAmp", 1)
			RAIL A 0 A_Takeinventory("Zoomed",1)
			RAIL A 0 A_ZoomFactor(1.0)
			TNT1 AAAAAAAAAA 0 A_Lower
			TNT1 A 1 A_Lower
			Wait
		Select:
			RAIL A 0 A_Giveinventory("GoSpecial",1)
			RAIL A 0 A_Takeinventory("FistsSelected",1)
			RAIL A 0 A_Takeinventory("sawSelected",1)
			RAIL A 0 A_Takeinventory("ShotgunSelected",1)
			RAIL A 0 A_Takeinventory("SSGSelected",1)
			RAIL A 0 A_Takeinventory("MinigunSelected",1)
			RAIL A 0 A_Takeinventory("PlasmaGunSelected",1)
			//RAIL A 0 A_Giveinventory("RocketLauncherSelected",1)
			RAIL A 0 A_Takeinventory("RocketLauncherSelected",1)
			RAIL A 0 A_Takeinventory("GrenadeLauncherSelected",1)
			RAIL A 0 A_Takeinventory("BFGSelected",1)
			RAIL A 0 A_Takeinventory("BFG10kSelected",1)
			RAIL A 0 A_Giveinventory("RailGunSelected",1)
			RAIL A 0 A_Takeinventory("SubMachineGunSelected",1)
			RAIL A 0 A_Takeinventory("RevenantLauncherSelected",1)
	
		//***Che
			"----" A 0 A_Takeinventory("UnmakerSelected",1)
			"----" A 0 A_Takeinventory("MG42Selected",1) //***Che
			"----" A 0 A_Takeinventory("AxeSelected",1) //***Che
			
			"----" A 0 A_Takeinventory("DragonslayerSelected",1) //***Che
			"----" A 0 A_Takeinventory("SniperRifleSelected",1)
			"----" A 0 A_Takeinventory("ShotolverSelected",1)
			"----" A 0 A_Takeinventory("Shotolver2Selected",1)
	
			RAIL A 0 A_Takeinventory("LostSoulSelected",1)
			RAIL A 0 A_Takeinventory("FlameCannonSelected",1)
			RAIL A 0 A_Takeinventory("HasBarrel",1)
			TNT1 A 1 A_Raise
			TNT1 AAAAAAAAAAA 0 A_Raise
			RAIL A 0 A_GunFlash
			Goto SelectAnimation
			
		Fire:
			RAIL A 0
			RAIL A 0 A_JumpIfInventory("AmmoCell",10,2)
			Goto ReadyNoAmmo
			TNT1 AA 0
			//RAIL A 0 A_Takeinventory("AmmoCell",10)
			
			TNT1 A 0 A_TakeInventory("AlerterCooldown", 30)
			TNT1 A 0 A_GiveInventory("AlerterCooldown", 8)
			
			TNT1 A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
				
			RAIL A 0 A_FireCustomMissile("RailgunTrailEffectMissile", 0, 0, 0, 0)
			RAIL A 0 A_FireCustomMissile("RailgunWallPenetrator", 0, 1, 0, 0) //RailgunProjectile
			//RAIL A 0 A_RailAttack(400, 0, 0, "none", "none", RGF_FULLBRIGHT, 1, "RailgunPuff2")
			
			//***Che: the puff is used by this function as a means 
			//  to pass helluvalot extra parameters via flags and properties of its blueprint.
			// It does not matter if the puff spawns at all.
			//  (in this case, it never spawns)
			// P.S. None must be passed without quotes: it's a special identifier, not a string.
			RAIL A 0 A_RailAttack(400, 0, 0, None, None, RGF_FULLBRIGHT, 1, "RailgunPuff2")
			
			RAIL A 0 A_PlaySound("RAILF1", 1)
			RAIL A 0 A_SetPitch(-8.0 + pitch)
			RAIL A 0 A_ZoomFactor(0.7)
			
			RAIF A 1 BRIGHT A_AlertMonsters
			
			RAIL A 0 A_ZoomFactor(1.0)
			RAIL A 0 A_SetPitch(1.0 + pitch)
			RAIF BC 1 BRIGHT 
			
			RAIF DEFG 1 BRIGHT
			RAIL DDDDDDDD 1 A_SetPitch(1.0 + pitch)
			RAIL A 0 A_JumpIfInventory("AmmoCell",10,2)
			Goto ReadyNoAmmo
			TNT1 AA 0
			RAIL DDDDD 2 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
			RAIL A 0 A_PlaySound("RAILR1", 2)
			RAIL DDDDDDDDDDDDDDDD 2 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
			RAIL A 0 A_PlaySound("BEPBEP", 2)
			RAIL A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
			RAIL A 0 A_Refire
			TNT1 AAAA 0
			Goto Ready3
			

		AltFire:
			Goto Ready
			
		Spawn:
			SRCG A -1
			Stop
			
		GoTaunt:
			RAIL A 0
			RAIL A 0 A_Light0
			RAIL A 0 A_Takeinventory("Zoomed",1)
			RAIL A 0 A_Takeinventory("PowerLightAmp", 1)
			RAIL A 0 A_ZoomFactor(1.0)
			Goto Taunt
	}
}














ACTOR ClassicUnmaker : ClassicWeapon
{
	Height 20
	Weapon.SelectionOrder 1800
	Weapon.AmmoUse1 2
	Weapon.AmmoGive 100
	Weapon.AmmoType1 "SoulAmmo"
    Inventory.PickupSound "UNMREADY"
    +WEAPON.NOAUTOAIM
	Inventory.PickupMessage "You got the sinister Unmaker, the power of hell itself. (Slot 8)"
	States
	{
	
	
		HoldFire:
			UNHG A 0 offset(-50,18) A_StopSound(6)
			UNHG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			UNHG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			UNHG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			UNHG ABCDD 2 offset(-50,18) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			UNHG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready			
	
	Steady:
	TNT1 A 1
	Goto Ready
	Ready:
	Ready3:
		UNHG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		UNHG ABCDD 2 A_WeaponReady
		UNHG A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        UNHG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        UNHG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		UNHG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		
		UNHG DCBA 2 A_WeaponReady
		UNHG A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        UNHG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        UNHG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		UNHG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		
		
		UNHG AAAA 2 A_WeaponReady
		UNHG A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        UNHG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        UNHG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		UNHG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		UNHG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Goto Ready3
		
	
	Deselect:
		UNHG A   1 A_Lower
		UNHG A 0 A_StopSOund(1)
		UNHG A 0 A_StopSOund(6)
		UNHG A 0 A_TakeInventory("TossGrenade", 1)
		Loop
	Select:
		//UNHG A 0 A_Giveinventory("GoSpecial",1)
		UNHG A 0 A_Takeinventory("FistsSelected",1)
		UNHG A 0 A_Takeinventory("sawSelected",1)
		UNHG A 0 A_Takeinventory("ShotgunSelected",1)
		UNHG A 0 A_Takeinventory("SSGSelected",1)
		UNHG A 0 A_Takeinventory("MinigunSelected",1)
		UNHG A 0 A_Takeinventory("PlasmaGunSelected",1)
		UNHG A 0 A_Takeinventory("RocketLauncherSelected",1)
		UNHG A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		UNHG A 0 A_Takeinventory("BFGSelected",1)
		UNHG A 0 A_Takeinventory("BFG10kSelected",1)
		UNHG A 0 A_Takeinventory("RailGunSelected",1)
		UNHG A 0 A_Takeinventory("SubMachineGunSelected",1)
		
		//***Che
		//UNHG A 0 A_Giveinventory("RevenantLauncherSelected",1)
		UNHG A 0 A_Giveinventory("UnmakerSelected",1)
		"----" A 0 A_Takeinventory("AxeSelected",1) //***Che
		"----" A 0 A_Takeinventory("MG42Selected",1) //***Che		

		UNHG A 0 A_Takeinventory("LostSoulSelected",1)
		UNHG A 0 A_Takeinventory("FlameCannonSelected",1)
		UNHG A 0 A_Takeinventory("HasBarrel",1)
		UNHG A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAAAAAA 0 A_RAise
		TNT1 A 1 A_Raise
		UNHG A 0 A_PlaySound("BFGREADY")
        TNT1 AAA 0
		
		Goto SelectAnimation
		
	SelectAnimation:
		UNHS ABCD 1
		UNHG A 0 A_GunFlash
		GOto Ready
		
    Spawn:
        UNHW A 1
        Loop
		
		InterruptAndHoldFire: //***Che
			UNHG A 0 A_PlaySOund("UNMSTO", 1)
			UNHF DCBA 1
			Goto HoldFire
		
	Fire:
		UNHG A 0
		UNHG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		UNHG A 0 A_PlaySOund("UNMSTA", 1)
		UNHF ABCD 1
		UNHG A 0 A_ZoomFactor(0.95)
	Hold:	
	    UNHF E 1 BRIGHT
		UNHG A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "InterruptAndHoldFire") //***Che
		
			//***Che you sneeze andeverything unravels
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		UNHG A 0 A_PlaySOund("UNMLOP", 6, 1, 1)
		CHAF A 0 BRIGHT A_FireCustomMissile("UnmakerLaser", 0, 1, 0, 0, 0, 0)
		UNHG A 0 A_RailAttack(1, 0, 0, "none", "red", RGF_NOPIERCING | RGF_SILENT | RGF_CENTERZ | RGF_FULLBRIGHT, 0, "hitpuff", 0, 0, 9999, 1)
		UNHG A 0 A_SetAngle(random(1, -1) + angle)
		UNHG A 0 A_SetPitch(-0.5 + pitch)
		
		UNHF F 1 BRIGHT
		CHAF A 0 BRIGHT A_FireCustomMissile("UnmakerLaser2", 0, 1, 0, 0, 0, 0)
		UNHG A 0 A_RailAttack(1, 0, 0, "none", "red", RGF_NOPIERCING | RGF_SILENT | RGF_CENTERZ | RGF_FULLBRIGHT, 0, "hitpuff", 0, 0, 9999, 1)
		UNHG A 0 A_SetAngle(random(1, -1) + angle)
		UNHG A 0 A_SetPitch(-0.5 + pitch)
		
		UNHF G 1 BRIGHT
		CHAF A 0 BRIGHT A_FireCustomMissile("UnmakerLaser", 0, 1, 0, 0, 0, 0)
		UNHG A 0 A_RailAttack(1, 0, 0, "none", "red", RGF_NOPIERCING | RGF_SILENT | RGF_CENTERZ | RGF_FULLBRIGHT, 0, "hitpuff", 0, 0, 9999, 1)
		UNHG A 0 A_SetAngle(random(1, -1) + angle)
		UNHG A 0 A_SetPitch(-0.5 + pitch)
		
		UNHF H 1 BRIGHT
		CHAF A 0 BRIGHT A_FireCustomMissile("UnmakerLaser2", 0, 1, 0, 0, 0, 0)
		UNHG A 0 A_RailAttack(1, 0, 0, "none", "red", RGF_NOPIERCING | RGF_SILENT | RGF_CENTERZ | RGF_FULLBRIGHT, 0, "hitpuff", 0, 0, 9999, 1)
		UNHG A 0 A_SetAngle(random(1, -1) + angle)
		UNHG A 0 A_SetPitch(-0.5 + pitch)
		
		UNHG A 0 A_Refire
		
		UNHG A 0 A_ZoomFactor(1.0)
		UNHG A 0 A_StopSOund(1)
		UNHG A 0 A_StopSOund(6)
		UNHG A 0 A_PlaySOund("UNMSTO", 1)
		UNHF DCBA 1
		Goto Ready3
		
	}
}










ACTOR ClassicBFG10k: ClassicWeapon
{
	Radius 20
	Height 20
	Weapon.AmmoUse 5
	Weapon.AmmoGive 100
	Weapon.AmmoType "AmmoCell"
	Weapon.Kickback 100
	Weapon.SelectionOrder 3500
	Inventory.Pickupmessage "You got the BFG10000!  HELL YES!"
	Obituary "%o was blasted by %k's BFG10K"
	Decal BFGLightning
	+WEAPON.CHEATNOTWEAPON
	
	//***Che: frakking annoying, limits you to horizontal firing 
	//   - but we have a  Quake II bfg now! (sort of)
	+WEAPON.NOAUTOAIM
	
	States
	{
		//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			BG2G O 0 offset(40,52) A_JumpIfInventory("Taunting",1,"Taunt")
			BG2G O 0 A_JumpIfInventory("Salute1", 1, "Salute")
			BG2G O 0 A_JumpIfInventory("Salute2", 1, "Salute")
			BG2G O 1 offset(40,52) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			BG2G O 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready			
  Spawn:
    BFG2 A -1
    Stop
  Ready:
  Ready3:
  SteadY:
	TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	BG2G A 0
    BG2G A 0 A_PlaySound ("10KIDLE", 1)
    BG2G A 3 A_WeaponReady
	BG2G A 0 A_GunFlash
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		
		    BG2G B 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		
		    BG2G C 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		
		    BG2G D 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
    Loop
  Deselect:
    BG2G E 1 A_Lower
    Loop
  Select:
	BG2G A 0 A_Giveinventory("GoSpecial",1)
  	BG2G A 0 A_Takeinventory("FistsSelected",1)
	BG2G A 0 A_Takeinventory("sawSelected",1)
	BG2G A 0 A_Takeinventory("ShotgunSelected",1)
	BG2G A 0 A_Takeinventory("SSGSelected",1)
	BG2G A 0 A_Takeinventory("MinigunSelected",1)
	BG2G A 0 A_Takeinventory("PlasmaGunSelected",1)
	BG2G A 0 A_Takeinventory("RocketLauncherSelected",1)
    BG2G A 0 A_Takeinventory("GrenadeLauncherSelected",1)
	BG2G A 0 A_Takeinventory("BFGSelected",1)
	BG2G A 0 A_Giveinventory("BFG10kSelected",1)
	BG2G A 0 A_Takeinventory("RailGunSelected",1)
	BG2G A 0 A_Takeinventory("SubMachineGunSelected",1)
	BG2G A 0 A_Takeinventory("RevenantLauncherSelected",1)
	
	//***Che
		"----" A 0 A_Takeinventory("UnmakerSelected",1)
		"----" A 0 A_Takeinventory("AxeSelected",1) //***Che
		"----" A 0 A_Takeinventory("MG42Selected",1) //***Che
			
			"----" A 0 A_Takeinventory("DragonslayerSelected",1) //***Che
			"----" A 0 A_Takeinventory("SniperRifleSelected",1)
			"----" A 0 A_Takeinventory("ShotolverSelected",1)
			"----" A 0 A_Takeinventory("Shotolver2Selected",1)
	
	BG2G A 0 A_Takeinventory("LostSoulSelected",1)
	BG2G A 0 A_Takeinventory("FlameCannonSelected",1)
	BG2G A 0 A_Takeinventory("HasBarrel",1)
 SelectAnimation:	
    BG2G E 1 A_Raise
	BG2G EEEEEEEE 0 A_Raise
	BG2G A 0 A_GunFlash
	BG2G A 0 A_PlaySound("BFGREADY", 3)
	BG2G E 1
    Goto Ready
  Fire:
    TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
	BG2G E 20 A_PlaySound("10KSTART", 4)
    BG2G FGHIJ 2 BRIGHT
    Goto Hold
  Hold:
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)  
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
    BG2G K 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	BG2G A 0 A_PlaySound("10KFIRE", 1)
    BG2G L 1 BRIGHT A_FireCustomMissile("BFG10K_Ball",0,1,0,0)
    BG2G M 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	BG2G FGHIJ 1 BRIGHT
	TNT1 A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, 2) //***Che
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("10KSTOP", 4)
    Goto Ready

		
	Deselect:
	    TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		BG2G A 0 A_TakeInventory("TossGrenade", 1)
		BG2G A 1 A_Lower
		Loop	
  }
}


ACTOR ZandronumBFGBall
{
	Game Doom
	SpawnID 128
	Radius 13
	Height 8
	Speed 25
	Damage 100
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	DeathSound "weapons/bfgx"
	Obituary "$OB_MPBFG_BOOM"
	States
	{
	Spawn:
		BFS1 AB 4 Bright
		Loop
	Death:
		BFE1 AB 8 Bright
		BFE1 C 8 Bright A_BFGSpray
		BFE1 DEF 8 Bright
		Stop
	}
}

Actor ClassicBFGBall : ZandronumBFGBall
{
    +EXTREMEDEATH
	Damage (random(1500, 1500))
  Decal BFGLightning
	DeathSound "BFGEXPLO"
    DamageType Desintegrate
	Scale 0.7
	Species "Marines"
	Height 1
	+THRUSPECIES
	+MTHRUSPECIES
  States
  {
 Spawn:
    BFGN A 0 A_SpawnItemEx("BFGFOG", 0, 0)
    BFS1 AB 1 BRIGHT A_SpawnItemEx("BFGTrailParticle", Random(-13, 13), Random(-13, 13), Random(0, 18), Random(1, 3), 0, (0.1)*Random(-10, 10), Random(-20, 20), 128)
    Loop
 
 Death:
    BFGN A 0
    BFGN A 0 Radius_Quake(4,34,0,12,0)
	BFGN A 0 Radius_Quake(1,34,0,32,0)
	BFGN A 0 A_SpawnItemEx ("ExplosionSplashSpawner", 0, 0, -20)
	BFGN A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
    TNT1 AA 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	BFGN A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_PlaySOund("BFGEXPL2", 1)
	BFGN A 0 Bright A_SpawnItem("GreenShockWave",0,0,0)
    //BFE1 A 0 A_SpawnItemEx("BFGDeathParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    //BFE1 A 0 A_SpawnItemEx("BFGSuperParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 0, 0, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 50, 0, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", -50, 0, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 0, 50, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 0, -50, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 50, 50, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", 50, -50, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", -50, 50, 0)
	EXPL A 0 A_SpawnItemEx("BFGBigFlare", -50, -50, 0)
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleFast", 0, 0, random (0, 360), 2, random (0, 360))
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleSuperFast", 0, 0, random (0, 360), 2, random (0, 360))
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleFast", 0, 0, random (0, 360), 2, random (0, 360))
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleFast", 0, 0, random (0, 360), 2, random (0, 360))
    
	BFGN A 0 A_Explode(200,400,0)
	BFGB A 2 BRIGHT
    BFGB F 0 Bright A_BFGSpray("SuperBFGExtra", 50)
	BFGB BCDEFG 2 Bright
	BFGN A 0 A_SPawnItem("SuperBFGExtraGiant")
    TNT1 A 12
    Stop
  }
}

Actor ClassicBFGBallDM : ClassicBFGBall
{

	Species "NOne"
	-THRUSPECIES
	-MTHRUSPECIES
}





ACTOR ClassicDSweap : ClassicWeapon
{
	Obituary "%o was choped down by %k's Dragonslayer."
    AttackSound "None"
    Inventory.PickupSound "AXEDRAW"
	Inventory.Pickupmessage "$GOTDSWEAP" // "You got something that looks too big to be called a sword!" / "Ты взял здоровенную дуру - её вообще мечом называть можно?"
    +WEAPON.NOAUTOAIM
    +WEAPON.NOAUTOFIRE
    +FORCEXYBILLBOARD
	damagetype Saw
	+WEAPON.NOALERT
	+WEAPON.AXEBLOOD
	+WEAPON.CHEATNOTWEAPON
	VisibleToPlayerClass Purist
	Weapon.SelectionOrder 20
	Scale 0.9
	Tag "Dragonslayer"
	States
	{
//***Che disabling player weapons for cutscenes and for the evacuation center
		HoldFire:
			DSLA A 0 offset(32,52) A_JumpIfInventory("Taunting",1,"Taunt")
			DSLA A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			DSLA A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			DSLA A 1 offset(32,52) A_WeaponReady(WRF_NOBOB | WRF_NOFIRE)
			DSLA A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire")
			Goto Ready	
	
	Ready3:
	Ready:
		DSLA A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
        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("TossGrenade",1,"TossGrenade")
		DSLA A 1 A_WeaponReady
		Loop
		
	Select:
		//TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("sawSelected",1)
		TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
		TNT1 A 0 A_Takeinventory("SSGSelected",1)
		TNT1 A 0 A_Takeinventory("MinigunSelected",1)
		TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
		TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		TNT1 A 0 A_Takeinventory("BFGSelected",1)
		TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
		"----" A 0 A_Takeinventory("UnmakerSelected",1) //***Che
		"----" A 0 A_Takeinventory("MG42Selected",1) //***Che
		"----" A 0 A_Takeinventory("AxeSelected",1) //***Che
			
		"----" A 0 A_GiveInventory("DragonslayerSelected",1) //***Che		
		TNT1 A 0 A_Takeinventory("RailGunSelected",1)
		TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
		TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
		TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Takeinventory("HasBarrel",1)
		
		DSLA A 1
		DSLA A 0 A_GunFlash // start the background tasks layer
		DSLA AAAAAA 1 A_Raise
		Goto Ready

	Deselect:
		DSLA A 1 A_Lower
		Loop
	
    Fire:
		TNT1 A 0
        DSLC ABCD 1
	Hold:
		DSLA A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		DSLA B 1 Offset(-32, 32)
		TNT1 A 0 A_Refire
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
	    TNT1 A 0 A_PlaySound("weapons/gswing", 1)
		DSLA C 1
		TNT1 A 0 A_FireCustomMissile("DSAttack", 5, 40, 0, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", 5, 40, 0, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", 25, 40, 0, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", -15, 40, 0, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 20, 0,40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 35, 0,40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 50,0, 40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -10, 0,40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -25, 0,40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -40, 0, 40, 0, 2)
		DSLA C 1 Offset(-50, 33)
		DSLA C 1 Offset(-120, 36)
		DSLA C 1 Offset(-260, 40)
		DSLA C 1 Offset(-320, 49)
		DSLA C 1 Offset(-490, 59)
		DSLA C 1 Offset(-620, 72)
		TNT1 A 0 A_Recoil(-7)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 AA 1 A_SetAngle(angle+8)
		TNT1 AA 1 A_SetAngle(angle+4)
		TNT1 AA 1 A_SetAngle(angle+2)
		TNT1 A 0 A_TakeInventory("FiredPrimary", 1)
		TNT1 A 5
		TNT1 AAAAAAAA 1 A_JumpIfInventory("FiredPrimary", 1, "Attack2")
		DSLC D 1 Offset(-64, 128)
		DSLC D 1 Offset(-32, 64)
		DSLC DCBA 1 A_SetAngle(angle-2)
		Goto Ready
		
	Attack2:
		DSLA A 0 A_JumpIfInventory("DisablePlayerWeapons", 1, "HoldFire") //***Che
		DSLA E 1
		
			"----" A 0 A_JumpIfInventory("QPowerQuadDamage", 1, 2)
			"----" A 0 A_JumpIf(true, 2)
			"----" A 0 A_PlaySound("quaddamage/echo", CHAN_7)
			"----" A 0 A_GiveInventory ("PlayerIsFighting", 150) //***Che encourages the follower NPCs to get da fug out of your line of fire
		
		
		TNT1 A 0 A_PlaySound("weapons/gswing", 1)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -5, 0, -40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", -5, 0, -40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", 15, 0, -40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack2", -22, 0, -40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 10, 0,-40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 25, 0,-40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", 40,0, -40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -20, 0,-40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -35, 0,-40, 0, 2)
		TNT1 A 0 A_FireCustomMissile("DSAttack", -50, 0, -40, 0, 2)
		
		DSLA E 1 Offset(50, 33)
		DSLA E 1 Offset(120, 36)
		DSLA E 1 Offset(260, 40)
		DSLA E 1 Offset(320, 49)
		DSLA E 1 Offset(490, 59)
		DSLA E 1 Offset(620, 72)
		TNT1 A 0 A_Recoil(-7)
		TNT1 AA 1 A_SetAngle(angle-8)
		TNT1 AA 1 A_SetAngle(angle-4)
		TNT1 AA 1 A_SetAngle(angle-2)
		DSLC D 1 Offset(64, 128)
		DSLC D 1 Offset(32, 64)
		DSLC DCBA 1 A_SetAngle(angle+2)
		Goto Ready
		
	Spawn:
		DSLC P 1
		DSLC P -1
		Stop
		
		
	
	}
}


#include NuggetClassic.txt