actor HornetChaserBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_9F"
dropitem "HornetChaserWepCDropped"
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Obituary "$OB_HORNETCHASER"
Inventory.Pickupmessage "NOT THE BEES"
weapon.ammotype "NotTheHornetsAmmo"
weapon.ammotype2 "HornetHoverAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_09 F 1
loop
Ready:
HORH A 0 ACS_ExecuteAlways(998,0,DYE_HORNETMAN)
HORH A 0 A_GunFlash
Goto Ready1
Ready1:
HORH A 0 A_JumpIfInventory("NotTheHornetsAmmo",6,"Ready2")
HORH A 8 A_WeaponReady(WRF_NOPRIMARY)
HORH A 0 A_GiveInventory("NotTheHornetsAmmo",1)
loop
Ready2:
HORH A 8 A_WeaponReady
HORH A 0 A_GiveInventory("NotTheHornetsAmmo",1)
loop

Deselect:
HORH AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
HORH A 1 A_Lower
Loop
Select:
HORH AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
HORH A 1 A_Raise
Loop

Fire:
HORH A 3 Offset(24,52)A_GiveInventory("HornetFireFlag",1)
HORH A 3 Offset(46,75)
HORH A 0 A_PlaySoundEx("weapon/hornetchaser","Weapon")
HORH A 0 A_GiveInventory("HornetmanMain1_CI",1)
HORH A 3 Offset(46,75)
HORH A 0 A_GiveInventory("HornetmanMain2_CI",1)
HORH A 3 Offset(46,75)
HORH A 0 A_GiveInventory("HornetmanMain3_CI",1)
HORH A 6 Offset(46,75)
goto Fire2

Fire1:
HORH A 1 Offset(46,75)A_GiveInventory("NotTheHornetsAmmoGive_RC",1)
HORH A 0 A_Refire("Fire2")
goto FireEnd
Fire2:
HORH A 1 Offset(46,75)A_RailWait
HORH A 0 A_Refire("Fire3")
goto FireEnd
Fire3:
HORH A 1 Offset(46,75)A_RailWait
HORH A 0 A_Refire("Fire4")
goto FireEnd
Fire4:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire5")goto FireEnd
Fire5:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire6")goto FireEnd
Fire6:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire7")goto FireEnd
Fire7:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire8")goto FireEnd
Fire8:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire9")goto FireEnd
Fire9:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire10")goto FireEnd
Fire10:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire11")goto FireEnd
Fire11:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire12")goto FireEnd
Fire12:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire13")goto FireEnd
Fire13:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire14")goto FireEnd
Fire14:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire15")goto FireEnd
Fire15:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire16")goto FireEnd
Fire16:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire17")goto FireEnd
Fire17:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire18")goto FireEnd
Fire18:HORH A 1 Offset(46,75)A_RailWait HORH A 0 A_Refire("Fire1")goto FireEnd


FireEnd:
HORH A 3 Offset(46,75)A_GiveInventory("BeeFlag1",1)
HORH A 3 Offset(24,52)
HORH A 0 A_TakeInventory("BeeFlag1",999)
Goto Ready1
AltFire:
HORH A 0 A_JumpIfInventory("HornetFireFlag",1,"AltfireBee")
HORH A 0 A_PlaySoundEx("item/ItemUseAA","Weapon")
HORH A 0 A_GiveInventory("HornetmanAlt_CI",1)
HORH B 4 Offset(24,52)
HORH BB 4 Offset(46,75)
HORH A 4 Offset(24,52)A_GiveInventory("NotTheHornetsAmmo",1)
HORH A 4 A_WeaponReady(14)
HORH A 6
HORH A 4 A_GiveInventory("NotTheHornetsAmmo",1)
Goto Ready1
AltfireBee:
HORH A 0 A_GiveInventory("BeeFlag2",1)
HORH A 2 Offset(24,52)
HORH C 2 Offset(24,52)A_PlaySoundEx("weapon/hornetcommand","Weapon")
HORH C 2 Offset(22,50)
HORH C 2 Offset(24,52)
HORH C 2 Offset(22,50)
HORH C 2 Offset(24,52)
HORH C 2 Offset(22,50)
HORH C 2 Offset(24,52)
HORH A 2 A_WeaponReady(14)
HORH A 2 A_TakeInventory("HornetFireFlag",99)
HORH A 0 A_TakeInventory("BeeFlag2",999)
Goto Ready1

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("HornetmanFlashState_P",1)
loop
}
}

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

actor HornetHoverAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 336
+INVENTORY.IGNORESKILL
}

actor HornetFireFlag :OnceC{}

actor BeeFlag1 :OnceC{}
actor BeeFlag2 :OnceC{}

actor HornetHoverFlag :OnceC{}
actor HornetWasThrusted : OnceC {}

actor HornetIsHovering : Powerup
{
Powerup.Duration 9
}

actor HornetHoverSoundDelay : Powerup
{
Powerup.Duration 11
}

actor HornetHoverItem : BasicClassItem
{
inventory.pickupmessage "AGH, I'M FULL OF BEES!"
inventory.icon "HornIcon"
Tag "Hornet Hover Toggle"
states
{
Spawn:
HORH I 1
loop
Use:
TNT1 A 0 A_PlaySoundEx("item/ItemUseMM9","SoundSlot7")
TNT1 A 0 A_JumpIfInventory("HornetHoverFlag",1,"Take")
TNT1 A 0 A_GiveInventory("HornetHoverFlag",1)
fail
Take:
TNT1 A 0 A_TakeInventory("HornetHoverFlag",999)
fail
}
}

actor NotTheHornetsAmmoGive_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("NotTheHornetsAmmo",1)
stop
PickupR:
TNT1 A 0 A_GiveInventory("NotTheHornetsAmmo",2)
stop
}
}

actor HornetmanFlashState_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("HornetWasThrusted",1,"PickupAir")
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,"GiveAmmo")
TNT1 A 0 A_JumpIfInventory("HornetHoverAmmo",1,"HoverCheck")
goto GiveAmmo
HoverCheck:
TNT1 A 0 A_JumpIfInventory("HornetHoverFlag",1,"HoverCheckFalling")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"HoverCheckFalling")
goto GiveAmmo
HoverCheckFalling:
TNT1 A 0 A_JumpIf(momz<0,"Hover")
goto GiveAmmo

GiveAmmo:
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"GiveAmmoR")
TNT1 A 0 A_GiveInventory("HornetHoverAmmo",2)
goto ResetSpeed
GiveAmmoR:
TNT1 A 0 A_GiveInventory("HornetHoverAmmo",4)
goto ResetSpeed

ResetSpeed:
TNT1 A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,1,1)
stop

Hover:
TNT1 A 0 A_GiveInventory("HornetIsHovering",1)
TNT1 A 0 A_GiveInventory("HornetWasThrusted",1)
TNT1 A 0 A_TakeInventory("HornetHoverAmmo",1,1)
TNT1 A 0 ThrustThingZ(0,3,1,0)

TNT1 A 0 A_JumpIfInventory("HornetHoverSoundDelay",1,3)
TNT1 A 0 A_PlaySoundEx("weapon/hornetfly","Body")
TNT1 A 0 A_GiveInventory("HornetHoverSoundDelay",1)
TNT1 A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,185,100)
stop

FoundGround:
TNT1 A 0 A_TakeInventory("HornetWasThrusted",1)
goto Pickup+2

PickupAir:
TNT1 A 0 A_JumpIf(z-floorz<=0,"FoundGround")
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,"TakeHover")
TNT1 A 0 A_JumpIfInventory("HornetHoverAmmo",1,"HoverCheck2")
goto TakeHover
HoverCheck2:
TNT1 A 0 A_JumpIfInventory("HornetHoverFlag",1,"HoverCheckFalling2")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"HoverCheckFalling2")
goto TakeHover
HoverCheckFalling2:
TNT1 A 0 A_JumpIf(momz<0,"Hover")
goto TakeHover

TakeHover:
TNT1 A 0 A_TakeInventory("HornetIsHovering",1)
goto ResetSpeed
}
}

actor HornetChaserB
{
Translation "198:198=248:248", "202:202=215:215"
var int user_H;
species "BeeStuff"
PROJECTILE
damagetype "HornetM_Shot"
Obituary "$OB_HORNETCHASER"
+DONTSEEKINVISIBLE//
+SEEKERMISSILE
+THRUSPECIES
//+SCREENSEEKER
+DONTREFLECT
reactiontime 10
damage (90-user_H)
Radius 16
Height 16
speed 20//25
scale 2.5
States
{
Spawn:
HORH S 0
HORH S 0 A_JumpIfInTargetInventory("PowerRage_ST",1,3)
HORH STST 1
HORH S 0 A_Stop
HORH S 0 A_GiveInventory("ReSyncPickup",1)
Check:
HORH S 0 A_GiveToTarget("CBM_TargetMarker",1)
HORH S 0 ACS_ExecuteAlways(989,0,ACS_ExecuteWithResult(257)+100)
HORH ST 1 A_JumpIfInTargetInventory("BeeFlag1",1,"Cont")
HORH S 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Cont:

HORH S 0 ACS_ExecuteAlways(989,0,ACS_ExecuteWithResult(257)+100)
HORH S 0 ACS_ExecuteAlways(259,0,1)
HORH S 1 A_ChangeVelocity(Cos(pitch)*25,0,-sin(pitch)*25,CVF_RELATIVE)
HORH S 0 A_GiveInventory("ReSyncPickup",1)
Spawn3:

HORH TS 1 A_JumpIfInTargetInventory("BeeFlag2",1,"Home")
loop
Home:
HORH Q 0 A_RearrangePointers(0,0,1)
HORH Q 0 A_GiveInventory("ReSyncPickup",1)
HORH QRST 1 A_Stop
HORH Q 0 A_GiveInventory("ReSyncPickup",1)
HORH QRST 1 A_Stop
HORH QQQQQ 0 A_SeekerMissile(2,10,3,128,8)
HORH Q 1
HORH Q 0 A_JumpIfInventory("IsInGame",1,"Spawn3",AAPTR_TRACER)
HORH Q 0 A_ChangeVelocity(Cos(pitch)*9, 0, -sin(pitch)*9,CVF_RELATIVE)
HORH Q 0 A_GiveInventory("ReSyncPickup",1)
HORH Q 0
goto Spawn2
Spawn2:
HORH QR 1
loop
Spawn3:
HORH Q 0 A_SetUserVar("user_H",20)
HORH QRQRQRQRQRQRQRQRQR 1 A_SeekerMissile(3,15,SMF_PRECISE)
//   QRQRQRQRQRQRQRQRQRQRQR 1 A_SeekerMissile(3,15,SMF_PRECISE)
HORH Q 0
goto Spawn2
Death:
UMFX IJK 1
XMFX D 1
stop
}
}

actor HornetChaserBB : HornetChaserB{translation "202:202=205:205", "198:198=74:74"}
actor HornetChaserBR : HornetChaserB{translation "202:202=171:171", "198:198=41:41"}
actor HornetChaserBO : HornetChaserB{translation "202:202=104:104", "198:198=128:128"}
actor HornetChaserBP : HornetChaserB{translation "202:202=229:229", "198:198=232:232"}

actor HornetNectarHive
{
species "BeeStuff"
Translation "199:199=248:248", "202:202=215:215"
PROJECTILE
damagetype "HornetM_Slow"
Obituary "$OB_HORNETHONEY"
-NOGRAVITY
Damage (50)
Radius 12
Height 10
speed 25
Scale 2.5
States
{
Spawn:
HORH K 0
HORH K 0 ThrustThingZ(0,12,0,1)
HORH K 1
wait
Death:
TNT1 A 0 A_JumpIf(ceilingz-z<=10, "Ceiling")
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,8,random(6,12),0,random(4,10),random(10,80),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,8,random(6,12),0,random(4,10),random(100,170),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,8,random(6,12),0,random(4,10),random(190,260),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,8,random(6,12),0,random(4,10),random(280,350),1)
Goto RealDeath
Ceiling:
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,-8,random(6,12),0,random(-1,-7),random(10,80),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,-8,random(6,12),0,random(-1,-7),random(100,170),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,-8,random(6,12),0,random(-1,-7),random(190,260),1)
TNT1 A 0 A_SpawnItemEx("NectarTrapShot",0,0,-8,random(6,12),0,random(-1,-7),random(280,350),1)
Goto RealDeath
RealDeath:
XDeath:
TNT1 A 0 A_Stop
TNT1 A 0 A_PlaySoundEx("weapon/hornetcomb","Weapon")
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 A_SetDamageType("HornetM_Shot")
TNT1 A 0 A_Explode(100,80,0,0,16)
TNT1 A 0 A_SpawnItemEx("HornetNectarHiveFX1",0,-3,10,0,-5,6,0,1)
TNT1 A 0 A_SpawnItemEx("HornetNectarHiveFX2",0,3,10,0,5,6,0,1)
TNT1 A 0 A_SpawnItemEx("HornetNectarHiveFX1",0,3,4,0,5,-6,0,1)
TNT1 A 0 A_SpawnItemEx("HornetNectarHiveFX2",0,-3,4,0,-5,-6,0,1)
TNT1 A 0 A_SetScale(2.75)
HORH L 2
HORH MN 3
stop
}
}

actor HornetNectarHiveB : HornetNectarHive{translation "202:202=205:205", "199:199=74:74"}
actor HornetNectarHiveR : HornetNectarHive{translation "202:202=171:171", "199:199=41:41"}
actor HornetNectarHiveO : HornetNectarHive{translation "202:202=104:104", "199:199=128:128"}
actor HornetNectarHiveP : HornetNectarHive{translation "202:202=229:229", "199:199=232:232"}

actor HornetNectarHiveFX1
{
+MISSILE
+DONTBLAST
+THRUACTORS
+DONTSPLASH
+CLIENTSIDEONLY
ReactionTime 1
Radius 2
Height 2
Scale 2.5
States
{
Spawn:
HORH O 18
HORH O 1 A_CountDown
wait
}
}
actor HornetNectarHiveFX2 : HornetNectarHiveFX1
{
States
{
Spawn:
HORH P 18
HORH P 1 A_CountDown
wait
}
}


actor NectarTrapShot
{
species "BeeStuff"
Translation "199:199=248:248", "202:202=215:215"
PROJECTILE
damagetype "HornetM_Slow"
Obituary "$OB_HORNETHONEY"
-NOGRAVITY
Damage (50)
Radius 12
Height 10
speed 25
Scale 2.0
States
{
Spawn:
Y_1H U 0
Y_1H U 0 ThrustThingZ(0,1,0,1)
Y_1H U 1
loop
Crash:
XDeath:
Y_1H U 1
stop
Death:
Y_1H U 0 
Y_1H U 0 A_JumpIf(z-floorz<=0,"Death2")
Y_1H U 1 A_GiveInventory("CutterFlag",1)
Y_1H U 0 A_JumpIfInventory("CutterFlag",175,"Xdeath")
loop
Death2:
Y_1H U 1 A_SpawnItemEx("NectarTrapBlob",0,0,0,0,0,0,0,1)
stop
}
}

Actor NectarTrapBlob
{
species "BeeStuff"
damagetype "HornetM_Slow"
Obituary "$OB_HORNETHONEY"
+MISSILE
+DONTSPLASH
+NOEXPLODEFLOOR
reactiontime 100
Damage (50)
Radius 12
Height 10
scale 2.5
states
{
Spawn:
Y_1H W 0
Y_1H W 1
Y_1H W 1 A_Stop
goto SpawnW
SpawnW:
Y_1H V 1
Y_1H V 0 A_JumpIf(abs(z*100000-floorz*100000)>50,"NewShot")
Y_1H V 0 A_CountDown
loop
NewShot:
//Y_1H V 0 A_CheckFlag("BLASTED","NewShotX")
Y_1H V 0 A_SpawnItemEx("NectarTrapBlob",0,0,0,momx,momy,momz,0,8)
Goto Death
Death:
TNT1 A 0
stop
}
}


actor HornetmanMain1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("HornetChaserB",24,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("HornetChaserBB",24,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("HornetChaserBR",24,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("HornetChaserBO",24,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("HornetChaserBP",24,1,0,0)
goto Done
}
}

actor HornetmanMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("HornetChaserB",0,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("HornetChaserBB",0,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("HornetChaserBR",0,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("HornetChaserBO",0,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("HornetChaserBP",0,1,0,0)
goto Done
}
}

actor HornetmanMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("HornetChaserB",-24,1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("HornetChaserBB",-24,1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("HornetChaserBR",-24,1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("HornetChaserBO",-24,1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("HornetChaserBP",-24,1,8,0)
goto Done
}
}

actor HornetmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("HornetNectarHive",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("HornetNectarHiveB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("HornetNectarHiveR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("HornetNectarHiveO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("HornetNectarHiveP",0,0,0,0)
goto Done
}
}