actor CentaurFlashBoss : BaseMM8BDMWep_CBM
{
dropitem "CentaurmanDropX"
Weapon.AmmoUse 1
Weapon.AmmoUse2 1
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_CENTAURFLASH"
Inventory.Pickupmessage "You got the Centaur Buster!"
weapon.ammotype "CentaurAmmo"
weapon.ammotype2 "CentaurAmmo"

States
{
Spawn:
C_06 B 1
loop
Ready:
CENB A 0 ACS_ExecuteAlways(998,0,821)
CENB A 0 A_GunFlash
CENB A 0 A_JumpIfInventory("CentaurAmmo",20,"Ready2")
CENB A 5 A_WeaponReady(WRF_NOSECONDARY)
CENB A 0 A_GiveInventory("CentaurAmmo",1)
Goto Ready+2
Ready2:
CENB A 0 A_JumpIfInventory("CentaurAmmo",28,"ReadyFull")
CENB A 5 A_WeaponReady
CENB A 0 A_GiveInventory("CentaurAmmo",1)
Goto Ready+2
ReadyFull:
CENB A 1 A_WeaponReady
Goto Ready+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
CENB A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
CENB A 1 A_Raise
Loop
Fire:
TNT1 A 0 A_JumpIfInventory("IsBot",1,"BotFire")
CENB A 0 A_TakeInventory("CFlashUse",1)
//CENB A 0 A_JumpIfNoAmmo("NoAmmo")
CENB A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
CENB A 0 A_GiveInventory("CentaurAmmo",1)
CENB A 0 A_GiveInventory("CentaurmanMain_CI",1)
CENB BC 4
CENB A 8
CENB A 0 A_Refire
goto Ready+2
AltFire:
CENB A 0 A_JumpIfInventory("WarpGo",1,"NoAmmo")
CENB A 0 A_JumpIfInventory("CentaurAmmo",20,"CFlash")
goto Ready+2
CFlash:
CENB A 0 A_TakeInventory("CentaurAmmo",18)
CENB A 0 A_GiveInventory("CFlashUse",1)
CENB A 0 A_PlaySoundEx("weapon/centaurflash","Weapon")
CENB A 0 A_GiveInventory("Repulsion",1)
CENB A 0 A_GiveInventory("CentaurmanAlt_CI",1)
CENB A 15 ACS_ExecuteAlways(976,0)
CENB A 0 A_Refire
Goto Ready+2
NoAmmo:
CENB A 0
//CENB A 1
Goto Ready+2
Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("WarpGo",1,"Warp")
TNT1 A 1
loop
Warp:
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",28,"Warp2")
TNT1 A 0 A_TakeInventory("WarpGo",1)
goto Flash
Warp2:
TNT1 A 0 A_TakeInventory("CentaurAmmo",10)
TNT1 A 0 A_PlaySoundEx("weapon/portin","SoundSlot6")
TNT1 A 0 A_ChangeFlag("CANTSEEK",1)
TNT1 A 1 A_SetTranslucent(0.9,0)
TNT1 A 1 A_SetTranslucent(0.8,0)
TNT1 A 1 A_SetTranslucent(0.7,0)
TNT1 A 1 A_SetTranslucent(0.6,0)
TNT1 A 1 A_SetTranslucent(0.5,0)
TNT1 A 1 A_SetTranslucent(0.4,0)
TNT1 A 1 A_SetTranslucent(0.3,0)
TNT1 A 1 A_SetTranslucent(0.2,0)
TNT1 A 1 A_SetTranslucent(0.1,0)
TNT1 A 1 A_SetTranslucent(0.0,0)
TNT1 A 0 A_Stop
//TNT1 A 0 A_ChangeFlag("FLOORHUGGER", 1)
TNT1 A 1 A_Recoil(-450)
TNT1 A 1 A_Stop
//TNT1 A 0 A_ChangeFlag("FLOORHUGGER", 0)
TNT1 A 1 A_SetTranslucent(0.1,0)
TNT1 A 0 A_PlaySoundEx("weapon/portout","SoundSlot6")
TNT1 A 1 A_SetTranslucent(0.2,0)
TNT1 A 1 A_SetTranslucent(0.3,0)
TNT1 A 1 A_SetTranslucent(0.4,0)
TNT1 A 1 A_SetTranslucent(0.5,0)
TNT1 A 1 A_SetTranslucent(0.6,0)
TNT1 A 1 A_SetTranslucent(0.7,0)
TNT1 A 1 A_SetTranslucent(0.8,0)
TNT1 A 1 A_SetTranslucent(0.9,0)
TNT1 A 0 A_ChangeFlag("CANTSEEK",0)
TNT1 A 1 A_SetTranslucent(1.0,0)
TNT1 A 0 A_TakeInventory("WarpGo",1)
goto Flash
NoFlash:
TNT1 A 0
stop


BotFire:
TNT1 A 0 A_JumpIfCloser(1000, 2)
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",28,"WarpUse")
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",20,"AltCheck")
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",12,"Approach")
TNT1 A 0 A_GiveInventory("BotRetreatFlag",1)
TNT1 A 0 A_Jump(128, "RetreatFire")
WaitForAmmo:
CENB A 10
CENB A 0 A_GiveInventory("CentaurAmmo",2)
TNT1 A 0 A_TakeInventory("BotRetreatFlag",999)
Goto Ready+2
RetreatFire:
CENB A 0 A_TakeInventory("CFlashUse",1)
//CENB A 0 A_JumpIfNoAmmo("NoAmmo")
CENB A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
CENB A 0 A_FireCustomMissile("CentaurShot",0,0,8,0)
CENB BC 7
CENB A 5
TNT1 A 0 A_TakeInventory("BotRetreatFlag",999)
CENB A 0 A_Refire
goto Ready+2
Approach:
TNT1 A 0 A_Jump(128, "WaitForAmmo")
goto Fire+1
AltCheck:
TNT1 A 0 A_JumpIfCloser(500, "CFlash")
goto Fire+1
WarpUse:
TNT1 A 0 A_GiveInventory("WarpGo",1)
goto Fire+1
}
}

actor CentaurAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor WarpGo : OnceC{}

actor CFlashUse : OnceC{}

actor CentaurShot
{
Translation "204:204=210:210"
PROJECTILE
+SKYEXPLODE
damagetype "Buster"
Obituary "$OB_CENTAURBUSTER"
Speed 35
Damage (16)
radius 7
height 7
scale 2.5
States
{
Spawn:
TNT1 A 2
CBUL E 1
goto spawn+1
XDeath:
Crash:
TNT1 A 0
stop
Death:
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-90,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-135,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,90,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,135,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,45,1)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-45,1)
TNT1 A 1
stop
}
}

actor CentaurShotB : CentaurShot{translation "204:204=205:205"}
actor CentaurShotR : CentaurShot{translation "204:204=171:171"}
actor CentaurShotO : CentaurShot{translation "204:204=104:104"}
actor CentaurShotP : CentaurShot{translation "204:204=229:229"}

actor CentaurShot2 : CentaurShot
{
Speed 28
Damage (10)
radius 6
height 6
States
{
Spawn:
CBUL E 14
stop
Death:
TNT1 A 1
stop
}
}

actor CentaurFlashC : BasicExplosion
{
Translation "192:192=4:4"
Obituary "$OB_CENTAURFLASH"
damagetype "CentaurShock"
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("CentaurFlashCFX",0,0,28,22,0,random2(256/12),random(0,359),1)
TNT1 A 1 A_Explode(10,512,0,0,32)
stop
}
}

actor CentaurFlashCB : CentaurFlashC{translation "192:192=205:205"}
actor CentaurFlashCR : CentaurFlashC{translation "192:192=171:171"}
actor CentaurFlashCO : CentaurFlashC{translation "192:192=104:104"}
actor CentaurFlashCP : CentaurFlashC{translation "192:192=229:229"}

actor CentaurFlashCFX : BasicClientSide
{
+FORCEXYBILLBOARD
States
{
Spawn:
TNT1 A 0
CBUL ABCD 3
stop
}
}

actor WarpItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "CentIcon"
scale 2.0
inventory.pickupmessage "I hope no one realizes I'm really a girl... Oh, Knight Man..."
+INVBAR
states
{
Spawn:
CENI A 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",28,"Use2")
fail
Use2:
TNT1 A 0 A_GiveInventory("WarpGo",1)
fail
}
}

actor CentaurmanDropX : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
TNT1 A 1 A_SpawnItemEx("CentaurFlashWepCDropped")
stop
TNT1 A 1 A_SpawnItemEx("CentaurArrowWepCDropped")
stop
}
}

actor CentaurmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("CentaurShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("CentaurShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("CentaurShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("CentaurShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("CentaurShotP",0,0,8,0)
goto Done
}
}

actor CentaurmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("CentaurFlashC",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("CentaurFlashCB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("CentaurFlashCR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("CentaurFlashCO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("CentaurFlashCP",0,0,0,0)
goto Done
}
}
