actor TruffleClusterWep_NormalBar : NormalBar{args 210, 225}
actor TruffleClusterWep : BaseMM8BDMWep
{
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_TRUFFLECLUSTER"
Obituary "$OB_TRUFFLECLUSTER"
Tag "$TAG_TRUFFLECLUSTER"
weapon.ammotype "TruffleClusterAmmo"
inventory.icon "TCLUICON"
States
{
SpawnLoop:
TCLU Z 1
loop
Ready:
TCLU A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_TRUFFLECLUSTER)
TCLU A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
TCLU A 0 
goto DeselectSwap
Select:
TCLU A 0 
goto SelectSwap
Fire:
TCLU A 0 A_JumpIfNoAmmo("NoAmmo")
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",8,1,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",0,0,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",-8,0,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",-16,0,8,0)
TCLU BC 2
TCLU A 13 
TCLU A 0
Goto Ready+1
Altfire:
TCLU A 0 A_JumpIfInventory("Vile_ClassAltfire", 1, "ClassAltfire")
TCLU A 0 A_JumpIf(CallACS("Vile_class_altfire"), "ClassAltfire")
TCLU A 1 A_JumpIfInventory("MM8BDMPlayer", 1, 1)
wait
TCLU A 0 A_JumpIfNoAmmo("NoAmmo")
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",-8,1,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",0,0,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",8,0,8,0)
TCLU BC 2
TCLU A 0 A_PlaySoundEx("weapon/trufflecluster", "Weapon",0,0)
TCLU A 0 A_FireCustomMissile("TruffleCluster",16,0,8,0)
TCLU BC 2
TCLU A 13 
TCLU A 0
Goto Ready+1
ClassAltfire:
DATK A 0 
goto Super::Altfire

NoAmmo:
TCLU A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

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

actor TruffleCluster : BasicProjectile
{
PROJECTILE
Radius 12
Height 12
scale 2.5
damagetype "TruffleCluster"
Obituary "$OB_TruffleCluster"
damage (CallACS("vile_cbm_damage",7))
speed 50
+EXPLODEONWATER
States
{
Spawn:
TFCL A 1
loop
Death:
TNT1 A 0 A_Stop
TNT1 A 1 A_PlaySoundEx("weapon/drillexplode", "Weapon")
TNT1 A 0 A_SpawnItem("ExplosionEffect2")
TNT1 A 3 A_Explode(CallACS("vile_cbm_damage",10), 32, 0,0,32)
stop
}
}