actor Centaurman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_6B"
dropitem "CentaurmanWepDroppedX"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Obituary "$OB_CENTAURFLASH"
Inventory.Pickupmessage "You got the Centaur Buster!"
weapon.ammotype "ClipClopAmmo"
weapon.ammotype2 "ClipClopAmmo"
States
{
Spawn:
C_06 B 1
loop

Deselect:
CENB A 0
goto DeselectSwap
Select:
CENB A 0
goto SelectSwap

Ready:
CENB A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_CENTAURMAN)
CENB A 0 A_GunFlash("Flash",1)
goto Ready1
Ready1:
CENB A 0 A_JumpIfInventory("ClipClopAmmo",18,"Ready2")
CENB A 4 A_WeaponReady(8)
CENB A 0 A_JumpIfInventory("WarpGo",1,"Ready1a")
CENB A 0 A_GiveInventory("ClipClopAmmo",1)
CENB A 0
loop
Ready1a:
CENB A 1 A_WeaponReady(8)
CENB A 0 A_JumpIfInventory("WarpGo",1,"Ready1a")
CENB A 0 A_GiveInventory("ClipClopAmmo",1)
goto Ready1
Ready2:
CENB A 4 A_WeaponReady
CENB A 0 A_JumpIfInventory("WarpGo",1,"Ready1a")
CENB A 0 A_GiveInventory("ClipClopAmmo",1)
CENB A 0
loop

Fire:
CENB A 0 A_JumpIfInventory("IsBot",1,"BotFire")
CENB A 0 A_PlaySoundEx("weapon/CentShot","Weapon")
CENB B 2 A_FireCustomMissile("CentaurShot",0,1,8,0)
CENB B 2 A_GiveInventory("ClipClopAmmo",1)
CENB C 4
CENB A 9
goto Ready1
AltFire:
CENB A 0 A_JumpIfInventory("WarpGo",1,"NoAmmo")
CENB A 0 A_GiveInventory("VivifyDelay5",1)
CENB A 0 A_Refire(1)
CENB A 5 A_GiveInventory("Centaurman_Alt_P")
CENB A 10
Goto Ready1
NoAmmo:
CENB A 0
Goto Ready1
Flash:
TNT1 A 1 A_JumpIfInventory("WarpGo",1,"Flash.CentWarp")
loop
Flash.CentWarp:
TNT1 A 0 A_GiveInventory("CentaurWarpStart_P",1)
TNT1 A 0 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
TNT1 A 0 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
TNT1 A 0 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
TNT1 A 0 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
TNT1 A 0 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
TNT1 A 0 ACS_NamedExecuteWithResult("core_invisibleplayer",0,true)
TNT1 A 1 A_GiveInventory("CBM_00_AlphaPowerGiver")
TNT1 A 1 A_GiveInventory("CentaurWarpDash_P")
TNT1 A 1 A_ChangeVelocity(Args[0]/100000.0,Args[1]/100000,Args[2]/100000,2)//A_Stop
TNT1 A 0 A_GiveInventory("CBM_BeatBoostRemoveCheck_P")//This horse isn't a pegasus
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
TNT1 A 0 ACS_NamedExecuteWithResult("core_invisibleplayer",0,false)
TNT1 A 0 A_TakeInventory("CBM_00_AlphaPower")
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 0 A_TakeInventory("WarpGo",1)
TNT1 A 0 A_PlaySoundEx("weapon/portout","SoundSlot7")
TNT1 A 1 A_TakeInventory("CBM_10_AlphaPower")
TNT1 A 0 A_TakeInventory("CBM_20_AlphaPower")
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_TakeInventory("CBM_30_AlphaPower")
TNT1 A 0 A_TakeInventory("CBM_40_AlphaPower")
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_TakeInventory("CBM_50_AlphaPower")
TNT1 A 0 A_TakeInventory("CBM_60_AlphaPower")
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_TakeInventory("CBM_70_AlphaPower")
TNT1 A 0 A_TakeInventory("CBM_80_AlphaPower")
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 0 A_GiveInventory("CentaurWarpEnd_P",1)
TNT1 A 1 A_TakeInventory("CBM_90_AlphaPower")
goto Flash

BotFire:
CENB A 0 A_JumpIfCloser(1000,2)
CENB A 0 A_JumpIfInventory("ClipClopAmmo",28,"BotFireWarp")
CENB A 0 A_JumpIfInventory("ClipClopAmmo",18,"BotFireAlt")
CENB A 0 A_JumpIfInventory("ClipClopAmmo",10,"BotFire2")
CENB A 0 A_GiveInventory("BotRetreatFlag",1)
CENB A 0 A_Jump(128,"BotFireRetreat")
BotFireWait:
CENB A 4
CENB A 0 A_GiveInventory("ClipClopAmmo",random(1,2))
CENB A 0 A_TakeInventory("BotRetreatFlag",999)
Goto Ready1
BotFire2:
TNT1 A 0 A_Jump(128,"BotFireWait")
goto Fire+1
BotFireRetreat:
CENB A 0 A_PlaySoundEx("weapon/CentShot","Weapon")
CENB A 0 A_FireCustomMissile("CentaurShot",0,0,8,0)
CENB BC 4
CENB A 9 A_GiveInventory("ClipClopAmmo",1)
CENB A 0 A_TakeInventory("BotRetreatFlag",999)
goto Ready1
BotFireAlt:
TNT1 A 0 A_JumpIfCloser(500,"AltFire")
goto Fire+1
BotFireWarp:
TNT1 A 0 A_GiveInventory("WarpGo",1)
goto Fire+1
}
}

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

actor WarpGo : OnceC{}

actor WarpItem : BasicClassItem
{
inventory.icon "CentIcon"
inventory.pickupmessage "I hope no one realizes I'm really a girl... Oh, Knight Man..."
Tag "Perform Centuar Warp"
states
{
Spawn:
CENB Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("ClipClopAmmo",14,"Use2")
fail
Use2:
TNT1 A 0 A_GiveInventory("WarpGo",1)
fail
}
}


actor Centaurman_Alt_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("ClipClopAmmo",9)
TNT1 A 0 A_TakeInventory("ClipClopAmmo",9,1)
TNT1 A 0 A_PlaySoundEx("weapon/centaurflash","Body")
TNT1 A 0 A_Blast(BF_NOIMPACTDAMAGE,255,192,20.0,"CentaurmanBlastFX")
TNT1 A 0 A_FireCustomMissile("CentaurmanFlashCC",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("CentaurmanFlash",0,0,0,0)
TNT1 A 0 A_SetBlend(white,0.525,4,white)//"00 A8 44"
stop
}
}

actor CentaurWarpStart_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/portin","SoundSlot7")
TNT1 A 0 ACS_NamedExecuteWithResult("core_cantseekplayer",0,true)
TNT1 A 0 A_TakeInventory("ClipClopAmmo",7)
TNT1 A 0 A_TakeInventory("ClipClopAmmo",7,1)
stop
}
}


actor CentaurWarpDash_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SetArg(0,momx*100000)
TNT1 A 0 A_SetArg(1,momy*100000)
TNT1 A 0 A_SetArg(2,momz*100000)
TNT1 A 0 A_JumpIfInventory("DashingStraitjacket_F",1,2)
TNT1 A 0 A_ChangeVelocity(cos(pitch)*500,0,-sin(pitch)*500,3)//A_Recoil(-500)
TNT1 A 0
stop
}
}

actor CentaurWarpEnd_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_cantseekplayer",0,false)
TNT1 A 0 A_TakeInventory("WarpGo",1)
stop
}
}


actor CentaurShot : ProjSpawnFuncActor
{
PROJECTILE
damagetype "CentaurM_Shot"
Obituary "$OB_CENTAURBUSTER"
+SKYEXPLODE
+EXPLODEONWATER
+FORCEXYBILLBOARD
+BRIGHT
Damage (160)
radius 10
height 7
Speed 35
scale 2.5
States
{
Spawn:
TNT1 A 2
Q_0D E 1
wait
XDeath:
Crash:
TNT1 A 1
stop
Death:
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,-90,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,-135,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,90,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,135,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,45,1)
TNT1 A 0 A_SpawnItemEx("CentaurShotBit",0,0,0,28,0,0,-45,1)
TNT1 A 1
stop
}
}

actor CentaurShotBit : CentaurShot
{
Damage (100)
radius 9
height 6
Speed 28
States
{
Spawn:
Q_0D E 14
stop
Death:
TNT1 A 1
stop
}
}

actor CentaurShot2 : CentaurShot
{
States
{
Death:
TNT1 A 1
stop
}
}



actor CentaurmanBlastFX : BasicGraphicEffect
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
}
}

actor CentaurmanFlash : BasicExplosion
{
Obituary "$OB_CENTAURFLASH"
damagetype "CentaurM_Flash"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("CentaurmanFlashRingFX",0,0,0,0,0,0,random(0,35),1)
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("CentaurmanFlashFX",0,0,28,22,0,random2(256/12),random(0,359),1)
TNT1 A 2 A_Explode(100,512,0,0,48)
stop
}
}

actor CentaurmanFlashCC : BasicExplosion
{
damagetype "CentaurM_Shock"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(20,256,0,0,256)
stop
}
}

actor CentaurmanFlashRingFX : BasicGraphicEffect
{
Args 9
States
{
Spawn:
TNT1 A 0
SpawnL:
TNT1 A 0 A_SpawnItemEx("CentaurmanFlashFX",32,0,0,10,0,frandom(-1,1),Args[0]*36,1)
TNT1 A 0 A_CountdownArg(0)
loop
Death:
TNT1 A 1
stop
}
}

actor CentaurmanFlashFX : BasicGraphicEffect
{
var int user_TranslateWhiteColors;
+FORCEXYBILLBOARD
+BRIGHT
Speed 80
States
{
SpawnFrame:
CFL5 ABCD 3
stop
}
}

actor CentaurmanWepDroppedX : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
TNT1 A 1 A_SpawnItemEx("CentaurFlashWep",0,0,0,momx,momy,momz,0,8)
stop
TNT1 A 1 A_SpawnItemEx("CentaurArrowWep",0,0,0,momx,momy,momz,0,8)
stop
}
}

actor Centaurman_W_NormalBar : NormalBar {Args 4,117}