////////////////////////////////
// PLAYER 3 - PHOBOS        ////
////////////////////////////////
ACTOR Phobos : PlayerPawn
{
	Speed 0.9
	Health 100
	Radius 16
	Height 56
	Mass 100
	-TELESTOMP
	Player.JumpZ 15.0
	DamageFactor "BruiserBlast", 0.2
	DamageFactor "MancubusBlast", 0.2
	Player.DisplayName "Phobos"
	PLayer.SoundClass "phobos"
	Player.CrouchSprite "PCRO"
	Player.StartItem "Colt"
	Player.StartItem "HandGrenadeAmmo", 2
	Player.StartItem "DoomguyFists"
	Player.StartItem "Clip1", 75
	Player.StartItem "Shell", 25
	Player.ColorRange 112, 127
	DeathSound "PHOBODTH"
	RenderStyle "Normal"
	States
	{
	Spawn:
		PHOB A 0
		"####" "#" 0
	Goto Idling		
		
	Idling:
		"####" E 2 A_JumpIf((MomX*MomX)+(MomY*MomY) > 16,"Walking")
	Loop
		
	See:
	
	Walking:
		PHOB A 0 A_SpawnItemEx("FootStepPhobos", -1, -1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		PHOB AAAAAABBBBBB 1
		PHOB A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
		PHOB A 0 A_SpawnItemEx("FootStepPhobosB", -1, 1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		PHOB CCCCCCDDDDDD 1
		PHOB A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
	Loop
		
	Missile:
		PHOB EF 4
	Goto Idling
		
	Melee:
		PHOB A 0
	Goto Idling
		
	Pain:
		PHOB A 1 A_Pain
	Goto Spawn
		
	Death:
		PHOB GH 3
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 500), 2, random(0, 190))
		PHOB I 3 A_Playsound ("PHOBODTH")
		PHOB J 3 A_NoBlocking
		PHOB KLM 3
		PHOB N -1
	Stop
	
XDeath:
		PLAY G 2
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
		TNT1 A 0 A_GiveToTarget("PVPFatality", 1)
		TNT1 A 0 ThrustThingZ(0,90,0,1)
		TNT1 A 0 A_CustomMissile("PhobosHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerPhobosLegDeath", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("RibsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("OrgansFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("TorsoFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		TNT1 A 0 A_NoBlocking
		TNT1 A -1
		Stop
	FatalityPVP:
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 ACS_Execute(477, 0, 0, 0, 0)
		TNT1 A 0 A_SetInvulnerable
	
	
	Crush:
		TNT1 A 0 A_SkullPop
		TNT1 A 0 A_CustomMissile("PhobosHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerPhobosLegDeath", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("RibsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("OrgansFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("TorsoFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		TNT1 A 0 A_NoBlocking
		TNT1 A -1
	Stop
	}
}

////////////////////////////////
// PLAYER FOOTSTEPS           //
////////////////////////////////
/////////////////////////////////////////////
ACTOR FootStepPhobos
{
	Radius 1
	Height 1
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_PlaySoundEx("STEP2A", "Weapon")
	Stop
	}
}

/////////////////////////////////////////////
ACTOR FootStepPhobosB : FootStep
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_PlaySoundEx("STEP2B", "Weapon")
	Stop
	}
}

///////////////////////////////////////
ACTOR PhobosHeadIsNowFlyingInTheAir
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	BounceType Doom
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+SKYEXPLODE
	+BOUNCEONWALLS
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE4"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		PHAD ABCD 3 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		TNT1 A 0 A_SpawnItem("BloodSpot",0,0,0,1)
		PHAD A -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XPlayerPhobosLegDeath
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	BounceType Doom
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+BOUNCEONWALLS
	+SKYEXPLODE
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE5"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		PLEG ABCD 3
		TNT1 A 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
	Loop
	
	Death:
		TNT1 A 0 A_SpawnItem("BloodSpot",0,0,0,1)
		PLEG E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}