/*Actor TechPillar1 : TechPillar replaces TechPillar
{
+SHOOTABLE
+INVULNERABLE
+NOBLOOD
+FORCEYBILLBOARD
Mass 900000
}*/

ACTOR GTechPillar replaces TechPillar
{
  Health 10
  Mass 99999
  Radius 12
  Scale 1.2
  Height 128
  DeathHeight 128
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +DONTGIB
  +NOICEDEATH
  +NODAMAGETHRUST
  +FORCEYBILLBOARD
  DamageFactor "Blood", 0.0 DamageFactor "BlueBlood", 0.0 DamageFactor "GreenBlood", 0.0
	
  States
  {
  Spawn:
     GTEC A -1
     Loop
  Death:
     GTEC B 1
     TNT1 A 0 A_PlaySound("DSBOTTLE")
	 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 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 9009
     Stop
  }
}

ACTOR ImpaledSkulls: HeadsOnAStick Replaces HeadsOnAStick
{
	Radius 16
	Height 9
	//Monster
    //+FRIENDLY
    //-SHOOTABLE
	+NOTAUTOAIMED
    Mass 9999999999999999999999999999
	States
	{
	Vanilla:
		POL2 A 1
		POL2 A -1
		Stop
		
	Spawn:
		POL2 A 0
		MARN A 0 ACS_ExecuteAlways(795, 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 1
		
	Spawn22:
		POL2 B 0
        TNT1 A 0 A_SpawnItem ("DecorativeSkullB", 1, 10)
        TNT1 A 0 A_SpawnItem ("DecorativeSkullD", -1, 20)
        TNT1 A 0 A_SpawnItem ("DecorativeSkullC", 1, 30)
        TNT1 A 0 A_SpawnItem ("DecorativeSkullB", -1, 40)
        TNT1 A 0 A_SpawnItem ("DecorativeSkullA", 1, 50)
		Goto Stay
    Stay:
        POL2 V -1
        Stop
	}
}

ACTOR DecorativeSkullA
{
    Radius 3
    Height 9
    Scale 0.98
	Mass 20
    Health 1
    Monster
    +FRIENDLY
    +SHOOTABLE
    +SOLID
    +MOVEWITHSECTOR
    +NOBLOOD
	+NOTAUTOAIMED
	-COUNTKILL
damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0 damagefactor "Taunt", 0.0 damagefactor "KillMe", 0.0 damagefactor "Shrapnel", 0.0
    States
    {
    Spawn:
    SKDC A 1
	SKDC A -1
    Stop
    Death:
    TNT1 A 0 A_CustomMissile ("LSpart2", 0, 0, random (0, 360), 2, random (0, 160))
    TNT1 AAAAAA 0 A_CustomMissile ("LSpart1", 0, 0, random (0, 360), 2, random (0, 160))
    Stop
    }
}

ACTOR DecorativeSkullB: DecorativeSkullA
{
States
{
    Spawn:
    SKDC B 1
	SKDC B -1
    Stop
    }
}

ACTOR DecorativeSkullC: DecorativeSkullA
{
States
{
    Spawn:
    SKDC C 1
	SKDC C -1
    Stop
    }
}

ACTOR DecorativeSkullD: DecorativeSkullA
{
States
{
    Spawn:
    SKDC D 1
	SKDC D -1
    Stop
    }
}


ACTOR ImpaledHead: HeadOnAStick Replaces HeadOnAStick
{
	States
	{
	Vanilla:
		POL4 A 1
		POL4 A -1
		Stop
		
	Spawn:
		POL4 B 0
		MARN A 0 ACS_ExecuteAlways(795, 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 1
	
	Spawn32:
        TNT1 A 0
        TNT1 A 0 A_Jump (128, "Spawn2","Spawn3","Spawn4")
		POL4 I -1
		Stop

	Spawn2:
		POL4 J -1
		Stop

	Spawn3:
		POL4 K -1
		Stop

	Spawn4:
		POL4 L -1
		Stop
	}
}
