ACTOR Doomer : PlayerPawn Replaces DoomPlayer
{
	Health 100
	Radius 14
	Height 56
	Mass 130
    player.viewheight	44
    player.attackzoffset 17
    GibHealth 20
	PainChance 255
	Player.ForwardMove 0.5, 0.5
	Player.SideMove 0.5, 0.5
	Scale 0.9
	+SOLID
	+MTHRUSPECIES
	+DONTHURTSPECIES
	+THRUGHOST
	+THRUSPECIES
	+NOSKIN
	Species "Marines"
    BloodType "Player_Blood", "Player_Blood", "Player_Blood"
    MaxStepHeight 16
	damagefactor "Bullet", 0.5 damagefactor "M14", 0.5
	damagefactor "KillMe", 0.0 damagefactor "Head", 0.0
	Player.ColorRange 112, 127
	Player.CrouchSprite "PLAY"
	Player.DamageScreenColor "Red", 2.0
	States
	{
	
	
    Spawn:
		PLAY A 0
		PLAY A 0 A_JumpIfInventory("GoSpecial", 1, "SpecialChecker")
		TNT1 A 0 A_TakeInventory("IsFloating", 100)
		PLAY BB 2 A_JumpIf (momZ !=0, "IsJumpin")
		TNT1 A 0 A_Stop
		PLAY BBBBBBBBBBB 2 A_JumpIf (momZ !=0, "IsJumpin")
		TNT1 A 0 A_TakeInventory("Nutrition", 1)
		TNT1 A 0 A_TakeInventory("Hydration", 2)
		PLAY A 0 A_JumpIfInventory("Bleeding", 1, "Bleeds")
		TNT1 A 0 A_JumpIfInventory("Nutrition", 4000, "FoodHeal")
		Loop

	FoodHeal:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("HealWalkToken", 100)
		TNT1 A 0 A_JumpIfInventory("Nutrition", 1, 3)
		TNT1 A 0 A_JumpIfInventory("Hydration", 1, 2)
		Goto Dying
		TNT1 AAA 0
		TNT1 A 0 A_JumpIfInventory("Hydration", 4000, 2)
		Goto Spawn
		TNT1 A 0
		TNT1 A 0 HealThing(1, 100)
		Goto Spawn


	WalkHeal:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("HealWalkToken", 100)
		TNT1 A 0 A_JumpIfInventory("Nutrition", 1, 2)
		Goto Dying
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Hydration", 1, 2)
		Goto Dying
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Hydration", 4000, "FoodHeal")
		PLAY A 1
		TNT1 A 0 A_TakeInventory("HealWalkToken", 20)
		PLAY A 0 A_JumpIfInventory("Bleeding", 1, "Bleeds")
		PLAY B 0 A_JumpIfInventory("BootsSmearedWithRedBlood", 1, "SeeSmearedWithRedBlood")
		PLAY A 0 A_JumpIfInventory("BootsSmearedWithBlueBlood", 1, "SeeSmearedWithBlueBlood")
		PLAY A 0 A_JumpIfInventory("BootsSmearedWithGreenBlood", 1, "SeeSmearedWithGreenBlood")
		Goto See
	
	Dying:
		PLAY A 1
		TNT1 A 0 A_Explode(4, 3, 1, 1, 3)
		TNT1 A 0 A_TakeInventory("HealWalkToken", 100)
		Goto See

	Bleeds:
		PLAY A 1
		TNT1 A 0 A_SpawnItem("BleedingDamage")
		Goto See


	
	See:
		PLAY A 0
		PLAY A 0 A_TakeInventory("IsStandingStill", 1)
		PLAY A 0 A_JumpIfInventory("HealWalkToken", 7, "WalkHeal")

		PLAY AAAAAA 1 A_JumpIf (momZ != 0, "IsJumpin")
		PLAY BBBBBB 1 A_JumpIf (momZ != 0, "IsJumpin")
		PLAY B 0 A_SpawnItemEx("FootStep6", 0, 0, 16, 0, 0, 0, 0, SXF_SETMASTER )
		PLAY CCCCCC 1 A_JumpIf (momZ != 0, "IsJumpin")
		PLAY DDDDDD 1 A_JumpIf (momZ != 0, "IsJumpin")
		PLAY B 0 A_SpawnItemEx("FootStep6", 0, 0, 16, 0, 0, 0, 0, SXF_SETMASTER )

		TNT1 A 0 A_TakeInventory("Nutrition", 2)
		TNT1 A 0 A_TakeInventory("Hydration", 4)
		TNT1 A 0 A_GiveInventory("HealWalkToken", 1)

		PLAY A 0 A_JumpIfInventory("Bleeding", 1, "Bleeds")
		PLAY B 0 A_JumpIfInventory("BootsSmearedWithRedBlood", 1, "SeeSmearedWithRedBlood")
		PLAY A 0 A_JumpIfInventory("BootsSmearedWithBlueBlood", 1, "SeeSmearedWithBlueBlood")
		PLAY A 0 A_JumpIfInventory("BootsSmearedWithGreenBlood", 1, "SeeSmearedWithGreenBlood")
		Goto Spawn
		
   IsJumpin:
        PLAY A 3
        PLAY B 0 A_JumpIfInventory("GoSpecial", 1, "SpecialCheckerMoving")
		TNT1 A 0 A_GiveInventory("IsFloating", 1)
		PLAY A 1 A_JumpIf (momZ != 0, "InAir")
		Goto Spawn
		
	InAir:	
		PLAY A 3
        PLAY B 0 A_JumpIfInventory("GoSpecial", 1, "SpecialCheckerMoving")	
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIf (momZ == 0, "Land")
		Loop
	
	Land:
        TNT1 A 0
        PLAY B 0 A_JumpIfInventory("GoSpecial", 1, "SpecialCheckerMoving")
		TNT1 A 0 A_TakeInventory("IsFloating", 100)
		PLAY A 0 A_SpawnItemEx("FootStepStrong", 0, 0, 8, 0, 0)
		TNT1 A 0 A_GiveInventory("ImpactMovesSling", 1)
		PLAY A 1 A_JumpIf (momZ != 0, "InAir")
		TNT1 A 0 ThrustTHingZ(0, 50, 1, 1)
		Goto Spawn
		

	SeeSmearedWithRedBlood:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("FootPrintAlternate", 1, "SeeSmearedWithRedBlood2")
		PLAY A 0 A_SpawnItemEx("RedBloodFootPrintLeft", 0, 7)
		TNT1 A 0 A_GiveInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithRedBlood", 1)
		Goto Spawn	
		
	SeeSmearedWithRedBlood2:
		TNT1 A 0
		PLAY A 0 A_SpawnItemEx("RedBloodFootPrintRight", 0, -7)
		TNT1 A 0 A_TakeInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithRedBlood", 1)
		Goto Spawn
		
	SeeSmearedWithBlueBlood:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("FootPrintAlternate", 1, "SeeSmearedWithBlueBlood2")
		PLAY A 0 A_SpawnItemEx("BlueBloodFootPrintLeft", 0, 7)
		TNT1 A 0 A_GiveInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithBlueBlood", 1)
		Goto Spawn	
		
	SeeSmearedWithBlueBlood2:
		TNT1 A 0
		PLAY A 0 A_SpawnItemEx("BlueBloodFootPrintRight", 0, -7)
		TNT1 A 0 A_TakeInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithBlueBlood", 1)
		Goto Spawn	
		
		
	SeeSmearedWithGreenBlood:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("FootPrintAlternate", 1, "SeeSmearedWithGreenBlood2")
		PLAY A 0 A_SpawnItemEx("GreenBloodFootPrintLeft", 0, 7)
		TNT1 A 0 A_GiveInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithGreenBlood", 1)
		Goto Spawn	
		
	SeeSmearedWithGreenBlood2:
		TNT1 A 0
		PLAY A 0 A_SpawnItemEx("GreenBloodFootPrintRight", 0, -7)
		TNT1 A 0 A_TakeInventory("FootPrintAlternate", 1)
		TNT1 A 0 A_TakeInventory("BootsSmearedWithGreenBlood", 1)
		Goto Spawn	
		
		
		
		
   Kick:
		NULL A 0 A_TakeInventory("KickHasHit",1)
        NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_TakeInventory("KickHasHit",1)
		PLAY CB 3 A_JumpIfInventory("KickHasHit", 1, "KickHit")
        NULL A 0 A_TakeInventory("Kicking",1)
        Goto Spawn
   RifleKick:
		NULL A 0 A_TakeInventory("KickHasHit",1)
        NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_TakeInventory("KickHasHit",1)
		PLAY CB 3 A_JumpIfInventory("KickHasHit", 1, "KickHit")
        NULL A 0 A_TakeInventory("Kicking",1)
        Goto Spawn	
		
	AirKick:
	    PLAY AAAAA 2 A_JumpIfInventory("KickHasHit", 1, "KickHit")
		NULL A 0 A_TakeInventory("Kicking",1)
		Goto Spawn
		
	KickHit:
		TNT1 A 0 A_Stop
		NULL A 0 A_TakeInventory("Kicking",1)
		NULL A 0 A_TakeInventory("KickHasHit",1)
		TNT1 A 0 A_Recoil(3)
		Goto Spawn
	
    Punch:
        PLAY H 1
		NULL A 0 A_TakeInventory("Punching", 1)
        NULL A 0 A_JumpIfInventory("GotMeatShield", 1, "MeatShieldChecker")
		PLAY H 1
		PLAY E 4
		Goto Spawn
		
	SayOneLiner:
		PLAY A 1
		NULL A 0 A_PlaySound("ONELIN", 2)
		NULL A 0 A_TakeInventory("oneliner", 1)
		Goto Spawn
	
	AdvancedTaunt:
		PLAY A 1
		NULL A 0 A_PlaySound("TAUNT0", 2)
		NULL A 0 A_TakeInventory("advtaunting", 1)
		Goto Spawn
	
	FistTaunt:
		NULL A 0
		NULL A 0 A_PlaySound("MTAUN", 2)
		NULL A 0 A_TakeInventory("advtaunting", 1)
		Goto Spawn
	

	 
	
		
	Pain.Kick:
	Pain.Extremepunches:
		TNT1 A 0
        NULL A 0 A_Pain
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_Recoil(5)
        NULL A 0 A_PlaySound("plpain", 2)
		NULL A 0 ThrustThingZ(0, 30, 0, 1)
		PLAY G 4
		Goto See
		
	
	Pain:
		TNT1 A 0
        NULL A 0 A_Pain
		NULL A 0 A_PlaySound("plpain", 2)
		TNT1 AA 0
		TNT1 A 0 A_SpawnItem("Bleeder")
		PLAY G 0 A_SetPitch(pitch-2)
		PLAY G 1 A_SetBlend("99 1 1", .5, 35)
		PLAY G 0 A_SetPitch(pitch+2)
		Goto SpecialChecker

	Pain.BarbedWire:
		TNT1 A 0
        NULL A 0 A_Pain
		NULL A 0 A_PlaySound("plpain", 2)
		TNT1 A 0 A_Stop
		TNT1 A 0 A_SpawnItem("Bleeder")
		PLAY G 1 A_SetBlend("99 1 1", .5, 35)
		PLAY GGGGGGG 1 A_Stop
		Goto SpecialChecker
		
	Pain.Bleed:
		TNT1 A 0
		TNT1 A 0 A_GiveInventory("Bleeding", 1)
		PLAY G 0 A_SetPitch(pitch+2)
		TNT1 A 0 A_Print("You are bleeding! Use a bandage!")
		PLAY G 1 A_SetBlend("99 1 1", .9, 50)
		Goto SpecialChecker

	Pain.Bleeding:
		TNT1 A 0
		PLAY G 1 A_SetBlend("99 1 1", .5, 10)
		Goto SpecialChecker
		
	Pain.Fire:
		TNT1 A 0
        NULL A 0 A_Pain
		TNT1 A 0 A_GiveInventory("ImpactMovesSling", 1)
        NULL A 0 A_PlaySound("plpain", 2)
		TNT1 AA 0
		PLAY G 4
		Goto SpecialChecker	
		
	Pain.Falling:
		TNT1 A 0
		NULL A 0 A_CustomMissile ("CameraShake", 50, 0, random (0, 360), 2, random (0, 160))
		NULL A 0 A_Playsound("misc/xdeath4a", 6, 2.0)
		NULL A 0 A_Pain
		TNT1 A 0 A_GiveInventory("ImpactMovesSling", 1)
        NULL A 0 A_PlaySound("plpain", 2)
		PLAY G 4
		Goto SpecialChecker		
		
	
	Death:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsDown", 1, "Death.Trample")
        NULL A 0 A_Takeinventory("Kicking",1)
		PLAY A 0 A_GiveInventory("PlayerIsDead", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("EnemyIsArchvile", 1, "Death.ArchvileExplode")
		NULL A 0 A_Jump (64, "Death.Arm")
		NULL A 0 A_CustomMissile ("MuchBlood", 50, 0, random (0, 360), 2, random (0, 160))
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		NULL A 0 A_SpawnItem ("GrowingBloodPool")
		PLAY N -1
		Stop

	Death.Fire:
    Death.flames:
        NULL A 0
		TNT1 A 0 A_JumpIfInTargetInventory("EnemyIsArchvile", 1, "Death.ArchvileExplode")
		PLAY A 0 A_GiveInventory("PlayerIsDead", 1)
        NULL A 0 A_Takeinventory("Kicking",1)
        NULL A 0 A_Scream
        NULL A 0 A_NoBlocking
		TNT1 A 0 A_PLaySound("BIGSCRE", 2)
        NULL A 0 A_SpawnItem("GenericBurningGuy")
        NULL A 1
        NULL A -1
		Stop

	  
    Death.Stomp:
		PLAY A 0 A_GiveInventory("PlayerIsDead", 1)
		NULL AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		NULL AAAAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
		NULL AA 0 bright A_CustomMissile ("XDeath2", 55, 0, random (0, 360), 2, random (30, 180))
		NULL AA 0 bright A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (30, 180))
		NULL A 0 A_SpawnItem ("CrushedRemains")
		NULL A 1
		NULL A 1 A_XScream
		NULL A 1 A_NoBlocking
		NULL A -1
		Stop
	
    Crush:
        NULL A 0 A_PlaySound("misc/xdeath4")
        CRS1 A 5
        CRS1 A -1
        Stop


	SpecialChecker:
        PLAY A 1
        NULL A 0 A_TakeInventory("GoSpecial", 1)
        Goto Spawn  
		

      SpecialCheckerMoving:
		PLAY A 0
        PLAY A 1
		
        NULL A 0 A_TakeInventory("GoSpecial", 1)
       NULL A 0 A_TakeInventory("GoSpecial", 1)
       Goto See    
  
	}
}

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

actor Player_Blood : Brutal_Blood
 {
  Scale 0.3
  States

	{
	Spawn:
		BLHT A 0
		PLAY A 0 ACS_NamedExecuteAlways("CheckIfDM", 0, 0, 0, 0)//Check if Coop
		BLHT A 2
		TNT1 A 0 A_CustomMissile ("Brutal_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 ("Brutal_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 : Brutal_Blood
 {
  Gravity 0.5
  Alpha 0.4
  -NOGRAVITY
  Scale 0.25
  States

	{
	Spawn:
		BLHT A 0
		PLAY 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 ("Brutal_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 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 Bleh
{
+THRUACTORS
+NOCLIP
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 3
		TNT1 A 0 A_RadiusThrust(6000, 250, RTF_NOIMPACTDAMAGE)
		Stop
		}
}