

//***Che: these are required for the monstersonly


ACTOR PowerNearDeath : PowerUp
{
	Powerup.Duration -45
	Speed 0.4
	//Inventory.Icon "DANGER"
	Powerup.Color 70,0,0,0.2
}

actor Player_Blood : FBD_Blood
 {
  Scale 0.3
  States

	{
	Spawn:
		BLHT A 0
		MARN A 0 ACS_NamedExecuteAlways("CheckIfDM", 0, 0, 0, 0)//Check if Coop
		BLHT A 2
		TNT1 A 0 A_CustomMissile ("FBD_FlyingBlood", 7, 0, random (0, 360), 2, random (30, 60))
		TNT1 A 0 A_JumpIfInventory("DmGAme", 1, "DM")
		BLHT BCDEFG 1
	    BLHT HHHHHHHHHHH 1 A_FadeOut(0.1)
	    Stop
		
	DM:	
		TNT1 A 0
		TNT1 A 0 A_SetScale(0.6)
		TNT1 A 0 A_CustomMissile ("FBD_FlyingBlood", 7, 0, random (0, 360), 2, random (30, 60))
		TNT1 AAAAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 A 0 A_FadeIn(0.4)
		BLHT BCDEFG 1 BRIGHT
	    BLHT HHHHHHHHHHHHHHHHH 1 A_FadeOut(0.05)
	    Stop
		}
}



actor Player_BloodSaw : FBD_Blood
 {
  Gravity 0.5
  Alpha 0.4
  -NOGRAVITY
  Scale 0.25
  States

	{
	Spawn:
		BLHT A 0
		MARN A 0 ACS_NamedExecuteAlways("CheckIfDM", 0, 0, 0, 0)//Check if Coop
		TNT1 A 0 A_Stop
		BLHT A 2
		TNT1 A 0 A_JumpIfInventory("DmGAme", 1, "DM")
		BLHT BCDEFG 1
	    BLHT GGGGGGGGGGGGGGGGGG 1 A_FadeOut(0.05)
	    Stop
		
	DM:	
		TNT1 A 0
		TNT1 A 0 A_SetScale(0.6)
		TNT1 A 0 A_RadiusGive("ChainsawHitRed", 200, RGF_PLAYERS | RGF_MONSTERS , 1)
		TNT1 A 0 A_RadiusGive("PowerBloodOnVisor", 200, RGF_PLAYERS | RGF_MONSTERS , 1)
		TNT1 A 0 A_CustomMissile ("FBD_FlyingBlood", 7, 0, random (0, 360), 2, random (30, 60))
		TNT1 AAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 A 0 A_FadeIn(0.4)
		BLHT AAABCDEFG 1 BRIGHT
	    BLHT GGGGGGGGGGGGGGGGGG 1 A_FadeOut(0.05)
	    Stop
		}
}


ACTOR PlayerFlyingBlood
{
 game Doom
 scale 0.75
 speed 7
 health 1
 radius 8
 height 1
	Decal BloodSuper
   +MISSILE
   +CLIENTSIDEONLY
   +NOTELEPORT
   +NOBLOCKMAP
   +FORCEXYBILLBOARD
        +EXPLODEONWATER
    States
    {
     Spawn:
       NULL A 0 A_JumpIf(waterlevel > 1, "Splash")
        XDT1 ABCD 4 A_SpawnItem("Brutal_FlyingBloodTrail",0,0,0,1)
        loop
	Splash:
        BLOD A 0
        stop
     Death:
       NULL A 1 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
        XDT1 EFGHIJKL 3
        stop
    }
}


ACTOR BloodOnVisor : PowerupGiver 2408
{
   Inventory.Amount 1
   Scale 0.5
   Inventory.MaxAmount 10
   Powerup.Type BloodOnVisor
   Powerup.Duration 400
   Inventory.Icon TNT1A0
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
   States
   {
   Spawn:
      NULL A 1
      Stop
   } 
} 

ACTOR PowerBloodOnVisor : PowerUp
{
	Powerup.Duration -90
	Speed 0.4
	Inventory.Icon "TNT1A0"
	Powerup.Color 70,0,0,0.0
}



ACTOR BlueBloodOnVisor : PowerupGiver
{
   Inventory.Amount 1
   Scale 0.5
   Inventory.MaxAmount 10
   Powerup.Type BlueBloodOnVisor
   Powerup.Duration 400
   Inventory.Icon TNT1A0
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
   States
   {
   Spawn:
      NULL A 1
      Stop
   } 
} 

ACTOR PowerBlueBloodOnVisor : PowerUp
{
	Powerup.Duration -90
	Speed 0.4
	Inventory.Icon "TNT1A0"
	Powerup.Color 70,0,0,0.0
}


ACTOR GreenBloodOnVisor : PowerupGiver
{
   Inventory.Amount 1
   Scale 0.5
   Inventory.MaxAmount 10
   Powerup.Type GreenBloodOnVisor
   Powerup.Duration 400
   Inventory.Icon TNT1A0
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
   States
   {
   Spawn:
      NULL A 1
      Stop
   } 
} 

ACTOR PowerGreenBloodOnVisor : PowerUp
{
	Powerup.Duration -90
	Speed 0.4
	Inventory.Icon "TNT1A0"
	Powerup.Color 70,0,0,0.0
}


Actor ChainguyguyContinue : Inventory
{
inventory.maxamount 1
}


Actor ComeEatMeDemon : Inventory
{
inventory.maxamount 1
}





actor MarineEattenByDemon: FBD_CurbstompedMarine
{
	Health 100
	Height 16
	Radius 8
	MONSTER
	-GHOST
	+THRUACTORS
	+FRIENDLY
    States
	
    {
		//***Che
		Spawn:
			TNT1 A 0
			// cannot check progenitor this time because tis one is spawned by the player
			TNT1 A 0  // makes the blood it emits go lo-res 
			  // if slaughtercount is over half the slaughter limit (i.e. 600) at the moment of spawning
		Stay: // ancestor's Pain.Kick, Pain.ExplosiveImpact and Pain.Trample redirect here after z-thrusting the actor
			XPL1 E 5 A_CheckFloor("Land")
			Loop
		Land:	
			TNT1 A 0 ACS_NamedExecuteAlways("FBD_CheckFloorIsLava_V", 0, 0, 0, 0) // also spawns smoke for 30 tics if succeeds
			XPL1 E 3 // ten times shorther than other corpses
			TNT1 A 0 A_JumpIf(user_floor_is_lava, "PreLandOnLava")
			
			NULL A 0 A_CHangeFlag("THRUACTORS", 0)
			NULL A 0 A_GiveInventory("ComeEatMeDemon") // controls the demons behavior, they check for this
			NULL A 0 A_SpawnItem ("GrowingBloodPool")
			XPL1 EEE 6 A_SpawnItemEx("ComeEatMeDemonBroadcaster",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0) //A_SpawnItem("KillMe") // inflicts 3 "KillMe" type damage is a radius of 500 thus insta-aggroing all surrounding supceptible monsters at this corpse	(who have Pain.KillMe direcly lead to Missile)
			XPL1 E -1
			Stop
		PreLandOnLava:
			XPL1 E 30
			Goto LandOnLava
	}
}
	   
	   
	   



ACTOR PROLSpriteA
{
 +NOINTERACTION
 +THRUACTORS
 +CLIENTSIDEONLY
 +NOTIMEFREEZE
 States
    {

	 Spawn:
		BFUG A 0
		PROL A 1
		Stop
    }
}


ACTOR PROLSpriteB: PROLSpriteA
{
 States
    {

	 Spawn:
		BFUG A 0
		PROL B 1
		Stop
    }
}


ACTOR PROLSpriteC: PROLSpriteA
{
 States
    {

	 Spawn:
		BFUG A 0
		PROL C 1
		Stop
    }
}


ACTOR PROLSpriteD: PROLSpriteA
{
 States
    {

	 Spawn:
		BFUG A 0
		PROL D 1
		Stop
    }
}


ACTOR PROLSpriteE: PROLSpriteA
{
 States
    {

	 Spawn:
		BFUG A 0
		PROL E 1
		Stop
    }
}