ACTOR CentaurPlayer : PlayerPawn
{
  Health 20000
	Radius 32
	Height 88
	Mass 12000
  Player.forwardmove 0.76
  Player.MaxHealth 20000
  Player.sidemove 0.76
  Player.ViewHeight 72
  MaxStepHeight 36
  Player.JumpZ 6
  Player.DisplayName "Centaur"
  Player.MorphWeapon "CentaurWeapon0"
  Player.SoundClass "Centaur"
  Player.StartItem "Mana", 100
  DamageFactor "Boss", 0
  Bloodtype "CentaurBlood"
  limitedtoteam 1
  Scale 1.35
  Species "Boss"
	PainSound "Centaur/Pain"
    DEATHSOUND "Centaur/Die"
	+NOSKIN
	+DONTTRANSLATE
	+THRUSPECIES
  -PICKUP
  states
{
	Spawn:
		CENT AB 10
		Loop
	See:
	    TNT1 A 0 A_JumpIfInventory("UsingShield", 1, "Shield")
		TNT1 A 0 A_JumpIfInventory("CentActCount", 64, "MakeNoise")
		CENT AB 5
		TNT1 A 0 A_GiveInventory("CentActCount", 2)
		CENT CD 5
		TNT1 A 0 A_GiveInventory("CentActCount", 2)
		Loop
	HardPain:
		CENT G 13
	Goto Spawn
	MakeNoise:
		TNT1 A 0 A_TakeInventory("CentActCount", 999)
		TNT1 A 0 A_PlaySoundEx("Centaur/Act", 6)
		CENT A 1
	Goto See
	  Missile:
		CENT A 2
		Goto Spawn
	  Melee:
		TNT1 A 0 A_GiveInventory("CentActCount", 6)
		TNT1 A 0 A_JumpIfInventory("UsingShield", 1, "Shield")
		TNT1 A 0 A_JumpIfInventory("UsingBlast", 1, "Blast")
		TNT1 A 0 A_JumpIfInventory("UsingMelee", 1, "XMelee")
		CENT A 1
		Goto Spawn
	  Shield:
		CENT E 25
		Goto Spawn
	  Blast:
	    CENT F 15 Bright
		CENT E 15
	    Goto Spawn
	  XMelee:
		CENT H 6
		CENT IJ 5
		Goto Spawn
	  GCDefender:
	    CENT EEEEEEE 1 A_JumpIf(Health<=0,"Death")
		Goto Spawn
	  Death:
		TNT1 A 0 A_Scream
	    TNT1 A 0 a_givetotarget("BOSSKILLEDSTAT", 1)
		TNT1 A 0 A_GiveToTarget("reward", 1)
		SUMO A 1 
		TNT1 A 0 A_SpawnItem("CentaurDeath")
	    BLAN A -1
	  Stop
	}
}

ACTOR CentaurWeapon : Weapon 
{
 Weapon.SelectionOrder 800
 obituary "%o did stuff"
 Inventory.PickupMessage ""
 Inventory.PickupSound "misc/pk_up"
 Weapon.AmmoUse 0
 Weapon.AmmoGive 0
 Weapon.AmmoType "Mana"
 +WEAPON.NOAUTOAIM
 +INVENTORY.UNDROPPABLE
 +THRUGHOST
  States
 {
  Spawn:
       TNT1 A -1
       Loop
  Ready:
	   TNT1 A 0 A_TakeInventory("UsingBlast", 1)
	   TNT1 A 0 A_TakeInventory("UsingShield", 1)
	   TNT1 A 0 A_TakeInventory("UsingMelee", 1)
	   CLA3 A 1 A_WeaponReady(WRF_ALLOWRELOAD)
       goto ready
  Deselect:
       CLA3 A 1 A_Lower
       Loop
  Select:
       CLA3 A 0 A_Raise
       Loop
  Fire:
       TNT1 A 0 A_jumpIfinventory("CentMode1", 1, "BlastCheck")
       TNT1 A 0 A_jumpIfinventory("CentMode2", 1, "ShieldCheck")
	   TNT1 A 0 A_jumpIfinventory("CentMode3", 1, "NascarCheck")
       TNT1 A 0 A_jumpIfinventory("CentMode4", 1, "Melee")
	   CLA3 A 1
	   Goto ready
  AltFire:
  	   CLA3 A 1 ACS_execute(812, 0) //812
       CLA3 A 2
       CLA3 A 12
       goto ready
  Blast:
	   TNT1 A 0 A_GiveInventory("UsingBlast", 1)
	   TNT1 A 0 A_GunFlash
       TNT1 A 0 A_Takeinventory("mana", 25)
	   CLA3 BBBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 24)
	   TNT1 A 0 A_PlayWeaponSound("Centaur/Blast")
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_1", 2, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_1", 4, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_1", -2, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_1", -4, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_1", 0, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_N1", 0, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_N2", 0, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_S1", 0, 0, 0, 24)
	   TNT1 A 0 A_FireCustomMissile("CentaurBlast_S2", 0, 0, 0, 24)
	   CLA3 BBBBBBBBBBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 24) // 11
	   CLA3 A 18
  goto ready
  Shield:
       TNT1 A 0 A_GiveInventory("UsingShield", 1)
	   TNT1 A 0 A_GunFlash
       TNT1 A 0 A_Takeinventory("mana", 40)
	   CLA3 BBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 24)
	   TNT1 A 0 A_PlayWeaponSound("Centaur/FireShoot")
	   TNT1 A 0 A_SpawnItem("CentaurFireTrailSpawner")
	   TNT1 A 0 A_FireCustomMissile("CentaurExplosion")
	   CLA3 BBBBBBBBBBBBBBBBBBBBBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 48)
	   CLA3 A 16
  Goto Ready
  Nascar:	
	   TNT1 A 0 A_TakeInventory("mana", 60)
	   TNT1 A 0 A_GiveInventory("CentaurSpeedTrail", 1)
	   TNT1 A 0 A_Recoil(-16)
	   CLA3 BBB 1 Bright A_CustomPunch(75 , 1 , 0, "BulletPuffCent", 96)
	   TNT1 A 0 A_Recoil(-16)
	   CLA3 BBB 1 Bright A_CustomPunch(75 , 1 , 0, "BulletPuffCent", 96)
	   TNT1 A 0 A_Recoil(-16)
	   CLA3 BBB 1 Bright A_CustomPunch(75 , 1 , 0, "BulletPuffCent", 96)
	   TNT1 A 0 A_Recoil(-16)
	   CLA3 BBB 1 Bright A_CustomPunch(75 , 1 , 0, "BulletPuffCent", 96)
       Goto Ready
  Melee:
	   TNT1 A 0 A_GiveInventory("UsingMelee", 1)
	   TNT1 A 0 A_GunFlash
	   TNT1 A 0 A_PlayWeaponSound("Centaur/Melee")
	   TNT1 A 0 A_CustomPunch(350 , 1 , 0, "BulletPuffCent", 108)
	   CLA3 BBBBBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 24)
	   CLA3 B 6 Bright A_CustomPunch(350 , 1 , 0, "BulletPuffCent", 108)
	   CLA3 B 6 Bright A_CustomPunch(350 , 1 , 0, "BulletPuffCent", 108)
  Goto Ready
  Reload:
	   TNT1 A 0 ACS_NamedExecuteAlways("True Sprite",0,GC_Defender)
       CLA3 BBBBBB 1 Bright A_SpawnItemEx("CentaurProtector", 64, 0, 24)
	   CLA3 A 0 A_Refire
	   Goto Ready
  BlastCheck:
       TNT1 A 0 A_jumpIfinventory("mana", 25, "Blast")
  goto ready
  ShieldCheck:
       TNT1 A 0 A_jumpIfinventory("mana", 40, "Shield")  
  goto ready
  NascarCheck:
	   TNT1 A 0 A_JumpIfInventory("ToroCooldown", 1, "Nope")
       TNT1 A 0 A_jumpIfinventory("mana", 60, "Nascar")  
  goto ready
  Nope:
	   CLA3 A 1
  Goto Ready
  Flash:
       SNIF F 35 Bright
       Goto LightDone     
       }
}

ACTOR CentaurSpeedTrail : PowerSpeed 
{
  Powerup.Duration 170
  inventory.maxamount 1
  powerup.color "00 00 00", 0.0
  Speed 1.5
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
}