////////////////////////////////
// PLAYER 2 - KOSAK         ////
////////////////////////////////
ACTOR Kosak : PlayerPawn
{
	Speed 1.2
	Health 107
	Radius 16
	Height 56
	Mass 100
	Stamina 7
	-TELESTOMP
	Player.DisplayName "Kosak"
	Player.SoundClass "kosak"
	Player.CrouchSprite "KCRO"
	Player.StartItem "DualBeretta"
	Player.StartItem "KosakMelee"
	Player.StartItem "HandGrenadeAmmo", 2
	Player.StartItem "Clip1", 50
	Player.StartItem "RocketAmmo", 5
	Player.ColorRange 112, 127
	DeathSound "PLYDEAD"
	RenderStyle "Normal"
	States
	{
	Spawn:
		NPLA A 0
		"####" "#" 0
	Goto Idling		
		
	Idling:
		"####" E 2 A_JumpIf((MomX*MomX)+(MomY*MomY) > 16,"Walking")
	Loop
		
	See:
	
	Walking:
		NPLA A 0 A_SpawnItemEx("FootStep", -1, -1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		NPLA AAAAAABBBBBB 1
		NPLA A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
		NPLA A 0 A_SpawnItemEx("FootStepB", -1, 1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		NPLA CCCCCCDDDDDD 1
		NPLA A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
	Loop
		
	Missile:
		NPLA EF 4
	Goto Idling
		
	Melee:
		NPLA A 0
	Goto Idling
		
	Pain:
		NPLA A 1 A_Pain
	Goto Spawn
		
	Death:
		NPLA 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 AAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 500), 2, random(0, 190))
		NPLA I 3 A_Playsound ("PLYDEAD", 1, 128, FALSE)
		NPLA J 3 A_NoBlocking
		NPLA KLM 3
		NPLA 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("KosakHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerKosakLegDeath", 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("KosakHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerKosakLegDeath", 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
	}
}

///////////////////////////////////////
ACTOR KosakHeadIsNowFlyingInTheAir
{
	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:
		KOHE 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)
		KOHE A -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XPlayerKosakLegDeath
{
	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:
		KLEG 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)
		KLEG E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}