
ACTOR TreeBlood
{
  renderstyle Add
  alpha 1.0
  -COUNTKILL
  -SHOOTABLE
  +CLIENTSIDEONLY
  +BLOODLESSIMPACT 
  +FORCEXYBILLBOARD
  +THRUACTORS
  +NOGRAVITY
  Scale 0.09
  Speed 0
  Radius 1
  Height 1
  states
  {
  Spawn:
   TNT1 AA 0 A_CustomMissile ("BrownCloudSmall", 2, 0, random (0, 360), 2, random (0, 360))
   TNT1 AA 0 A_CustomMissile ("WoodParticleTIny", 2, 0, random (0, 360), 2, random (0, 360))
   Stop
	
  }
}


// Trees ----------------------------------------------------------------

ACTOR TorchTree2: TorchTree Replaces TorchTree
{
	Game Doom
	Radius 16
	Height 56
    deathheight 32
damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
damagefactor "Plasma", 10.0 damagefactor "Burn", 5.0 damagefactor "Flames", 5.0
 damagefactor "Fire", 5.0
 +SOLID
    +SHOOTABLE
	BloodType "TreeBlood"
    +FORCEYBILLBOARD
	+NOBLOODDECALS
	+NOTAUTOAIMED
    Mass 99999
	damagefactor "Explosive", 10.0
	burnheight 32
    Health 200
	States
	{
	Vanilla:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("VanillaSmallTree")
		Stop
		
	Spawn:	
		TRE1 A 3
		
		
		TRE1 O 0 Thing_ChangeTID(0,748)
		TRE1 A 3
		MARN A 0 ACS_ExecuteAlways(795, 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 0 Acs_executealways(375, 0, 0, 0, 0)//Check floor texture type
		Goto Spawn2
		
	Spawn2:
	TRE1 A 1
	TNT1 A 0 A_JUmpIfInventory("IsOverSand", 1, "SpawnPalm")
	//TNT1 A 0 A_Jump(48, "Spawn3")
	TNT1 A 0 A_JUmpIfInventory("IsOverGrass", 1, "ForestSpawn")
	TRE1 A -1
	Stop
	
	
	Spawn3:
	TRE1 A 1
	TRE1 A -1
	Stop
	
	
	
		
	SpawnPalm:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("BDPalmTree")
		Stop
		
	ForestSpawn:
		TNT1 A 0 A_NoBlocking
		TNT1 AAAAAA 0 A_SpawnItemEx("BDECGrassSpecial", random(-180, 180), random(-180, 180))
		TNT1 A 0 A_Jump(255, "SpawnForest1", "SpawnForest2")
		
	SpawnFOrest1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECGreenTree2")
		Stop
		
	SpawnFOrest2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECOldTree2")
		Stop
		
    Death:
	TRE1 B 1
    TNT1 AAAA 0 A_CustomMissile ("BrownCloud", 35, 0, random (0, 360), 2, random (0, 360))
	TNT1 AAA 0 A_CustomMissile ("WoodParticle", 35, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile ("WoodParticleSmall", 25, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile ("WoodParticleTiny", 55, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile ("WoodParticleBig", 65, 0, random (0, 360), 2, random (0, 160))
	TRE1 B -1
	Stop

	Death.Burn:
	Death.Flames:
	Death.Plasma:
	Death.Plasma2:
	Death.Fire:
		TNT1 A 0
		TNT1 AA 0 A_SpawnItemEx("RealisticFireSparksLoopBig", 0, 0, 64)
		TNT1 A 0 A_SpawnItemEx("HDFlamesGFX1", 0, 0, 5)
		TNT1 A 0 A_Playsound("BDFireplace", 1, 1, 1)
		TNT1 A 0 A_Jump(255, "Burning")
		TNT1 A 0
		Stop
		
		
		Burning:
			TRE1 C 15 BRIGHT //A_CustomMissile("FireballExplosionFlamesBig", 45, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("BurnDamageSmall", 16)
			Loop
	}
}


ACTOR Big_Tree: BigTree Replaces BigTree
{
	Game Doom
	Radius 32
	Height 84
	ProjectilePassHeight -16
    deathheight 42
	burnheight 32
	PainChance "Blood", 255
	damagefactor "Explosive", 10.0
 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
 damagefactor "Blood", 10.0
 DamageFactor "Fire", 2.0 DamageFactor "Burn", 2.0 DamageFactor "Flames", 2.0
 DamageFactor "Plasma", 2.0 DamageFactor "PLasma2", 2.0
	+SOLID
    +SHOOTABLE
    +FORCEYBILLBOARD
	-NOPAIN
	+NOTAUTOAIMED
    Mass 99999
    Health 500
	+NOBLOODDECALS
	BloodType "TreeBlood"
	States
	{
	
	Vanilla:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("VanillaBigTree")
		Stop
	Spawn:	
		TRE2 O 0
		TRE2 A 0 Thing_ChangeTID(0,748)
		
		TRE2 A 3
		MARN A 0 ACS_ExecuteAlways(795, 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 0 Acs_executealways(375, 0, 0, 0, 0)//Check floor texture type
		Goto Spawn2
		
		
	
	Spawn2:
		TRE2 A 1
		TNT1 A 0 A_JUmpIfInventory("IsOverGrass", 1, "ForestSPawn")
		TNT1 A 0 A_JUmpIfInventory("IsOverDirt", 1, "DirtSpawn")
		TNT1 A 0 A_JUmpIfInventory("IsOverSand", 1, "DesertSpawn")
		TRE2 A -1
		Stop
		
	DesertSpawn:
		TNT1 A 0
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("BDecJunglePlant2")
		Stop
		
	DirtSpawn:
		TRE2 A 1
		TNT1 A 0 A_Jump(196, "DirtSpawn2", "DirtSpawn3")
		TRE2 A -1
		Stop
		
	DirtSpawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECDeadTree1")
		Stop
		
	DirtSpawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECDeadTree2")
		Stop	
		
	ForestSpawn:
		TNT1 A 0 A_NoBlocking
		TNT1 AAAAAAAA 0 A_SpawnItemEx("BDECGrassSpecial", random(-180, 180), random(-180, 180))
		TNT1 A 0 A_Jump(255, "SpawnForest1", "SpawnForest2", "SpawnForest3", "SpawnForest4")
		
	SpawnFOrest1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECGreenTree1")
		Stop
		
	SpawnFOrest2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECOldTree1")
		Stop
		
	SpawnFOrest3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECGreenTree3")
		Stop
		
	SpawnFOrest4:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("BDECOldTree1")
		Stop	
    
	Pain.Blood:
	TRE2 M 1
	TRE2 M -1
	Stop
	
	Death:
	TRE2 B 1
    TNT1 AAAAAA 0 A_CustomMissile ("BrownCloud", 35, 0, random (0, 360), 2, random (0, 360))
	TNT1 AAAAA 0 A_CustomMissile ("WoodParticle", 35, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile ("WoodParticleSmall", 45, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAAAAA 0 A_CustomMissile ("WoodParticleTiny", 65, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAAAAAA 0 A_CustomMissile ("WoodParticleBig", 85, 0, random (0, 360), 2, random (0, 160))
	TRE2 B -1
	Stop
	
	Death.Burn:
	Death.Flames:
	Death.Plasma:
	Death.Plasma2:
	Death.Fire:
		TNT1 A 0
		TNT1 AA 0 A_SpawnItemEx("RealisticFireSparksLoopBig", 0, 0, 64)
		TNT1 A 0 A_SpawnItemEx("HDFlamesGFX1Big", 0, 0, 5)
		TNT1 A 0 A_Playsound("BDFireplace", 1, 1, 1)
		TNT1 A 0 A_Jump(255, "Burning")
		Loop
		
		
		Burning:
			TRE2 N 15 BRIGHT //A_CustomMissile("FireballExplosionFlamesBig", 45, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("BurnDamageLarge", 16)
			Loop
	}
}






ACTOR Wolfenstein3DFlowerPot
{
	Game Doom
	Radius 8
	Height 60
	sCALE 1.2
	+SOLID
	States
	{
	Spawn:
		WLZ7 B 1
		WLZ7 B -1
		Loop
	}
}






ACTOR VanillaBigTree
{
	Game Doom
	Radius 24
	Height 108
	ProjectilePassHeight -16
	+SOLID
	+SHOOTABLE
	BloodType "TreeBlood"
	+NOBLOODDECALS
    Mass 99999
    Health 99999
	States
	{
	Spawn:
		TRE2 A -1
		Stop
	}
}


ACTOR VanillaSmallTree
{
	Game Doom
	Radius 16
	Height 56
	ProjectilePassHeight -16
	+SHOOTABLE
	BloodType "TreeBlood"
	+NOBLOODDECALS
    Mass 99999
    Health 99999
	+SOLID
	States
	{
	Spawn:
		TRE1 A -1
		Stop
	}
}