actor DustCrusherWep : MegaBuster 10061
{
Weapon.AmmoUse 2
Weapon.AmmoGive 112
Weapon.SlotNumber 2
Obituary "%o got made into junk by %k's Dust Crusher."
Inventory.Pickupmessage "Power up! Dust Crusher!"
weapon.ammotype "DustCrusherAmmo"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
inventory.icon "DUSTSI"
Scale 2.0
States
{
Spawn:
WEA2 K 1
loop
Ready:
DSTS B 0 ACS_ExecuteAlways(998,0,30)
DSTS B 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
DSTS B 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
DSTS B 1 A_Raise
Loop
Fire:
DSTS B 0 A_JumpIfNoAmmo("NoAmmo")
DSTS B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
DSTS B 0 A_FireCustomMissile("DustCrusher",0,1,8,0)
DSTS CD 6
DSTS B 16
DSTS B 0 A_Refire
Goto Ready+1
NoAmmo:
DSTS B 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor DustCrusherAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor DustCrusher
{
PROJECTILE
Radius 10
Height 10
scale 2.5
damage (30)
speed 30
damagetype "Dust"
States
{
Spawn:
DUST A 4
loop
Death:
MMFX B 0 A_SpawnItemEx("DustBit1",0,0,0,28,0,0,45)
MMFX B 0 A_SpawnItemEx("DustBit2",0,0,0,28,0,0,-45)
MMFX B 0 A_SpawnItemEx("DustBit3",0,0,0,28,0,0,225)
MMFX B 0 A_SpawnItemEx("DustBit4",0,0,0,28,0,0,-225)
MMFX BCDE 2
stop
}
}

actor DustBit1
{
PROJECTILE
Radius 6
Height 6
scale 2.5
damage (8)
speed 28
states
{
Spawn:
DUST B 4
loop
}
}

actor DustBit2 : DustBit1
{
states
{
Spawn:
DUST C 4
loop
}
}

actor DustBit3 : DustBit1
{
states
{
Spawn:
DUST D 4
loop
}
}

actor DustBit4 : DustBit1
{
states
{
Spawn:
DUST E 4
loop
}
}