actor TrebleboosterWepC : Weapon
{
Weapon.AmmoUse 1
Weapon.AmmoGive 60
Weapon.SlotNumber 1
scale 2.0
Obituary "%o was bombed by %k's Bass Buster."
Inventory.Pickupmessage "You got the Bass Buster!"
weapon.ammotype "TrebleBoostAmmo"
+WEAPON.AMMO_OPTIONAL
+WEAPON.DONTBOB
inventory.icon "TrebBoo"
States
{
Spawn:
TNT1 A 0
stop
Ready:
BASB B 0 ACS_ExecuteAlways(998,0,251)
TNT1 A 0 SetPlayerProperty(0,1,3)
NEDR A 0 A_GiveInventory("TrebleBoost",1)
BASB B 0 A_JumpIfNoAmmo("Deselect")
TREB B 10 A_WeaponReady
BASB B 0 A_TakeInventory("TrebleBoostAmmo",2)
goto Ready+3
Deselect:
TNT1 A 0 A_TakeInventory("Trebleboost",1)
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_TakeInventory("TrebleboosterWepC",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TREB B 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BASB B 1 A_Raise
Loop
Fire:
BASB B 0 A_JumpIfNoAmmo("Deselect")
BASB B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
AIRS D 0 A_FireCustomMissile("BoostShot",-15,0,8,0)
AIRS D 0 A_FireCustomMissile("BoostShot",15,0,8,0)
AIRS D 0 A_FireCustomMissile("BoostShot",0,1,8,0)
TREB CCD 1
TREB B 20
BASB B 0 A_TakeInventory("TrebleBoostAmmo",4)
BASB B 0 A_Refire
BASB B 0 //SetPlayerProperty(0,0,0)
goto Ready+3
NoAmmo:
TNT1 A 0 A_TakeInventory("Trebleboost",1)
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_TakeInventory("TrebleboosterWepC",1)
Goto Ready+3
}
}

actor NewTreblebooster : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "TrebBoo"
inventory.pickupmessage "Treble Boost!"
Inventory.PickupSound "item/1up"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
TRBI A 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)
stop
}
}


actor TrebleFuser
{
- SOLID
+NOGRAVITY
+MISSILE
+DONTBLAST
+NOCLIP
+SKYEXPLODE
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("support/rushsummon")
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 TrebleBoostAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 60
}

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

actor Treblebooster : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "TrebBoos"
inventory.pickupmessage "Treble Boost!"
Inventory.PickupSound "item/1up"
+INVENTORY.AUTOACTIVATE
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
TRBI A 1
loop
Use:
WEAP Q 0 A_PlaySoundEx("item/refill","Voice")
NEDR A 0 A_GiveInventory("TrebleboosterWepC",1)
TNT1 A 0 A_TakeInventory("Treblebooster",1)
stop
}
}

actor BoostShot : FastProjectile
{
PROJECTILE
+LOOKALLAROUND
+SKYEXPLODE
+DONTBLAST
damagetype "Buster"
//seesound "weapon/mbuster"
Speed 64
Damage (15)
radius 20
height 20
scale 2.5
States
{
Spawn:
BASB A 1
loop
}
}
