#include "Code/CROW.dec"

Actor Guiser : Innocent
{
	Player.DisplayName "Guiser"
	Player.SoundClass "Boo"
}

Actor Flare : CustomInventory 14434 // Pumpkins
{
  //$Category WDI Items
  //$Sprite FLARP0
  //$Title "Flare"
	xscale 0.5
	yscale 0.5
	height 4
	radius 10
	Inventory.Amount 2
	Inventory.Icon "ARTIFLAR"
	Inventory.MaxAmount 10
	Inventory.PickupMessage "\cjPicked up a \c[O1]Jack-o'-lantern."
	Inventory.RespawnTics 10500
	Tag "Jack-o'-lantern"
	+MOVEWITHSECTOR
	+DONTSPLASH +FLOORCLIP
	+INVENTORY.INVBAR 
	-INVENTORY.INTERHUBSTRIP
	states
	{
	Spawn:
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_SetScale(-scalex,scaley)
	TNT1 AA 0
	FLAR P -1
	stop
	use:
	TNT1 A 15 A_PlaySound("MATCH", CHAN_ITEM, 1.0, 0, 15.0)
    FLAR D 0 A_FireCustomMissile("TossedFlare", 0, 0, 0, 0)
	stop
	}
}

Actor TreeA 14287
{
  //$Category WDI Environment/Trees
  //$Sprite TRDTA0
  //$Title "Tree 5"
	radius 16
	height 64
	DeathHeight 64
	Scale 1.2
	Mass 0x7FFFFFFF
	Health 10000
	+SOLID +VULNERABLE
	+NOBLOOD +FORCEYBILLBOARD
	-NOGRAVITY
	states 
	{
	Spawn:
		TNT1 A 0 NODELAY  A_SpawnItemEX("TreeGrassSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 A_SpawnItemEx("AnimalSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,250)
		TNT1 A 0 A_Jump(128,2)
		TNT1 A 0 A_SetScale(-scalex,scaley)
		TRDT A -1
		loop
	}
}

Actor BFTREE7 14289
{
	Radius 5
	height 128
	DeathHeight 128
	scale 1.0
	Health 10000
	Mass 0x7FFFFFFF
	+SOLID +FORCEYBILLBOARD
	+SHOOTABLE +VULNERABLE
	+NOBLOOD
    states
    {
    Spawn:
	TNT1 A 0 A_SpawnItemEx("AnimalSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,250)
    NTRE A -1
    Stop
    }
}

ACTOR BDemon : Demon replaces Demon
{
	Health 200
	Radius 30
	Height 56
	Speed 10
	PainChance 180
	Mass 400
	+FLOORCLIP
	Monster
	SeeSound "BPinky/Sight"
	DeathSound "BPinky/Death"
	ActiveSound "Barks"
	PainSound "BPinky/Pain"
	Obituary "%o was too loud."
	States
	{
		Spawn:
			BPWA A 4 A_LookEx(0,0,400)
			BPWA AAA 4 A_Wander
			BPWA B 4 A_LookEx(0,0,400)
			BPWA BBB 4 A_Wander
			BPWA C 4 A_LookEx(0,0,400)
			BPWA CCC 4 A_Wander
			BPWA D 4 A_LookEx(0,0,400)
			BPWA DDD 4 A_Wander
			TNT1 A 0 A_Jump(14, "Grumble")
			loop
		See:
			BPWA AABBCCDD 2 Fast A_Chase
			loop
		Melee:
			TNT1 A 0 A_PlaySound("BPinky/Bite")
			BPBI AB 6 A_FaceTarget
			BPBI C 6 A_CustomMeleeAttack(random(3, 6) * 5, "", "Melee", true)
			Goto See
		Grumble:
			TNT1 A 0 A_PlaySound("BPinky/Idle")
			Goto Spawn
		Pain:
			BPPA A 2 A_Pain
			Goto See
		Death:
			TNT1 A 0 A_PlaySound("BPinky/Death")
			BPDE ABCDEF 6
			BPDE F -1
			Stop
	}
}