
ACTOR XJunk1: XDeath1
{
    +CLIENTSIDEONLY
	+DONTSPLASH
	+DOOMBOUNCE
	BounceFactor 0.5
    Speed 14
	Gravity 0.8
    DeathSound "none"
	SeeSound "none"
	Decal None
    Scale 1.0
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        JNK6 ABCD 3
        Loop
    Death:
        JNK6 A 2000
        Stop
    Splash:
        TNT1 A 1
		JNK6 A -1
        Stop
    }
}

ACTOR XJunk2: XJunk1
{
    BounceFactor 0.3
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        JNK7 ABCD 3
        Loop
    Death:
        JNK7 A 2000
        Stop
    Splash:
        TNT1 A 1
		JNK7 A -1
        Stop
    }
}

ACTOR XJunk3: XJunk1
{
    BounceFactor 0.7
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        JNK8 ABCD 3
        Loop
    Death:
        JNK8 A 2000
        Stop
    Splash:
        TNT1 A 1
		JNK8 A -1
        Stop
    }
}

ACTOR XJunk4: XJunk1
{
    -DOOMBOUNCE
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        JNK4 ABCD 3
        Loop
    Death:
        JNK4 A 2000
        Stop
    Splash:
        TNT1 A 1
		JNK4 A -1
        Stop
    }
}

ACTOR XJunk5: XJunk1
{
    -DOOMBOUNCE
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        JNK5 ABCD 3
        Loop
    Death:
        JNK5 A 2000
        Stop
    Splash:
        TNT1 A 1
		JNK5 A -1
        Stop
    }
}

actor ArachnotronBlood: SawBlood
{
	states
	{
	SPAWN:
		TNT1 a 1
		TNT1 A 0 A_ChangeFlag("FRIENDLY", 0)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		TNT1 A 0 A_JumpIf((z - floorz) > 33, 1)
	Goto HitMetal
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("BD_CheckBloodIntensity")
		TNT1 A 2
		Goto Spawn2
	HitMetal:
	   TNT1 A 1
	   TNT1 A 0 A_SpawnItem("HitPuff")
	   TNT1 A 0 A_RadiusGIve("ArachnotronChasisHits", 128, RGF_MONSTERS, 1)
	   TNT1 A 0 A_RadiusGIve("ArachnotronChasisLastHit", 128, RGF_MONSTERS, 1)
	   Stop
	}
}

actor ArachnotronSawBlood : ArachnotronBlood
{
	states
	{
	Spawn:
		TNT1 a 1
		TNT1 A 0 A_ChangeFlag("FRIENDLY", 0)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		TNT1 A 0 A_JumpIf((z - floorz) > 42, 1)
	Goto HitMetal
		TNT1 A 0
		TNT1 A 0 A_RadiusGive("ChainsawHitRed", 128, RGF_PLAYERS, 1)
		TNT1 A 0 A_RadiusGive("PowerBloodOnVisor", 128, RGF_PLAYERS, 1)
		TNT1 A 0 A_RadiusGive("SawBloodOnVisor", 64, RGF_PLAYERS, 1)
		TNT1 A 0 A_CustomMissile ("BloodmistChainsaw", -10, 0, random (0, 360), 2, random (60, 90))
		TNT1 A 0 A_CustomMissile ("XDeath1", 0, 0, random (0, 360), 2, random (40, 80))
		TNT1 A 0 A_CustomMissile ("ChainsawWallRedBlood", 0, 0, random (0, 360), 2, random (-10, 80))
		TNT1 A 0 A_PlaySound("CSAWFLESH")
		Stop
	}
}

actor MastermindBlood: SawBlood
{
	states
	{
	SPAWN:
		TNT1 a 1
		TNT1 A 0 A_ChangeFlag("FRIENDLY", 0)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		TNT1 A 0 A_JumpIf((z - floorz) > 66, 1)
	Goto HitMetal
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("BD_CheckBloodIntensity")
		TNT1 A 2
		Goto Spawn2
	HitMetal:
	   TNT1 A 1
	   TNT1 A 0 A_SpawnItem("HitPuff")
	   TNT1 A 0 A_RadiusGIve("ArachnotronChasisHits", 128, RGF_MONSTERS, 1)
	   TNT1 A 0 A_RadiusGIve("ArachnotronChasisLastHit", 128, RGF_MONSTERS, 1)
	   Stop
	}
}