Actor DemonRuneBaron : PowerupGiver
{
	Inventory.PickupMessage "Demon Rune!"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.MaxAmount 0
	+COUNTITEM
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	+INVENTORY.BIGPOWERUP
	Powerup.Type TransformBaron
	Powerup.Duration -30
	States
	{
	Spawn:
		DMRU AABBCCDD 2 Bright A_SpawnItem("RedFlareMedium",0,20)
		loop
	}
}

Actor PowerTransformBaron : PowerMorph
{
	PowerMorph.PlayerClass "BaronPlayer"
}

Actor DemonSight : PowerupGiver
{
	Inventory.PickupMessage "None"
	Inventory.PickupSound "None"
	Inventory.MaxAmount 0
	+COUNTITEM
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Powerup.Type Torch
	Powerup.Duration -30
	Powerup.Color 255, 0, 0, 0.25
}

Actor BaronPlayer : DoomPlayer
{
	Radius 21
	Height 76
	Scale 1.1
	Player.ViewHeight 66
	Player.AttackZOffset 28
	Player.JumpZ 10
	Player.MorphWeapon "D4BaronHUD"
	PainSound "baron/pain"
	DeathSound "baron/death"
	Health 1200
	Damagefactor "Avoid", 0.0	Damagefactor "BHFTOnBarrel", 0.0	Damagefactor "Blood", 0.0
	Damagefactor "CancelTeleportFog", 0.0	Damagefactor "CauseWaterSplash", 0.0	DamageFactor "Crush", 10.0
	Damagefactor "ExtremePunches", 2.5	Damagefactor "Fatality", 2.5	DamageFactor "TankWeakSpot", 0.0
	Damagefactor "FriendBullet", 0.0	Damagefactor "GibRemoving", 0.0
	Damagefactor "HangingHook", 0.0	Damagefactor "Head", 0.0	Damagefactor "HeadKick", 0.0
	Damagefactor "HelperMarineFatallity", 0.0	Damagefactor "KillMe", 0.0	Damagefactor "Leg", 0.0
	Damagefactor "Slide", 0.0	Damagefactor "MonsterKnocked", 0.0	Damagefactor "PussyGrab", 0.0
	Damagefactor "Repair", 0.0	Damagefactor "RevenantHitStomach", 0.0	DamageFactor "SSG", 2.5
	Damagefactor "Slide", 0.5	Damagefactor "SpawnMarine", 0.0	Damagefactor "Taunt", 0.0
	Damagefactor "TeleportRemover", 0.0	Damagefactor "Use", 0.0	Damagefactor "Kick", 0.5
	Damagefactor "Melee", 0.5	Damagefactor "Shrapnel", 0.5	Damagefactor "Slime", 0.0
	Damagefactor "Stealth", 0.5	Damagefactor "Stomp", 0.5	Damagefactor "Trample", 0.5
	Damagefactor "Burn", 0.5	Damagefactor "Fire", 0.5	Damagefactor "Flames", 0.5
	Damagefactor "GreenFire", 0.5	Damagefactor "HumanBBQ", 0.5	Damagefactor "Lava", 0.0

	PainChance "Avoid", 0	PainChance "Burn", 16
	PainChance "ExplosiveImpact", 16	PainChance "Extremepunches", 16	PainChance "Fatality", 16
	PainChance "Fire", 16	PainChance "Flames", 16	PainChance "GreenFire", 16
	PainChance "HumanBBQ", 16
	PainChance "Kick", 16	PainChance "LowKick", 16	PainChance "Melee", 16
	PainChance "Slide", 16
	PainChance "Stealth", 16	PainChance "Trample", 16
	Player.ColorRange 112, 127
	Player.Face D4B
	+NOSKIN
	-PICKUP
	-DONTTRANSLATE
	+PLAYERPAWN.CROUCHABLEMORPH
	+DONTHARMSPECIES
	Species "Marines"
	Player.CrouchSprite "BOSS"
	Speed 0.4
	States
	{
	Spawn:
		BOSS B 4
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		Loop
	See:
		BOSS A 2 A_SpawnItemEx("PlayerBaronTrample", 0, 0, 8, 0, 0, 0, 0, SXF_SETMASTER )
		BOSS B 2
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")

		BOSS C 2 A_SpawnItemEx("PlayerBaronTrample", 0, 0, 8, 0, 0, 0, 0, SXF_SETMASTER )
		BOSS D 2
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		Goto Spawn

	Melee:
	Missile:
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		BOSS E 6
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		BOSS F 6
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		BOSS G 6
		Goto Spawn

	Kick:
		BARO R 3
		BARO Q 6
		BARO P 2
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, 40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, 40, random (0, 140), 2, random (0, 160))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, -40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, -40, random (0, 140), 2, random (0, 160))
		BARO P 2
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, 40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, 40, random (0, 140), 2, random (0, 160))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, -40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, -40, random (0, 140), 2, random (0, 160))
		BARO P 2
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, 40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, 40, random (0, 140), 2, random (0, 160))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, -40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, -40, random (0, 140), 2, random (0, 160))
		BARO P 2
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, 40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, 40, random (0, 140), 2, random (0, 160))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 78, -40, random (0, 360), 2, random (70, 110))
		TNT1 A 0 A_CustomMissile ("BallGettingReadyGreen", 79, -40, random (0, 140), 2, random (0, 160))
		BARO P 2
		BARO Q 4
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 58, 30, random (0, 360), 2, random (70, 110))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 58, -30, random (0, 360), 2, random (70, 110))
		BARO Q 4
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 48, 30, random (0, 360), 2, random (70, 110))
		TNT1 A 0 bright A_CustomMissile ("SmallGreenFlameTrails", 48, -30, random (0, 360), 2, random (70, 110))
		BARO R 8
		Goto Spawn

	Pain:
		BOSS H  3
		BOSS H  3 A_Pain
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("ZombiemanFatality", 1, "FatalityZombieman")
		TNT1 A 0 A_JumpIfInventory("SergeantFatality", 1, "FatalitySergeant")
		TNT1 A 0 A_JumpIfInventory("ImpFatality", 1, "FatalityImp")
		TNT1 A 0 A_JumpIfInventory("DemonFatality", 1, "FatalityDemon")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "Kick")
		Goto Spawn

	Death:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("D4BaronHUD")
		BOSS I  8
		BOSS J  8 A_Scream
		BOSS K  8
		BOSS L  8 A_NoBlocking
		BOSS MN 8
		BOSS O -1
		Stop

	CurbstompMarine:
		NULL A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("GoFatality", 1)
        NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
		NULL A 0 ACS_NamedExecute("BDSetInvulnerable", 0)
        //////////////////////////////////////////////////////
		KNTF A 8
		TNT1 AAAA 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		KNTF BC 8 A_CustomMissile ("XDeath1", 50, 0, random (0, 360), 2, random (0, 160))
		EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)
		TNT1 A 0 A_CustomMissile ("MuchBlood2", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("mUCHbLOOD3", 50, 0, random (0, 360), 2, random (0, 160))
		KNTF DDDD 2 A_CustomMissile ("Brutal_LiquidBlood3", 25, 0, random (0, 360), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("RipGuts", 20, 0, random (0, 360), 2, random (0, 160))
		KNTF EEEEFFFF 2 A_CustomMissile ("XDeath1", 38, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("RipGuts", 20, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		KNTF GGGG 2 A_CustomMissile ("Brutal_LiquidBlood3", 25, 0, random (0, 360), 2, random (0, 40))
		TNT1 A 0 A_SpawnItem ("RappedMarine", 1)
		//////////////////////////////////////////////////////
		TNT1 A 0 A_TakeInventory("Curbstomp_Marine",1)
		TNT1 A 0 A_TakeInventory("GoFatality", 1)
		MARN A 0 ACS_NamedExecuteAlways("BDStopCamera", 0, 0, 0, 0)//Stop Camera
        NULL A 0 SetPlayerProperty(0,0,0)
		Goto Spawn

   FatalityZombieman:
		NULL A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("GoFatality", 1)
        NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
		NULL A 0 ACS_NamedExecute("BDSetInvulnerable", 0)
        //////////////////////////////////////////////////////
		3HF1 A 8
		TNT1 A 0 A_PlaySound("grunt/death")
		3HF1 BC 8
		TNT1 AA 0 A_CustomMissile ("XDeath1", 55, 0, random (0, 360), 2, random (0, 160))
		3HF1 BCBC 8 A_CustomMissile ("XDeath1", 55, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("MuchBlood", 55, 0, random (0, 360), 2, random (0, 160))
		3HF1 D 8
		3HF1 E 8
		TNT1 A 0 A_CustomMissile ("XDeathZombieManHead", 65, 0, random (0, 360), 2, random (70, 120))
		3HF1 F 8
		3HF1 G 8
		3HF1 H 8
        //////////////////////////////////////////////////////
		TNT1 A 0 A_GiveInventory("HasZombiemanChunk", 1)
        TNT1 A 0 A_TakeInventory("ZombieManFatality",1)
		TNT1 A 0 A_TakeInventory("GoFatality", 1)
		MARN A 0 ACS_NamedExecuteAlways("BDStopCamera", 0, 0, 0, 0)//Stop Camera
        NULL A 0 SetPlayerProperty(0,0,0)
		Goto Spawn

	FatalitySergeant:
		NULL A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("GoFatality", 1)
        NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
		NULL A 0 ACS_NamedExecute("BDSetInvulnerable", 0)
        //////////////////////////////////////////////////////
		3HF1 I 8
		TNT1 A 0 A_PlaySound("grunt/death")
		3HF1 I 8
		TNT1 AAAA 0 A_CustomMissile ("Guts", 30, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath2", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem("SergeantFatalizedByBaron")
		3HF1 J 8
		3HF1 KLM 8
		//////////////////////////////////////////////////////
        TNT1 A 0 A_TakeInventory("SergeantFatality",1)
		TNT1 A 0 A_GiveInventory("HasSergeantChunk", 1)
        TNT1 A 0 A_TakeInventory("GoFatality", 1)
		MARN A 0 ACS_NamedExecuteAlways("BDStopCamera", 0, 0, 0, 0)//Stop Camera
        NULL A 0 SetPlayerProperty(0,0,0)
        Goto Spawn

      FatalityDemon:
		NULL A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("GoFatality", 1)
        NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
		NULL A 0 ACS_NamedExecute("BDSetInvulnerable", 0)
        //////////////////////////////////////////////////////
		TNT1 A 0 A_PlaySound("demon/pain")
		3HF1 N 8
		TNT1 A 0 A_CustomMissile ("XDeathStomach", 60, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath2", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (0, 160))
		3HF1 OPQ 8 A_CustomMissile ("MuchBlood", 25, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("DeadDemonHalf", 1)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		//////////////////////////////////////////////////////
		TNT1 A 0 A_TakeInventory("DemonFatality",1)
        TNT1 A 0 A_TakeInventory("GoFatality", 1)
		MARN A 0 ACS_NamedExecuteAlways("BDStopCamera", 0, 0, 0, 0)//Stop Camera
        NULL A 0 SetPlayerProperty(0,0,0)
        Goto Spawn

	FatalityImp:
		NULL A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("GoFatality", 1)
        NULL A 0 ACS_NamedExecuteAlways("BDStartCamera", 0, 0, 0, 0)//Start Camera
		NULL A 0 ACS_NamedExecute("BDSetInvulnerable", 0)
        //////////////////////////////////////////////////////
		TNT1 A 0 A_PlaySound("demon/pain")
		3HF2 ABABAB 4
		TNT1 AAAAAA 0 A_SpawnItem("MuchBlood", 40)
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath2", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Guts", 42, 0, random (0, 360), 2, random (0, 160))
		3HF2 CDE 8
		3HF2 F 8
		3HF2 GHIJ 8
		TNT1 A 0 A_SpawnItem("DeadImp_BaronFatality")
		//////////////////////////////////////////////////////
        TNT1 A 0 A_TakeInventory("ImpFatality",1)
		TNT1 A 0 A_TakeInventory("ImpFatality",1)
        TNT1 A 0 A_TakeInventory("GoFatality", 1)
		MARN A 0 ACS_NamedExecuteAlways("BDStopCamera", 0, 0, 0, 0)//Stop Camera
        NULL A 0 SetPlayerProperty(0,0,0)
        Goto Spawn
		}
}

ACTOR D4BaronHUD : DoomWeapon
{
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.SelectionOrder 9999
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.NO_AUTO_SWITCH
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOAUTOAIM
	Tag "BaronPlayer"
	States
	{
	Spawn:
		SHOT A -1
		Stop

	Ready:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "ReadyBarrel")
		TNT1 A 0 A_JumpIfInventory("HasZombiemanChunk", 1, "ReadyZombieman")
		TNT1 A 0 A_JumpIfInventory("HasSergeantChunk", 1, "ReadySergeant")
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "Fire")
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "AltFire")
		HBRG A 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		HBRG B 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		HBRG C 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		HBRG D 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		HBRG C 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		HBRG B 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		NULL A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
		TNT1 A 0 A_TakeInventory("PSeq1",1)
		Loop

	Steady:
		TNT1 A 0
		TNT1 A 4
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		Goto Ready

	ReadyBarrel:
		HBRC B 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		Loop

	ReadyZombieman:
		HBRS A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("D4HoldingZombiemanChunk", 0,0,24,-8,0,0)
		Loop

	ReadySergeant:
		HBRS A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("D4HoldingSergeantChunk", 0,0,24,-8,0,0)
		Loop

	Select:
		TNT1 A 1 A_Raise
		HBRG AAAAAAAAA 0 A_Raise
		Select2:
		TNT1 A 0 A_PlaySound("baron/sight")
		HBRG DCBA 1
		Goto Ready

	Deselect:
		HBRG ABCD 1
		HBRG AAAAAAAAAAAA 0 A_Lower
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Lower
		Loop

	CeaseMorph:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("CeaseMorph", 1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDForceUnmorph")
		TNT1 A 1
		Goto Ready

	Fire://18tics
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "MissileBarrel")
		TNT1 A 0 A_JumpIfInventory("HasZombiemanChunk", 1, "FireZombieman")
		TNT1 A 0 A_JumpIfInventory("HasSergeantChunk", 1, "FireSergeant")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_JumpIfCloser(128, "MeleeAttack")
		TNT1 A 0 A_JumpIfInventory("PSeq1", 1, "FireLeft")
		HBRG ABCD 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("GreenPlasmaBallPlayerTransformed", 0,0,16,-8,0,0)
		HBRF ABCDEFGHI 1 BRIGHT A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		HBRG DCBA 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")//Dont match new idle animation now
		TNT1 A 0 A_GiveInventory("PSeq1",1)
		HBRG A 1 A_Refire
		Goto Ready

	FireLeft://18tics
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "MissileBarrel")
		TNT1 A 0 A_JumpIfInventory("HasZombiemanChunk", 1, "FireZombieman")
		TNT1 A 0 A_JumpIfInventory("HasSergeantChunk", 1, "FireSergeant")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_JumpIfCloser(128, "Melee2")
		HBRG ABCD 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("GreenPlasmaBallPlayerTransformed", 0,0,-16,-8,0,0)
		HBRL ABCDEFGHI 1 BRIGHT A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		HBRG DCBA 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_TakeInventory("PSeq1",1)
		HBRG A 1 A_Refire
		Goto Ready

	FireZombieman:
		TNT1 A 0
		HBRM ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
        TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRM EF 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")

		RIFF A 0 A_FireCustomMissile("ThrowedZombieMan2B", 0, 0, 4, -4)
		HBRM GH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 4 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_TakeInventory("HasZombiemanChunk", 1)
		HBRG CDBA 1
		Goto Ready

	FireSergeant:
		TNT1 A 0
		HBRM ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
        TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRM EF 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")

		RIFF A 0 A_FireCustomMissile("ThrowedSergeantPieceB", 0, 0, 4, -4)
		HBRM GH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 4 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_TakeInventory("HasSergeantChunk", 1)
		HBRG CDBA 1
		Goto Ready

	MeleeAttack://Right swipe
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		HBRG ABCD 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_JumpIfInventory("PSeq1", 1, "Melee2")
		TNT1 A 0 A_Recoil(-3)
		HBRM ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRM DEFGH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")

		TNT1 A 0 A_FireCustomMissile("PlayerBaronAttack", 0, 0, 0, -28)
		HBRG DCBA 2 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_GiveInventory("PSeq1",1)
		Goto Ready

	Melee2://Left swipe
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_Recoil(-3)
		HBRN ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRN DEFGH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")

		TNT1 A 0 A_FireCustomMissile("PlayerBaronAttack", 0, 0, 0, -28)
		HBRG DCBA 2 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_TakeInventory("PSeq1",1)
		HBRG A 1 A_Refire
		Goto Ready

	MissileBarrel:
		HBRM ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
        TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRM EF 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("ThrowedBarrel", 0,0,4,-4,0,0)
		TNT1 A 0 A_TakeInventory("HasExplosiveBarrel", 1)
		HBRM GH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 4 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		HBRM CDBA 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		Goto Ready

	AltFire://Right swipe
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "MissileBarrel")
		TNT1 A 0 A_JumpIfInventory("HasZombiemanChunk", 1, "FireZombieman")
		TNT1 A 0 A_JumpIfInventory("HasSergeantChunk", 1, "FireSergeant")
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "ReadyBarrel")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		HBRG ABCD 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_JumpIfInventory("PSeq1", 1, "Melee2")
		TNT1 A 0 A_Recoil(-3)

		HBRM ABC 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_PlaySound("weapons/gswing")
		HBRM DEFGH 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")

		TNT1 A 0 A_FireCustomMissile("BaronAttackOnBarrel", 0, 0, 0, -28)
		TNT1 A 0 A_FireCustomMissile("PlayerBaronAttack", 0, 0, 0, -28)
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "ReadyBarrel")
		HBRG DCBA 2 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_GiveInventory("PSeq1",1)
		HBRG A 1 A_Refire
		Goto Ready

	DoKick://35TICS
		TNT1 A 0 A_JumpIfInventory("HasExplosiveBarrel", 1, "MissileBarrel")
		TNT1 A 0 A_JumpIfInventory("HasZombiemanChunk", 1, "FireZombieman")
		TNT1 A 0 A_JumpIfInventory("HasSergeantChunk", 1, "FireSergeant")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		HBRG ABCD 1 A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_TakeInventory("Kicking",1)
		TNT1 A 0 A_PlaySound("baron/sight")
		HBRF JKLMMM 4 BRIGHT A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		HBRF N 4 BRIGHT A_JumpIfInventory("CeaseMorph", 1, "CeaseMorph")
		TNT1 A 0 A_FireCustomMissile("GreenPlasmaBallPlayerTransformed", 9,0,0,-8,0,0)
		TNT1 A 0 A_FireCustomMissile("GreenPlasmaBallPlayerTransformed", -9,0,0,-8,0,0)
		HBRF O 4 A_FireCustomMissile("GreenPlasmaBallPlayerTransformed", 0,0,0,-8,0,0)
		TNT1 A 0 A_TakeInventory("Kicking",1)
		Goto Ready
	}
}

ACTOR PlayerBaronAttack : BaronAttack
{
	+THRUSPECIES
	+MTHRUSPECIES
	Damage (random(80,80))
	Species "Marines"
}

ACTOR GreenPlasmaBallPlayerTransformed: GreenPlasmaBall
{
	Radius 10
	Height 16
	Speed 25
	FastSpeed 25
    -THRUGHOST
	+THRUSPECIES
	+MTHRUSPECIES
    Damage (random(80,80))
	Species "Marines"
}

ACTOR ThrowedZombieMan2B: ThrowedZombieMan2
{
    -NOGRAVITY
	Damage (random(20,20))
	Speed 30
	States
	{
	Spawn:
		TNT1 A 0
	Flying:
        X721 H 2
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 0)
		X721 GFEDCBA 2
		Loop
	}
}

ACTOR ThrowedSergeantPieceB: ThrowedZombieMan2B
{
	Damage (random(20,20))
	Speed 30
	Radius 6
	Height 6
	+MISSILE
	Species "Marines"
	States
	{
	Spawn:
        SP2X HIJK 5
		Loop

    Death:
	    TNT1 A 0 A_SpawnItem("MeatDeath")
		TNT1 A 0 A_CustomMissile ("XDeathSergeantHeadOnXDeath", 2, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeathArm1", 2, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 5
		Stop
	}
}

actor D4HoldingZombiemanChunk
{
    Scale 1.0
	PROJECTILE
	+MISSILE
    +CLIENTSIDEONLY
	Speed 8
    States
    {
    Spawn:
	Death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_Stop
		TNT1 A 0 A_SpawnItem("D4ZombiemanChunkBeingHold", 20, -20)
        TNT1 A 2
        stop
    }
}

actor D4ZombiemanChunkBeingHold
{
    +CLIENTSIDEONLY
	+NOBLOCKMAP
	+FORCEXYBILLBOARD
    States
    {
    Spawn:
	Death:
		TNT1 A 0
        D4BH A 1
        stop
    }
}

actor D4HoldingSergeantChunk
{
    Scale 1.0
	PROJECTILE
	+MISSILE
    +CLIENTSIDEONLY
	Speed 8
    States
    {
    Spawn:
	Death:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 A_Stop
		TNT1 A 0 A_SpawnItem("D4SergeantChunkBeingHold", 20, 5)
        TNT1 A 2
        stop
    }
}

actor D4SergeantChunkBeingHold
{
    +CLIENTSIDEONLY
	+NOBLOCKMAP
	+FORCEXYBILLBOARD
    States
    {
    Spawn:
	Death:
		TNT1 A 0
        SP2X H 1
        stop
    }
}