//Chaingunner dropping clip
actor ClipDropper : ChaingunGuy 
{
	dropitem Clip
}

// UACBattleRifle
ACTOR UACBattleRifle : Weapon
{
	 Inventory.PickupMessage "Picked up the UAC Standard Battle Rifle."
	 Obituary "%o was anihilated by %k's BattleRifle."
	 Weapon.SelectionOrder 1900
	 Weapon.AmmoUse 1
	 Weapon.SlotNumber 4
	 Weapon.AmmoGive 30
	 Weapon.AmmoType1 "Clip"
	 Decal "BulletChip"
	 AttackSound "weapons/UACBR"
	 States
	 {
	 Spawn:
		UACR C -1
		Loop
	 Ready:
		UACR A 1 A_WeaponReady
		Loop
	 Select:
		UACR A 1 A_Raise
		Loop
	 Deselect:
		UACR A 1 A_Lower
		Loop
	 Fire:
        UACR A 0 A_GunFlash
		UACR A 0
		UACR B 2 A_FireBullets(3, 2, 1, 10, "BulletPuff")
		UACR B 2
		UACR A 3
		UACR A 3 A_ReFire
        Goto Ready
     Flash:
        UACR D 1 Bright A_Light0
        UACR E 1 Bright A_Light1
        Goto LightDone
     }
}
//Lamps
actor FloorLantern 
{
  Radius 16
  Height 20
  States
  {
  Spawn:
    FRLT A -1 Bright
	Stop
  }
}

actor FloorLantern_Animated 
{
  Radius 16
  Height 20
  States
  {
  Spawn:
    FRLT A 5 Bright
	FRLF A 10
	Loop
  }
}

actor FloorLanternTall 
{
  Radius 16
  Height 20
  States
  {
  Spawn:
    FRLT B -1 Bright
	Stop
  }
}

actor FloorLanternTall_Animated 
{
  Radius 16
  Height 20
  States
  {
  Spawn:
    FRLT B 5 Bright
	FRLF B 10
	Loop
  }
}

actor CeilingLantern 
{
  Radius 16
  Height 20
  +SPAWNCEILING
  +NOGRAVITY
  States
  {
  Spawn:
    FRLT C -1 Bright
	Stop
  }
}

actor CeilingLantern_Animated 
{
  Radius 16
  Height 20
  +SPAWNCEILING
  +NOGRAVITY
  States
  {
  Spawn:
    FRLT C 5 Bright
	FRLF C 10
	Loop
  }
}

actor CeilingLanternTall 
{
  Radius 16
  Height 20
  +SPAWNCEILING
  +NOGRAVITY
  States
  {
  Spawn:
    FRLT D -1 Bright
	Stop
  }
}

actor CeilingLanternTall_Animated 
{
  Radius 16
  Height 20
  +SPAWNCEILING
  +NOGRAVITY
  States
  {
  Spawn:
    FRLT D 5 Bright
	FRLF D 10
	Loop
  }
}
//Rocks
ACTOR RockGrey
{
	//$Title Grey Rock
	//$Category Obstacles/Rocks
	//$IsDecoration
	//$NotAngled
	Scale 0.75
	Radius 12
	Height 8
	+SOLID

	States
	{
	Spawn:
		DROK A 0 NoDelay A_ChangeFlag("SPRITEFLIP", random(0,1))
		DROK A 0 A_Jump (256, "Rock1", "Rock2", "Rock3")
	Rock1:
		DROK A -1
		stop
	Rock2:
		DROK B -1
		stop
	Rock3:
		DROK C -1
		stop
	}
}

ACTOR RockBrown
{
	//$Title Brown Rock
	//$Category Obstacles/Rocks
	//$IsDecoration
	//$NotAngled
	Scale 0.75
	Radius 12
	Height 8
	+SOLID

	States
	{
	Spawn:
		DROK D 0 NoDelay A_ChangeFlag("SPRITEFLIP", random(0,1))
		DROK D 0 A_Jump (256, "Rock1", "Rock2", "Rock3")
	Rock1:
		DROK D -1
		stop
	Rock2:
		DROK E -1
		stop
	Rock3:
		DROK F -1
		stop
	}
}

ACTOR RockTan
{
	//$Title Tan Rock
	//$Category Obstacles/Rocks
	//$IsDecoration
	//$NotAngled
	Scale 0.75
	Radius 12
	Height 8
	+SOLID

	States
	{
	Spawn:
		DROK G 0 NoDelay A_ChangeFlag("SPRITEFLIP", random(0,1))
		DROK G 0 A_Jump (256, "Rock1", "Rock2", "Rock3")
	Rock1:
		DROK G -1
		stop
	Rock2:
		DROK H -1
		stop
	Rock3:
		DROK I -1
		stop
	}
}

ACTOR RockBlack
{
	//$Title Black Rock
	//$Category Obstacles/Rocks
	//$IsDecoration
	//$NotAngled
	Scale 0.75
	Radius 12
	Height 8
	+SOLID
  
	States
	{
	Spawn:
		DROK J 0 NoDelay A_ChangeFlag("SPRITEFLIP", random(0,1))
		DROK J 0 A_Jump (256, "Rock1", "Rock2", "Rock3")
	Rock1:
		DROK J -1
		stop
	Rock2:
		DROK K -1
		stop
	Rock3:
		DROK L -1
		stop
	}
}

ACTOR Toilet
{
  +SOLID
  Height 48
  Radius 12
  States
  {
  Spawn:
    POTT Y -1 BRIGHT
    Stop
  }
}
ACTOR GarbageCan
{

  Radius 12
  Height 36
  States
  {
  Spawn:
    TRSH Y -1
    Stop
	}
}

ACTOR BrownChair
{
	Height 32
	Radius 12
	+SOLID
	States
{
	Spawn:
		CHRB A -1
		Stop
		}
}

ACTOR VolcanicFloor1 
{
	//$Title Volcanic Floor 1
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID
	
		States
		{
			Spawn:
				VIMF A -1
				Stop
		}
}

ACTOR VolcanicFloor2 
{
	//$Title Volcanic Floor 2
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID

		States
		{
			Spawn:
				VIMF B -1
				Stop
		}
}

ACTOR VolcanicFloor3 
{
	//$Title Volcanic Floor 3
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID

		States
		{
			Spawn:
				VIMF C -1
				Stop
		}
}

ACTOR VolcanicFloor4 
{
	//$Title Volcanic Floor 4
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 32
	+SOLID
  
		States
		{
			Spawn:
				VIMF D -1
				Stop
		}
}

ACTOR VolcanicFloor5 
{
	//$Title Volcanic Floor 5
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16

		States
		{
			Spawn:
				VIMF E -1
				Stop
		}
}

ACTOR VolcanicFloor6 
{
	//$Title Volcanic Floor 6
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16
  
		States
		{
			Spawn:
				VIMF F -1
				Stop
		}
}

ACTOR VolcanicFloor7 
{
	//$Title Volcanic Floor 7
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16
  
		States
		{
			Spawn:
				VIMF G -1
				Stop
		}
}

ACTOR VolcanicFloor8 
{
	//$Title Volcanic Floor 8
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 48
	+SOLID

		States
		{
			Spawn:
				VIMK A -1
				Stop
		}
}

ACTOR VolcanicFloor9 
{
	//$Title Volcanic Floor 9
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID
  
		States
		{
			Spawn:
				VIMK B -1
				Stop
		}
}

ACTOR VolcanicFloor10 
{
	//$Title Volcanic Floor 10
	//$Category Obstacles/Cave Formations/Volcanic/Floor
	//$NotAngled
	//$IsDecoration

	Radius 8
	Height 16
  
		States
		{
			Spawn:
				VIMK C -1
				Stop
		}
}

ACTOR VolcanicCeiling1 
{
	//$Title Volcanic Ceiling 1
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID
	+SPAWNCEILING
	+NOGRAVITY
	
		States
		{
			Spawn:
				VIMC A -1
				Stop
		}
}

ACTOR VolcanicCeiling2 
{
	//$Title Volcanic Ceiling 2
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 12
	Height 32
	+SOLID
	+SPAWNCEILING
	+NOGRAVITY

		States
		{
			Spawn:
				VIMC B -1
				Stop
		}
}

ACTOR VolcanicCeiling3 
{
	//$Title Volcanic Ceiling 3
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 32
	+SOLID
	+SPAWNCEILING
	+NOGRAVITY
  
		States
		{
			Spawn:
				VIMC C -1
				Stop
		}
}

ACTOR VolcanicCeiling4 
{
	//$Title Volcanic Ceiling 4
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16
	+SPAWNCEILING
	+NOGRAVITY
  
		States
		{
			Spawn:
				VIMC D -1
				Stop
		}
}

ACTOR VolcanicCeiling5 
{
	//$Title Volcanic Ceiling 5
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16
	+SPAWNCEILING
	+NOGRAVITY
		
		States
		{
			Spawn:
				VIMC E -1
				Stop
		}
}

ACTOR VolcanicCeiling6 
{
	//$Title Volcanic Ceiling 6
	//$Category Obstacles/Cave Formations/Volcanic/Ceiling
	//$NotAngled
	//$IsDecoration

	Radius 4
	Height 16
	+SPAWNCEILING
	+NOGRAVITY
		
		States
		{
			Spawn:
				VIMC F -1
				Stop
		}
}

Actor CorpsePile
{
	Radius 24
	Height 60
	+SOLID
	States
	{
	Spawn:
		PILE A -1
		Stop
	}
}

//STANDARD BREAKABLE

ACTOR GTechPillar
{
  Health 1
  Mass 99999
  Radius 12
  Height 128
  DeathHeight 128
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC A -1
     Loop
  Death:
     GTEC B 1
     TNT1 A 0 A_PlaySound("PillarGlassBreak")
	 TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,48,random(-2,2),random(-2,2),random(3,9),random(0,359),32)
	 TNT1 AAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,68,random(-2,2),random(-2,2),random(3,9),random(0,359),32)	
     GTEC B -1
	 Stop
  }
}

ACTOR GTechPillarShort
{
  Health 1
  Mass 99999
  Radius 12
  Height 82
  DeathHeight 82
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC G -1
     Loop
  Death:
     GTEC H 1
     TNT1 A 0 A_PlaySound("PillarGlassBreak")
	 TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,35,random(-2,2),random(-2,2),random(3,9),random(0,359),32)
     GTEC H -1
	 Stop
  }
}

//BLINKING LIGHTS AND BREAKABLE

ACTOR GTechPillarLight
{
  Health 1
  Mass 99999
  Radius 12
  Height 128
  DeathHeight 128
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC CC 18
	 GTEC D 6
     Loop
  Death:
     TNT1 A 0 A_PlaySound("PillarGlassBreak")
	 TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,48,random(-2,2),random(-2,2),random(3,9),random(0,359),32)
	 TNT1 AAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,68,random(-2,2),random(-2,2),random(3,9),random(0,359),32)
  Broken:	 
     GTEC EE 18
	 GTEC F 6
	 Loop
  }
}

ACTOR GTechPillarLightShort
{
  Health 1
  Mass 99999
  Radius 12
  Height 82
  DeathHeight 82
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC II 18
	 GTEC J 6
     Loop
  Death:
     TNT1 A 0 A_PlaySound("PillarGlassBreak")
	 TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("PillarGlassShard",0,0,35,random(-2,2),random(-2,2),random(3,9),random(0,359),32)
  Broken:	 
     GTEC KK 18
	 GTEC L 6
	 Loop
  }
}

//ALREADY BROKEN PILLAR ACTORS FOR MAP DECORATION VARIETY

ACTOR GTechPillarB
{
  Mass 99999
  Radius 12
  Height 128
  +SOLID
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC B -1
     Loop
  }
}

ACTOR GTechPillarSB
{
  Mass 99999
  Radius 12
  Height 82
  +SOLID
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC H -1
     Loop
  }
}

//ALREADY BROKEN WITH LIGHTS

ACTOR GTechPillarLightB
{
  Mass 99999
  Radius 12
  Height 128
  +SOLID
  +NODAMAGETHRUST
  States
  {
  Spawn:	 
     GTEC EE 18
	 GTEC F 6
	 Loop
  }
}

ACTOR GTechPillarLightSB
{
  Mass 99999
  Radius 12
  Height 82
  +SOLID
  +NODAMAGETHRUST
  States
  {
  Spawn:
     GTEC KK 18
	 GTEC L 6
     Loop
  }
}

//EFFECTS

ACTOR PillarGlassShard
{
  Radius 1
  Height 1
  Speed 15
  PROJECTILE
  -NOGRAVITY
  +THRUACTORS
  +MOVEWITHSECTOR
  Gravity 0.6
  RenderStyle Add
  Alpha 0.6
  Scale 1.3
  DeathSound "GlassShardImpact"
  States
  {
  Spawn:
     TNT1 A 0
     TNT1 A 0 A_Jump(255,"Standard","Small","Tiny","XLarge") //Randomly selects a glass shard size.
  Standard:	
     PGSD ABCD 1
	 Loop
  Small:	
     TNT1 A 0 A_SetScale(0.8)
     PGSD ABCD 1
	 Loop	
  Tiny:	
     TNT1 A 0 A_SetScale(0.4)
     PGSD ABCD 1
	 Loop
  XLarge:	
     TNT1 A 0 A_SetScale(1.6)
     PGSD ABCD 1
	 Loop	 
  Death:
     TNT1 A 0 A_SetTranslucent(0.3)
     PGSD E 125
     Stop
  }
}

//Bi-color, Right-facing version
ACTOR DoomStatue7 
{
	//$Category Decoration
	height 134
	radius 19
	+SOLID
	states
	{
	spawn:
		DSTT G -1
		Stop
	}
}

//Bi-color, Left-facing version
ACTOR DoomStatue8 
{
	//$Category Decoration
	height 134
	radius 19
	+SOLID
	states
	{
	spawn:
		DSTT H -1
		Stop
	}
}

Actor RedEvilEye : EvilEye
{
States
	{
		Spawn:
			REYE ABCB 6 BRIGHT
			Loop
	}
}

ACTOR ImpaledScientist
{
  Radius 20
  Height 40
  +SOLID
  States
  {
  Spawn:
    POLS A -1
    Stop
  }
}
actor Corp01 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORA A -1
    Stop
  }
}

actor Corp02 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORB A -1
    Stop
  }
}

actor Corp03 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORC A -1
    Stop
  }
}

actor Corp04 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORD A -1
    Stop
  }
}

actor Corp05 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORE A -1
    Stop
  }
}

actor Corp06 
{
  radius 15
  height 20
  states
  {
  Spawn:
    CORF A -1
    Stop
  }
}

////////////Green Holograms
Actor UACHolo1
{
Scale 0.5
Renderstyle add
+NOGRAVITY
States
{
Spawn:
	UAC1 A 2 BRIGHT A_SpawnItemEx("PlasmaSpawner", random(-16,16), random(-16,16), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
Actor UACHolo2 : UACHolo1
{
States
{
Spawn:
	UAC1 B 2 BRIGHT A_SpawnItemEx("PlasmaSpawner", random(-22,22), random(-22,22), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
////////////Cyan Holograms
Actor UACHolo3 : UACHolo1
{
States
{
Spawn:
	UAC2 A 2 BRIGHT A_SpawnItemEx("PlasmaSpawner2", random(-16,16), random(-16,16), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
Actor UACHolo4 : UACHolo1
{
States
{
Spawn:
	UAC2 B 2 BRIGHT A_SpawnItemEx("PlasmaSpawner2", random(-22,22), random(-22,22), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
////////////Orange Holograms
Actor UACHolo5 : UACHolo1
{
States
{
Spawn:
	UAC3 A 2 BRIGHT A_SpawnItemEx("PlasmaSpawner3", random(-16,16), random(-16,16), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
Actor UACHolo6 : UACHolo1
{
States
{
Spawn:
	UAC3 B 2 BRIGHT A_SpawnItemEx("PlasmaSpawner3", random(-22,22), random(-22,22), random(-4,-12), 0, 0, random(6,8),0,SXF_NOCHECKPOSITION)
	Loop
}
}
////////////Plasma Particle Spawner
Actor PlasmaSpawner
{
Alpha 0.75
RenderStyle Add
+NOGRAVITY
+DONTSPLASH
+NOCLIP
-SOLID
Projectile
States
{
Spawn:
    PLEM AAAAAAAAAAAAAAAA 1 BRIGHT A_FadeOut(0.09) 
    stop
Death:
    TNT1 A 1
    stop
}
}
Actor PlasmaSpawner2 : plasmaspawner////Cyan
{
States
{
Spawn:
    PLEM BBBBBBBBBBBBBBBB 1 BRIGHT A_FadeOut(0.09) 
    stop
Death:
    TNT1 A 1
    stop
}
}
Actor PlasmaSpawner3 : plasmaspawner////Orange
{
States
{
Spawn:
    PLEM CCCCCCCCCCCCCCCC 1 BRIGHT A_FadeOut(0.09) 
    stop
Death:
    TNT1 A 1
    stop
}
}

ACTOR ChestSkewered1 
{
  Radius 16
  Height 64
  +SOLID
  States
  {
  Spawn:
    POLC A -1
    Stop
  }
}

ACTOR ChestSkewered2 
{
  Radius 16
  Height 64
  +SOLID
  States
  {
  Spawn:
    POLC B -1
    Stop
  }
}

ACTOR ChestSkewered3 
{
  Radius 16
  Height 64
  +SOLID
  States
  {
  Spawn:
    POLC C -1
    Stop
  }
}
