actor TrebleboosterWepC : BaseMM8BDMWep_CBM
{
dropitem "TrebleBoostUpgrade2Dropped"
Weapon.AmmoUse 1
Weapon.AmmoGive 30
Weapon.SlotNumber 1
Inventory.Pickupmessage "$PU_TREBLEBOOSTC"
Obituary "$OB_TREBLEBOOST"
Tag "$TAG_TREBLEBOOST"
weapon.ammotype "TrebleBoostCAmmo"
inventory.icon "TrebBoo"
States
{
Spawn:
C_00 F 1
loop
Ready:
TREB B 0 ACS_ExecuteAlways(998,0,714)//178
TREB B 0 A_JumpIfInventory("TrebleBoostOnceFlag", 1, "Ready2")
TREB B 0 SetPlayerProperty(0,1,3)
TREB B 0 A_GiveInventory("TrebleBoostOnceFlag",1)
TREB B 0 A_GiveInventory("TrebleBoostRemoveBass",1)
TREB B 0 A_GiveInventory("TrebleBoostcFlag",1)
goto FlightStart
Ready2:
TREB B 0 A_JumpIfInventory("TrebleBoostcFlag", 1, "FlightStart")
TREB B 1 A_WeaponReady
Loop
FlightStart:
TREB B 0 A_SpawnItemEx("TrebleBoostCWatcher")
Goto FlightReady
FlightReady:
TREB B 1 A_WeaponReady
TREB B 0 A_JumpIfInventory("TrebleBoostcFlag", 1, "FlightReady")
Goto Ready2
Deselect:
TREB B 0 A_JumpIfInventory("TrebleBoostcFlag",1,"RemoveFlight")
TNT1 A 0 A_TakeInventory("TrebleBoostcFlag",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TREB B 1 A_Lower
Loop
RemoveFlight:
TREB B 0 A_GiveInventory("FlyDeActivate", 1)
TREB B 0 A_TakeInventory("TrebleBoostcFlag", 1)
TREB B 2
Goto Deselect+1
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BASB B 1 A_Raise
Loop
Fire:
TREB C 0
TREB C 0 A_JumpIfNoAmmo("NoAmmo")
TREB C 1 A_JumpIfInventory("TrebleBoostcFlag",1,"FireR")
TREB C 6 A_SpawnItemEx("TrebleBoostTeleport",40,0,256,0,0,-32,0,33, 0)
TREB C 0 A_GiveInventory("TrebleBoostcFlag", 1)
TREB C 0 A_PlaySoundEx("misc/polarroar","SoundSlot7")
Goto FlightStart
FireR:
TREB C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
TREB C 0 A_GiveInventory("BassTrebleMain3_CI",1)
TREB CD 1
TREB B 10
//TREB CCD 1
//TREB B 20
goto FlightReady
NoAmmo:
TREB C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
TREB C 0 A_GiveInventory("BassTrebleMain_CI",1)
TREB CD 2
TREB B 6
TREB B 1 ACS_Execute(979,0)
Goto Ready2+1
AltFire:
TREB B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BASB B 0 A_GiveInventory("BassMain_CI",1)
TREB CCD 1
TREB B 1
TREB B 0 A_JumpIfInventory("TrebleBoostcFlag", 1, "FlightReady")
goto Ready2
Flash:
TNT1 A 0
Goto NoFlash
NoFlash:
TNT1 A 0
stop
}
}

actor TrebleBoostCWatcher : BasicHelper
{
States
{
Spawn:
TNT1 A 0 
TNT1 A 0 A_GiveToTarget("FlyActivate", 1)
Goto TakeAmmo
TakeAmmo:
TNT1 A 0 A_TakeFromTarget("TrebleBoostCAmmo",1)
TNT1 A 0 A_TakeInventory("CutterFlag", 10)
Goto Spawn2
Spawn2:
TNT1 A 1 A_GiveInventory("CutterFlag", 1)
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 0 A_JumpIfInventory("CutterFlag", 10, "TakeAmmo")
TNT1 A 0 A_JumpIfInTargetInventory("TrebleBoostCAmmo",1,1)
Goto Death
TNT1 A 0 A_JumpIfInTargetInventory("TrebleBoostcFlag",1,"Spawn2")
Goto Death
Death:
TNT1 A 0 A_TakeFromTarget("TrebleBoostcFlag",1)
TNT1 A 0 A_GiveToTarget("FlyDeActivate", 1)
stop
}
}

actor NewTreblebooster : BasicCustomInventory
{
inventory.pickupmessage "$PU_TREBLEBOOST"
Tag "$TAG_TREBLEBOOSTUPGRADE"
inventory.icon "TrebBost"
states
{
Spawn:
TRBB X 1
loop
Use:
WEAP Q 0 A_PlaySoundEx("item/refill","Voice")
WEAP Q 0 A_JumpIfInventory("TrebleboosterWepC", 1, "Refill")
WEA2 B 0 A_SpawnItemEx("TrebleFuser", 40, 0, 256, 0, 0, -32, 0, SXF_NOCHECKPOSITION, 0)
stop
Refill:
NEDR A 0 A_GiveInventory("TrebleboosterWepC",1)
NEDR A 0 A_SelectWeapon("TrebleboosterWepC")
stop
}
}


actor TrebleFuser
{
- SOLID
+NOGRAVITY
+MISSILE
+DONTBLAST
+NOCLIP
+SKYEXPLODE
+DONTREFLECT
speed 0
scale 2.5
Radius 12
Height 32
reactiontime 250
meleerange 80
states
{
Spawn:
TRBL F 0 A_Jump(256,"Death")
TRBL F 1 A_ChangeFlag("MISSILE",0)
TRBL F 1 
TRBL F 1 A_PlaySound("misc/polarroar",1,1.0)
TRBL F 1 A_JumpIf(z-floorz<=0, "Look")
Goto Spawn+4
Look:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GH 2
TRBL BCBCBCBCBCBCBCBCBCBC 2 A_Chase
TRBL A 0 A_CountDown
Goto Look+3
Melee:
TNT1 A 1 A_GiveToTarget("TrebleBoostActivate",1)
stop
Death:
TRBL F 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}

actor TrebleBoostActivate : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 1
loop
Use:
TNT1 A 0 A_GiveInventory("TrebleboosterWepC",1)
TNT1 A 0 A_SelectWeapon("TrebleboosterWepC")
TNT1 A 1
stop
}
}

actor TrebleBoostRemoveBass : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BassBusterC",1)
TNT1 A 1
stop
}
}

actor TrebleBoostCAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 30
+INVENTORY.IGNORESKILL
}

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

actor TrebleBoostOnceFlag : OnceC{}


actor BoostCShot
{
Translation "204:204=215:215"
PROJECTILE
damagetype "TrebleBoost"
Obituary "$OB_TREBLEBOOST"
Speed 64
Damage (11)
radius 7
height 7
scale 2.5
States
{
Spawn:
BASB T 1
loop
}
}

actor BoostCShotB : BoostCShot{translation "204:204=205:205"}
actor BoostCShotR : BoostCShot{translation "204:204=171:171"}
actor BoostCShotO : BoostCShot{translation "204:204=104:104"}
actor BoostCShotP : BoostCShot{translation "204:204=229:229"}

actor BassTrebleMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BoostCShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BoostCShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BoostCShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BoostCShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BoostCShotP",0,0,8,0)
goto Done
}
}

actor BassTrebleMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BoostCShot",-15,0,8,0)//BoostShot
TNT1 A 0 A_FireCustomMissile("BoostCShot",15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BoostCShotB",-15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotB",15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BoostCShotR",-15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotR",15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BoostCShotO",-15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotO",15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BoostCShotP",-15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotP",15,0,8,0)
TNT1 A 0 A_FireCustomMissile("BoostCShotP",0,0,8,0)
goto Done
}
}





actor BassCoil : BasicCustomInventory
{
inventory.pickupmessage "$PU_BASSCOIL"
Tag "$TAG_BASSCOIL"
inventory.icon "TrebCoil"
states
{
Spawn:
TRBB W 1
loop
Use:
WEAP B 0 A_PlaySoundEx("item/refill","Voice")
WEAP B 0 A_SpawnItemEx("BCoilTeleport", 40, 0, 256, 0, 0, -32, 0, SXF_NOCHECKPOSITION, 0)
stop
}
}

actor BCoil : PCoil
{
states
{
Spawn:
TRBL F 0 A_Jump(256,"Death")
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 1 A_JumpIf(z-floorz<=0, "Look")
Goto Spawn+2
Look:
TRBL F 0 A_ChangeFlag("NOCLIP",0)
TRBL GH 2
TRBL BC 3 A_Chase
TRBL B 0 A_CountDown
Goto Look+3
Melee:
TRBL E 1 A_JumpIfInTargetInventory("StrongSpring",1,"Melee2")
TRBL E 18 A_GiveToTarget("SpringActivate",1)
TRBL A 0 A_Die
Goto Death
Melee2:
TRBL E 18 A_GiveToTarget("SpringActivate2",1)
TRBL B 0 A_Die
Goto Death
Death:
TRBL E 0 A_SpawnItemEx("BassItemDeath",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
stop
}
}


actor BCoilTeleport
{
Radius 12
Height 32
scale 2.5
+NOINTERACTION
PROJECTILE
+DONTBLAST
states
{
Spawn:
TRBL F 0
TRBL F 6
TRBL FFFFFFFFFF 1 A_CheckFloor("Next")
Goto Next
Next:
TRBL F 0 A_ChangeFlag("NOINTERACTION", 0)
TRBL F 0 A_ChangeFlag("NOGRAVITY", 0)
TRBL F 0 A_Jump(256,"Death")
Death:
TNT1 A 0 A_SpawnItemEx("BCoil",0,0,0,0,0,momz,0,SXF_NOCHECKPOSITION,0)
stop
}
}

actor BassItemDeath : ProtoItemDeath
{
States
{
Spawn:
TRBL HG 2
TRBL F 0 ThrustThingZ(0, 40, 0, 1)
TRBL F 1 A_CountDown
Goto Spawn+3
Death:
TRBL F 0
stop
}
}

actor BCoilTeleport2 : BCoilTeleport
{
states
{
Death:
TRBL F 0 A_SpawnItemEx("TrebleJet",0,0,0,0,0,momz,0,SXF_NOCHECKPOSITION,0)
stop
}
}



actor BassJet : BasicCustomInventory
{
inventory.pickupmessage "$PU_BASSJET"
Tag "$TAG_BASSJET"
inventory.icon "TrebJet"
states
{
Spawn:
TRBB V 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("BassJetCounter",1,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_SpawnItemEx("BCoilTeleport2", 40, 0, 256, 0, 0, -32, 0, SXF_NOCHECKPOSITION, 0)
stop
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BassJetCounter",20)
stop
}
}

actor TrebleJet
{
- SOLID
+MISSILE
+DONTBLAST
+NOCLIP
+SKYEXPLODE
+DONTREFLECT
speed 0
scale 2.5
Radius 12
Height 32
reactiontime 250
meleerange 40
states
{
Spawn:
TRBL F 0 A_Jump(256,"Death")
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 1 A_JumpIf(z-floorz<=0, "Look")
Goto Spawn+2
Look:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GH 2
TRBL BC 3 A_Chase
TRBL B 0 A_CountDown
Goto Look+3
Melee:
TNT1 A 0 A_GiveToTarget("BassJetCounter",20)
TNT1 A 1 A_GiveToTarget("FlyActivate",1)
Goto FlyCheck1
FlyCheck1:
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 A 0 A_TakeFromTarget("BassJetCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("BassJetCounter",1,"FlyCheck2")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
FlyCheck2:
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX1",1)
TNT1 AAAAA 1 A_GiveToTarget("BassJetFX2",1)
TNT1 A 0 A_TakeFromTarget("BassJetCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("BassJetCounter",1,"FlyCheck1")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
Death:
TRBL F 0 A_SpawnItemEx("BassItemDeath",0,0,0,0,0,0,0,33)
stop
Death2:
TNT1 A 0 A_TakeFromTarget("BassJetCounter",20)
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
}
}

actor BassJetFX1 : CustomInventory{States{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("BassJetFeet1",-10,0,0,0,0,0,0,33)
stop}}

actor BassJetFX2 : CustomInventory{States{
Pickup:
TNT1 A 1 A_SpawnItemEx("BassJetFeet2",-10,0,0,0,0,0,0,33)
stop}}

actor BassJetFeet1 : ProtoJetFeet1{States{
Spawn:
TRBL J 2
stop}}


actor BassJetFeet2 : ProtoJetFeet2{States{
Spawn:
TRBL K 2
stop}}

actor BassJetCounter : Inventory
{
inventory.amount 1
inventory.maxamount 20
}



actor BassMarine : BasicCustomInventory
{
inventory.pickupmessage "$PU_BASSMARINE"
Tag "$TAG_BASSMARINE"
inventory.icon "TrebSubM"
states
{
Spawn:
TRBB Y 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("BassMarineCounter",1,3)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_SpawnItemEx("BassMarine3Teleport", 40, 0, 256, 0, 0, -32, 0, 33, 0)
stop
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BassMarineCounter",80)
stop
}
}

actor BassMarine3Teleport
{
Radius 8
Height 8
scale 2.5
+NOINTERACTION
PROJECTILE
+DONTBLAST
states
{
Spawn:
TFOG A 0
TFOG A 7
TFOG A 0 A_SpawnItemEx("BassMarine3",0,0,0,0,0,0,0,33,0)
stop
}
}

actor BassMarine3
{
+MISSILE
+NOCLIP
+NOINTERACTION
+DONTBLAST
+SKYEXPLODE
+DONTREFLECT
speed 0
scale 2.5
Radius 12
Height 32
meleerange 20
states
{
Spawn:
TNT1 A 0
TNT1 A 1 A_GiveToTarget("BassMarineCounter",80) 
Goto FlyCheck
FlyCheck:
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("IsUnderwater",1,"GiveFlight")
TNT1 A 2
TNT1 A 0 A_JumpIfInTargetInventory("BassMarineCounter",1,"FlyCheck")
TNT1 A 0 A_TakeFromTarget("BassMarineCounter",9999)
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
GiveFlight:
TNT1 A 2 A_GiveToTarget("BMarineFX4",1)
TNT1 A 0 A_GiveToTarget("FlyActivate",1)
Goto GiveFlight2
GiveFlight2:
TNT1 A 0 A_JumpIfInTargetInventory("BassMarineCounter",1,"FlyingCheck")
TNT1 A 0 A_TakeFromTarget("BassMarineCounter",9999)
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
TNT1 A 2 A_GiveToTarget("BMarineFX4",1)
stop
FlyingCheck:
TNT1 A 0 A_JumpIfInTargetInventory("SpinTime",1,"Death2")
TNT1 A 0 A_JumpIfInTargetInventory("InBoat",1,"Death2")
TNT1 AAAAA 1 A_GiveToTarget("BMarineFX2",1)
TNT1 AAAAA 1 A_GiveToTarget("BMarineFX1",1)
TNT1 A 0 A_TakeFromTarget("BassMarineCounter",1)
TNT1 A 0 A_JumpIfInTargetInventory("IsUnderwater",1,"GiveFlight2")
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
TNT1 A 0 A_GiveToTarget("BMarineFX4",1)
TNT1 A 0 A_JumpIfInTargetInventory("BassMarineCounter",1,"FlyCheck")
stop
Death:
RUSH F 0 A_SpawnItemEx("BassItemDeath",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
stop
Death2:
TNT1 A 0 A_TakeFromTarget("BassMarineCounter",9999)
TNT1 A 0 A_GiveToTarget("FlyDeactivate",1)
stop
}
}

actor BassMarineCounter : Inventory
{
inventory.amount 1
inventory.maxamount 80
}

actor BMarineFX1 : CustomInventory{States{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 1 SetPlayerProperty(0,1,3)
TNT1 A 1 A_SpawnItemEx("BMarineFeet1",0,0,-16,0,0,0,0,33)
stop}}
actor BMarineFX2 : CustomInventory{States{
Pickup:
TNT1 A 1 A_SpawnItemEx("BMarineFeet2",0,0,-16,0,0,0,0,33)
stop}}
actor BMarineFX3 : CustomInventory{States{
Pickup:
TNT1 A 1 A_SpawnItemEx("BMarineFeet3",0,0,0,0,0,0,0,33)
stop}}
actor BMarineFX4 : CustomInventory{States{
Pickup:
TNT1 A 1 A_SpawnItemEx("BMarineFeet4",0,0,0,0,0,0,0,33)
stop}}

actor BMarineFeet1{-SOLID +CLIENTSIDEONLY +NOGRAVITY +NOINTERACTION Scale 2.5 States{
Spawn:
TRBL M 2
stop}}
actor BMarineFeet2:BMarineFeet1{States{
Spawn:
TRBL N 2
stop}}
actor BMarineFeet3:BMarineFeet1{States{
Spawn:
TFOG ABC 2
stop}}
actor BMarineFeet4:BMarineFeet1{States{
Spawn:
TFOG CBA 2
stop}}