actor CentaurFlashBoss : Weapon
{
Weapon.AmmoGive 28
Weapon.SlotNumber 1
scale 2.0
Obituary "%o was distorted by %k's Centaur Flash."
Inventory.Pickupmessage "You got the Centaur Buster!"
weapon.ammotype "CentaurAmmo"
weapon.ammotype2 "CentaurAmmo"
weapon.ammouse 1
Weapon.AmmoUse2 1
+WEAPON.DONTBOB
States
{
Spawn:
TNT1 A 0
stop
Ready:
CENB A 0 ACS_ExecuteAlways(998,0,51)
CENB A 0 A_GunFlash
CENB A 0 A_JumpIfInventory("CentaurAmmo",20,"Ready2")
CENB A 10 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
CENB A 0 A_GiveInventory("CentaurAmmo",1)
Goto Ready+2
Ready2:
CENB A 0 A_JumpIfInventory("CentaurAmmo",28,"ReadyFull")
CENB A 10 A_WeaponReady(WRF_NOSWITCH)
CENB A 0 A_GiveInventory("CentaurAmmo",1)
Goto Ready+2
ReadyFull:
CENB A 1 A_WeaponReady(WRF_NOSWITCH)
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:
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
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_FireCustomMissile("CentaurFlashC",0,0,8,0)
CENB A 0 A_GiveInventory("Repulsion",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("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/portout","Weapon")
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/portin","Weapon")
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 1 A_SetTranslucent (1.0, 0)
TNT1 A 0 A_TakeInventory("WarpGo",1)
goto Flash
NoFlash:
TNT1 A 0
stop
}
}

actor CentaurAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
states
{
Spawn:
PLAY A -1
stop
}
}


actor WarpGo : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor CFlashUse : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor CentaurShot
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
+DONTBLAST
damagetype "Centaur"
Obituary "%o was split apart by %k's Centaur Buster."
Speed 35
Damage (20)
radius 5
height 5
scale 2.5
States
{
Spawn:
TNT1 A 2
CBUL A 1
goto spawn+1
XDeath:
Crash:
TNT1 A 0
stop
Death:
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,0)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,180)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-90)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-135)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,90)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,135)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,45)
TNT1 A 0 A_SpawnItemEx("CentaurShot2",0,0,0,28,0,0,-45)
TNT1 A 1
stop
}
}

actor CentaurShot2
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
+DONTBLAST
damagetype "Buster"
Obituary "%o was split apart by %k's Centaur Buster."
Speed 27
Damage (10)
radius 5
height 5
scale 2.5
States
{
Spawn:
TNT1 A 2
CBUL A 1
goto spawn+1
Death:
CBUL A 1
stop
}
}

actor CentaurFlashC : CentaurFlash
{
damagetype "NeutralShock"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(10,512,0)
stop
}
}


actor WarpItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "CentIcon"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
ALIE A 1
stop
Use:
TNT1 A 0 A_JumpIfInventory("CentaurAmmo",28,"Use2")
fail
Use2:
TNT1 A 0 A_GiveInventory("WarpGo",1)
fail
}
}