/*
CREDITS:
Sprites - 3DRealms (Duke Nukem 64)
Rip - Xim
Projectile - Apogee (ROTT)

Sounds:
Up - Blizzard (Starcraft II)
Fire, steamy barrel wall deploy - Westwood (C&C Renegade)
XFire, zoom in, zoom out - ID (ET:QW)
Alt-fire - ?
*/

ACTOR Pushkin : Weapon 24510
{
	//$Category Weapons
	//$Title Pushkin
	//$Sprite NKLGX0
	inventory.pickupsound "misc/w_pkup"
	inventory.PickupMessage "You got the ''Pushkin'' sniper cannon! Beware of a crazed gunman, wankers! (7)"
	obituary "%o couldn't escape from %k's keen eye... and 100MM projectile."
	Weapon.UpSound "Weapons/PushkinUp"
	Weapon.SelectionOrder 2
	Weapon.AmmoType "100MMAmmo"
	Weapon.AmmoGive 18
	Weapon.AmmoUse 1
	Weapon.AmmoType2 "100MMAmmo"
	Weapon.AmmoUse2 3
	Weapon.Kickback 50
	Weapon.SlotNumber 7
	Scale 0.9
	+NOALERT
	States
	{
   Spawn:
   	NKLG X -1
	Stop
   UnZoom:
      NKLZ A 0 A_PlaySoundEx("Weapons/PushkinZoomOut","SoundSlot5")
      NKLZ A 0 A_TakeInventory("Zoomed",999)

      NKLZ A 0 A_SetTranslucent(0.9,0)
      NKLZ B 1 A_SetBlend("Black",0.25,3) 
      
      NKLZ A 0 A_SetTranslucent(0.92,0)
      NKLZ B 1 A_SetBlend("Black",0.3,3)
      
      NKLZ A 0 A_SetTranslucent(0.94,0)
      NKLZ B 1 A_SetBlend("Black",0.45,3)
      NKLZ A 0 A_ZoomFactor(1.00)
      
      NKLZ A 0 A_SetTranslucent(0.96,0)
      NKLZ B 1 A_SetBlend("Black",0.6,3)
      
      NKLZ A 0 A_SetTranslucent(0.98,0)
      NKLZ B 1 A_SetBlend("Black",0.75,3)
      
      NKLZ A 0 A_SetTranslucent(1,0)
      NKLZ B 1 A_SetBlend("Black",0.9,3)
      
      NKLZ BBBBBBBBBB 1 A_SetBlend("Black",1,3)
      
      NKLG A 15 A_SetBlend("Black",0.9,10)
      NKLG A 1
   Ready:
      NKLG A 0
      NKLG A 0 SetPlayerProperty(0,0,0)
      NKLG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedReady")
      NKLG A 1 A_WeaponReady
	  TNT1 A 0 A_JumpIfInventory("RO_GotoZoom", 1, "Zoom")
      Loop
   ZoomedReady:
      NKLZ A 0 SetPlayerProperty(0,0,0)
      NKLZ A 0 A_SetBlend("Black",0.2,3)
      NKLZ A 1 A_WeaponReady(WRF_NOBOB)
	  TNT1 A 0 A_JumpIfInventory("RO_GotoZoom", 1, "Zoom")
      Goto Ready
   Deselect:
      NKLG A 0 A_ZoomFactor(1)
      NKLG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedDeselect")
      NKLG A 0 A_SetTranslucent(1,0)
      NKLG A 1 A_Lower
      NKLG A 0 A_Lower
      Loop
  ZoomedDeselect:
      NKLZ A 0 A_PlaySoundEx("Weapons/PushkinZoomOut","SoundSlot5")
      NKLZ A 0 A_TakeInventory("Zoomed",999)

      NKLZ A 0 A_SetTranslucent(0.9,0)
      NKLZ B 1 A_SetBlend("Black",0.25,3) 
      
      NKLZ A 0 A_SetTranslucent(0.92,0)
      NKLZ B 1 A_SetBlend("Black",0.3,3)
      
      NKLZ A 0 A_SetTranslucent(0.94,0)
      NKLZ B 1 A_SetBlend("Black",0.45,3)
      NKLZ A 0 A_ZoomFactor(1.00)
      
      NKLZ A 0 A_SetTranslucent(0.96,0)
      NKLZ B 1 A_SetBlend("Black",0.6,3)
      
      NKLZ A 0 A_SetTranslucent(0.98,0)
      NKLZ A 1 A_SetBlend("Black",0.75,3)
      
      NKLZ A 0 A_SetTranslucent(1,0)
      NKLZ B 1 A_SetBlend("Black",0.9,3)
      
      NKLZ BBBBBBBBBB 1 A_SetBlend("Black",1,3)
      
      NKLG A 15 A_SetBlend("Black",0.9,10)
      NKLG A 1
  ZoomedDeselectMain:
      NKLG A 1 A_Lower
      NKLG A 0 A_Lower
      Loop
   Select:
      NKLG A 0 A_TakeInventory("Zoomed",999)
      NKLG A 1 A_Raise
      Loop
   Fire:
      NKLG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedFire")
      NKLG A 0 A_AlertMonsters
      NKLG A 0 A_PlaySound("Weapons/PushkinFire",6,0.9)
      NKLG A 0 A_PlaySound("Weapons/PushkinXFire",5,0.6)
      NKLG A 0 A_FireCustomMissile("100MMShell", 0, 1, 20, 0)
      NKLG A 0 ACS_Execute(851,0,40+random(10,-10),15+random(4,-4),0)
      NKLG A 0 A_Recoil(3)
      NKLG A 0 A_GunFlash
      NKLF A 1 BRIGHT A_ZoomFactor(0.96)
      NKLG A 0 SetPlayerProperty(0,1,0)
      NKLF B 1 A_ZoomFactor(0.97)
      NKLF C 1 A_ZoomFactor(0.98)
      NKLF D 1 A_ZoomFactor(0.99)
      NKLF E 1 A_ZoomFactor(0.995)

      NKLG A 0 SetPlayerProperty(0,0,0)
      NKLG A 0 A_FireCustomMissile("100MMCasingSpawner", 0, 0, 36, 8)
      NKLF D 1 A_ZoomFactor(1)
      NKLF CB 1
      NKLG A 1
      Goto Ready
   ZoomedFire:
      NKLZ B 0 A_AlertMonsters
      NKLZ B 0 SetPlayerProperty(0,1,0)
      NKLZ B 0 A_PlaySound("Weapons/PushkinFire",6,0.9)
      NKLZ B 0 A_PlaySound("Weapons/PushkinXFire",5,0.6)
      NKLZ B 0 ACS_Execute(851,0,20+random(10,-10),7+random(1,-1),0)
      NKLZ B 0 A_FireCustomMissile("100MMShell", 0, 1, 13, 14)
      NKLZ B 0 A_GunFlash
      NKLZ B 0 A_Recoil(2.5)
      NKLZ B 0 A_SetBlend("White",0.1,20)
      NKLZ B 1 Bright A_ZoomFactor(2.90)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 Bright A_ZoomFactor(2.45)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 Bright A_ZoomFactor(2.50)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.60)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.70)
      NKLG A 0 A_FireCustomMissile("100MMCasingSpawner", 0, 0, 36, 8)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.80)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.90)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.95)
      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ A 1 A_ZoomFactor(3.00)

      NKLZ A 0 SetPlayerProperty(0,0,0)
      Goto Ready
   AltFire:
      NKLG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedAltFire")
      NKLG A 0 A_AlertMonsters
      NKLG A 0 A_PlaySoundEx("Weapons/BarrelFire","SoundSlot6")
      NKLG A 0 A_PlaySound("Weapons/PushkinFire",5,0.9)
      NKLG A 0 A_FireCustomMissile("BarrelBomb", 0, 1, 20, 0)
      NKLG A 0 ACS_Execute(851,0,60+random(10,-10),25+random(4,-4),0)
      NKLG A 0 A_Recoil(5)
      NKLG A 0 A_GunFlash
      NKLF A 1 BRIGHT A_ZoomFactor(0.95)
      NKLF B 1 BRIGHT A_ZoomFactor(0.965)
      NKLF C 1 A_ZoomFactor(0.97)
      NKLF D 1 A_ZoomFactor(0.985)
      NKLF E 1 A_ZoomFactor(0.99)
      NKLF F 1 A_ZoomFactor(0.995)
      NKLF F 1 A_ZoomFactor(1)
      NKLF E 1
      NKLF D 1 //A_FireCustomMissile("100MMCasingSpawner", 0, 0, 36, 8)
      NKLF CB 1
      NKLG A 10
      Goto Ready
   ZoomedAltFire:
      NKLZ B 0 A_AlertMonsters
      NKLZ B 0 A_PlaySoundEx("Weapons/BarrelFire","SoundSlot6")
      NKLG A 0 A_PlaySound("Weapons/PushkinFire",5,0.9)
      NKLZ B 0 ACS_Execute(851,0,35+random(10,-10),15+random(1,-1),0)
      NKLZ B 0 A_FireCustomMissile("BarrelBombRing", 0, 1, 13, 14)
      NKLZ B 0 A_GunFlash
      NKLZ B 0 A_Recoil(3.5)
      NKLZ B 0 A_SetBlend("White",0.1,20)
      NKLZ B 1 Bright A_ZoomFactor(2.9)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 Bright A_ZoomFactor(2.45)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 Bright A_ZoomFactor(2.5)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.6)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.7)
      NKLG A 0 A_FireCustomMissile("100MMCasingSpawner", 0, 0, 36, 8)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.8)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.9)

      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ B 1 A_ZoomFactor(2.95)
      NKLZ B 0 A_SetBlend("Black",0.2,3)
      NKLZ A 1 A_ZoomFactor(3)
      NKLZ AAAAAAAAAAAA 1 A_SetBlend("Black",0.2,3)
      Goto Ready
   Zoom:
      NKLG A 0 A_JumpIfInventory("Zoomed",1,"UnZoom")

      NKLG A 0 A_GiveInventory("Zoomed",1)
      NKLG A 0 A_PlaySoundEx("Weapons/PushkinZoomIn","SoundSlot5")

      NKLG A 1 A_SetBlend("Black",0.15,3)
      NKLG A 1 A_SetBlend("Black",0.3,3)
      NKLG A 1 A_SetBlend("Black",0.45,3)
      NKLG A 1 A_SetBlend("Black",0.6,3)
      NKLG A 1 A_SetBlend("Black",0.75,3)
      NKLG A 1 A_SetBlend("Black",0.9,3)

      NKLG AAAAAAAAAA 1 A_SetBlend("Black",1,11)
      
      NKLZ B 0 A_ZoomFactor(3.00)
      NKLZ B 0 A_SetTranslucent(0.98,0)
      NKLZ B 1 A_SetBlend("Black",0.9,3)
      
      NKLZ B 0 A_SetTranslucent(0.96,0)
      NKLZ B 1 A_SetBlend("Black",0.85,3)
      
      NKLZ B 0 A_SetTranslucent(0.84,0)
      NKLZ B 1 A_SetBlend("Black",0.75,3)
      
      NKLZ B 0 A_SetTranslucent(0.82,0)
      NKLZ B 1 A_SetBlend("Black",0.65,3)
      
      NKLZ B 0 A_SetTranslucent(0.81,0)
      NKLZ B 1 A_SetBlend("Black",0.55,3)
      
      NKLZ B 0 A_SetTranslucent(0.8,0)
      NKLZ B 1 A_SetBlend("Black",0.45,3)
      
      NKLZ B 0 A_PlayWeaponSound("Weapons/PushkinZoomRdy")
      NKLZ A 1 A_SetBlend("Black",0.35,3)
      NKLZ A 1 A_SetBlend("Black",0.32,3)
      NKLZ A 1 A_SetBlend("Black",0.29,3)
      NKLZ B 1 A_SetBlend("Black",0.26,3)
      NKLZ B 1 A_SetBlend("Black",0.23,3)
      NKLZ B 1 A_SetBlend("Black",0.20,3)
      NKLZ AAAAA 1 A_SetBlend("Black",0.20,3)
      Goto ZoomedReady
   Flash:
       TNT1 A 2 A_Light2
       TNT1 A 1 A_Light1
       TNT1 A 0 A_Light0
       Stop
	}
}

ACTOR Zoomed : Inventory
{
     Inventory.MaxAmount 1
}

actor BarrelBomb
{
	Radius 11
	Height 6
	Speed 18
	Damage 5
	PROJECTILE
	-NOGRAVITY
	+BOUNCEONCEILINGS
	BounceFactor 0.005
	Obituary "%o was direct hit by %k's barrel bomb. Humiliating defeat!"
	States
	{
	Spawn:
        BAMB AA 0 A_PlaySoundEx("Weapons/PushkaLoop","Body",1,0)
		BAMB A 0 ThrustThingZ(0,10,0,1)
	Looplet:
		BAMB A 1 A_SpawnItemEx("BarrageTrail",0.1*random(8,12),0.1*random(8,12),0.1*random(8,12),0.1*random(1,3),0.1*random(1,3),0.1*random(1,3),random(0,359),0)
		Loop
	Death:
		TNT1 A 0 A_PlaySound("Weapons/BarrelRelease",5)
		TNT1 A 1 A_CustomMissile("DaBarrel", 10, 0, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)

        TNT1 A 0 A_CustomMissile("DaBarrel", 10, 32, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -32, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, 64, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -64, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, 48, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, -48, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)

        TNT1 A 1 A_CustomMissile("DaBarrel", 10, 96, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -96, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, 128, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -128, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, 96, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, -96, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)

        TNT1 A 1 A_CustomMissile("DaBarrel", 10, 160, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -160, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, 192, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("DaBarrel", 10, -192, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, 144, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
        TNT1 A 0 A_CustomMissile("SteamJet", 10, -144, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)

		TNT1 AAAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0)
		TNT1 A 0 A_Quake(3, 15, 0, 256, none) 
		TNT1 AA 0 A_SpawnItemEx("MissileExpSmoke", random(13,-13), random(13,-13), random(13,-13), 0.1*random(2,5), 0.1*random(2,5), 0.1*random(2,5), random(0,360), 128, 0)
		TNT1 AAAAA 5 A_SpawnItemEx("MissileExpSmoke", random(13,-13), random(13,-13), random(13,-13), 0.1*random(2,5), 0.1*random(2,5), 0.1*random(2,5), random(0,360), 128, 0)
		stop
    }
}

actor BarrelBombRing //Used on zoomed fire
{
	Radius 11
	Height 6
	Speed 80
	Damage 5
	PROJECTILE
	-NOGRAVITY
	+BOUNCEONWALLS
	+BOUNCEONCEILINGS
	BounceFactor 0.005
	Gravity 1.2
	Obituary "%o was unlucky enough to be a victim of direct impact of %k's mortar barrel bomb. Humiliating defeat!"
	States
	{
	Spawn:
        BAMB AA 0 A_PlaySoundEx("Weapons/PushkaLoop","Body",1,0)
		BAMB A 0 ThrustThingZ(0,15,0,1)
	Looplet:
		BAMB A 1 A_SpawnItemEx("BarrageTrail",0.1*random(8,12),0.1*random(8,12),0.1*random(8,12),0.1*random(1,3),0.1*random(1,3),0.1*random(1,3),random(0,359),0)
		Loop
	Death:
		TNT1 A 0 A_PlaySound("Weapons/BarrelRelease",5)

          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 15, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 45, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 75, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 105, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 135, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 165, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 195, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 225, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 255, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 285, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
          	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 315, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)
         	TNT1 A 0 A_CustomMissile("DaBarrel", 10, 0, 345, CMF_TRACKOWNER|CMF_AIMDIRECTION, 0)

          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 0, 2, 0)
          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 60, 2, 0)
          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 120, 2, 0)
          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 180, 2, 0)
          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 240, 2, 0)
          	TNT1 A 0 A_CustomMissile("SteamJetFarther", 10, 0, 300, 2, 0)

		TNT1 AAAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0)
		TNT1 A 0 A_Quake(3, 15, 0, 256, none) 
		TNT1 AA 0 A_SpawnItemEx("MissileExpSmoke", random(13,-13), random(13,-13), random(13,-13), 0.1*random(2,5), 0.1*random(2,5), 0.1*random(2,5), random(0,360), 128, 0)
		TNT1 AAAAA 5 A_SpawnItemEx("MissileExpSmoke", random(13,-13), random(13,-13), random(13,-13), 0.1*random(2,5), 0.1*random(2,5), 0.1*random(2,5), random(0,360), 128, 0)
		stop
    }
}

ACTOR DaBarrel
{
 	+MISSILE
 	+STEPMISSILE
 	+DROPOFF
 	+NOEXPLODEFLOOR
	+THRUGHOST
	+EXPLODEONWATER
	MaxStepHeight 16
	Damage 0
	speed 25
	Obituary "%o was intercepted by %k's barrel armada!"
	DeathSound "Weapons/BarrelHit"
	States
	{
	Spawn:
	 BAR1 A 0
	 BAR1 A 0 A_SpawnItemEx("BarrelTrail",0,0,0,0,0,0,0,128,0)
	 BAR1 A 1 A_SpawnItemEx("BarrelSmoke",frandom(5,-5),frandom(5,-5),20+random(-1,1),frandom(0.5,0.75),frandom(0.5,0.75),frandom(1,2),random(0,359),128,0)
         Loop
	Death:
	Crash:
	TNT1 A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerDeath")
	TNT1 A 1 A_SpawnItemEx("BoomyBarrelLight",0,0,1,random(1,3),0,random(3,6),180,SXF_TRANSFERPOINTERS,0)
	Stop
	NukerDeath:
	TNT1 A 1 A_SpawnItemEx("NukerBoomyBarrel",0,0,1,random(1,3),0,random(3,6),180,SXF_TRANSFERPOINTERS,0)
	Stop
	XDeath:
	TNT1 A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerXDeath")
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_CustomMissile("BarrelShell",0,0,0,0,2)
	TNT1 AAAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0) 
	TNT1 A 0 A_Explode(125,164)
	TNT1 A 1 A_SpawnItemEx("PushkaExplode",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
	TNT1 A 0 A_Explode(125,256,0)
	TNT1 A 0 A_Scream
	TNT1 BCD 6
	Stop
	NukerXDeath:
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_CustomMissile("BarrelShell",0,0,0,0,2)
	TNT1 AAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0) 
	TNT1 A 0 A_Explode(250,192)
	TNT1 A 0 A_SpawnItemEx("NukerPushkaExplode",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
	TNT1 A 0 A_Explode(250,384,0)
	TNT1 A 0 A_Scream
	TNT1 BCD 6
	stop

     }
}

ACTOR BarrelTrail
{
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Normal
	+CLIENTSIDEONLY
	Alpha 0.5
	States
	{
	Spawn:
	TNT1 A 0
	BAR1 A 1 A_FadeOut(0.1)
	Wait
	}
}

ACTOR BarrelSmoke : MissileExpSmoke
{
	Renderstyle Normal
	+CLIENTSIDEONLY
	Alpha 0.4
	Scale 0.15
} 

ACTOR BarrelBase
{
  Health 30
  Radius 10
  Height 34
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +CANBLAST
  DeathSound "Weapons/PushkaExp"
  Obituary "%o shouldn't touch that darn thing!"
}

ACTOR BoomyBarrelLight : BarrelBase //No nuke explosions and much less parts on explosion
{
  ReactionTime 50
  States
  {
  Spawn:
    BAR1 A 0
    BAR1 A 0 A_Jump(32,2)
    BAR1 A 0 A_Countdown
    BAR1 AB 6
    Loop
  Death:
    BARR Y 0 A_NoBlocking
    BARR Y 0 A_CustomMissile("BarrelShell",0,0,0,0,2)
    TNT1 AAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0) 
    TNT1 A 0 A_Explode(100,164)
    TNT1 A 0 A_SpawnItemEx("PushkaExplode",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
    TNT1 A 0 A_Explode(100,256,0)
    TNT1 A 0 A_Scream
    TNT1 BCD 6
    Stop
  }
}

ACTOR NukerBoomyBarrel : BarrelBase
{
  ReactionTime 50
  States
  {
  Spawn:
    BAR1 A 0
    BAR1 A 0 A_Jump(32,2)
    BAR1 A 0 A_Countdown
    BAR1 AB 6
    Loop
  Death:
    BARR Y 0 A_NoBlocking
    BARR Y 0 A_CustomMissile("BarrelShell",0,0,0,0,2)
    TNT1 AAAAAA 0 A_SpawnItemEx("BarrelParts",0,0,0,random(5,12),0,random(8,15),random(0,360),160,0) 
    TNT1 A 0 A_Explode(200,192)
    TNT1 A 0 A_SpawnItemEx("NukerPushkaExplode",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
    TNT1 A 0 A_Explode(200,384,0)
    TNT1 A 0 A_Scream
    TNT1 BCD 6
    stop
  }
}       

ACTOR SteamJetFarther
{
	+NOINTERACTION
	+NOGRAVITY
	+CLIENTSIDEONLY
	Speed 20
	States
	{
	Spawn:
	TNT1 A 3
	TNT1 A 1 A_SpawnItemEx("SteamJet",0,0,0,0,0,0,0,128,0)
	Stop
	Death:
	Stop
	}
} 

ACTOR SteamJet
{
	+NOINTERACTION
	+NOGRAVITY
	+CLIENTSIDEONLY
	ReactionTime 15
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 0 A_Countdown
	TNT1 A 2 A_SpawnItemEx("SteamJetPart",random(3,-3),random(3,-2),random(1,-1),random(0.5,0.75),random(0.5,0.75),random(4,4.5),random(0,359),128,0)
	Loop
	Death:
	Stop
	}
} 

ACTOR SteamJetPart : MissileExpSmoke
{
	Renderstyle Add
	+CLIENTSIDEONLY
	Alpha 0.35
	Scale 0.4
} 
